easy_install and offline installation in virtualenv og TG2

142 views
Skip to first unread message

alind

unread,
Aug 18, 2009, 1:31:13 AM8/18/09
to TurboGears
I want to install tg2 on an offline machine.
I have downloaded all the eggs using this command:

mkdir tg2_offline
cd tg2_offline
easy_install -zmaxd . TurboGears2

Now as the docs suggest I should copy this directory (tg2_offline)
into the offline machine and run
cd tg2_offline
easy_install -f . TurboGears

Now I dont want a system wide installation. I want to set up the
virtualenv environent just like done by this command on online
machine.python tg2-bootstrap.py --no-site-packages tg2env

python tg2-bootstrap.py --no-site-packages tg2env

and then use as source bin/activate
KIndly guide me through this.
Thanks in advance.
PS: tg2_offline is the name given by me to the dir just to be more
clear.

Diez B. Roggisch

unread,
Aug 18, 2009, 2:56:09 AM8/18/09
to turbo...@googlegroups.com
alind schrieb:

> I want to install tg2 on an offline machine.
> I have downloaded all the eggs using this command:
>
> mkdir tg2_offline
> cd tg2_offline
> easy_install -zmaxd . TurboGears2
>
> Now as the docs suggest I should copy this directory (tg2_offline)
> into the offline machine and run
> cd tg2_offline
> easy_install -f . TurboGears
>
> Now I dont want a system wide installation. I want to set up the
> virtualenv environent just like done by this command on online
> machine.python tg2-bootstrap.py --no-site-packages tg2env
>
> python tg2-bootstrap.py --no-site-packages tg2env

I don't think this works. But it shouldn't be hard to install:


- create the virtualenv yourself, using "virtualenv tg2env". of course
you need the virtualenv-egg as well, and that must be installed
beforehand! Generelly, you need setuptools installed, if that's not on
your machine, I'm not sure how to do that.

- use easy_install with a "-i" option with a file-url that points to
your egg-dir, that *should* work. If it doesn't, then you should be able
to do "easy_install *.egg" inside the egg-dir also.

Diez

alind

unread,
Aug 18, 2009, 4:11:41 AM8/18/09
to TurboGears
Thanks Diez
I am able to go upto some distance but again got stuck. I will
describe wht I have done.
cd ../tg2_offline
virtualenv tg2env
source tg2env/bin/activate
easy_install -i tg2_offline TurboGears2

everything went smoothly upto here. After that I try using 'paster
quickstart' command, but it is not having that quickstart.
paster --help shows only tg-info part

$paster --help
Usage: paster [paster_options] COMMAND [command_options]

Options:
--version show program's version number and exit
--plugin=PLUGINS Add a plugin to the list of commands (plugins are
Egg
specs; will also require() the Egg)
-h, --help Show this help message

Commands:
create Create the file layout for a Python distribution
help Display help
make-config Install a package and create a fresh config file/
directory
points Show information about entry points
post Run a request for the described application
request Run a request for the described application
serve Serve the described application
setup-app Setup an application, given a config file

TurboGears2:
tginfo Show TurboGears 2 related projects and their versions

Thanks in advance.

Diez B. Roggisch

unread,
Aug 18, 2009, 5:08:17 AM8/18/09
to turbo...@googlegroups.com, alind
On Tuesday 18 August 2009 10:11:41 alind wrote:
> Thanks Diez
> I am able to go upto some distance but again got stuck. I will
> describe wht I have done.
> cd ../tg2_offline
> virtualenv tg2env
> source tg2env/bin/activate
> easy_install -i tg2_offline TurboGears2
>
> everything went smoothly upto here. After that I try using 'paster
> quickstart' command, but it is not having that quickstart.
> paster --help shows only tg-info part

You are missing the tg-devtools package.

Diez

alind

unread,
Aug 18, 2009, 6:23:28 AM8/18/09
to TurboGears
Thanks Diez.
That worked like a charm. I followed these steps:

cd tg2_offline
easy_install -zmaxd . tg.devtools
cd ..
virtualenv tg2env
source tg2env/bin/activate
easy_install -i tg2_offline TurboGears2 tg.devtools

Now that quickstart thing is coming. I will keep informing about any
other roadblocks. Thanks a lot.
Also I think that this process should be placed in the tg2 docs.
Message has been deleted
Message has been deleted

alind

unread,
Sep 4, 2009, 2:35:07 AM9/4/09
to TurboGears
Sorry to bother you guys again. But again while downloading tg2 for
offline with say install, I am facing a version problem for
zapo.interface.
error: Could not find suitable distribution for Requirement.parse
('zope.interface==3.3.1') (--always-copy skips system and development
eggs)
The reason is the absence of that particular version .
But the tg2booststrp.py does fine and downloads the latest versions.
So I think that there must be some falg /option given in
tg2bootstrap.py for downloading eggs for offline installation.
- I am ecpecting a solution from tg2bootstrap.py maintainers/
developers.
-regards

On Aug 18, 3:56 pm, alind <alindsha...@gmail.com> wrote:
> Thanks Diez.
> That worked like a charm. I followed these steps:
>
> cd tg2_offline
> easy_install -zmaxd . tg.devtools
> cd ..
> virtualenv tg2env
> source tg2env/bin/activate
> easy_install -i tg2_offline  TurboGears2  tg.devtools
>
> Now that quickstart thing is coming. I will keep informing about any
> other roadblocks. Thanks a lot.
> Also I think that this process should be placed in the tg2 docs.
>

Diez B. Roggisch

unread,
Sep 4, 2009, 7:51:12 AM9/4/09
to turbo...@googlegroups.com, alind
On Friday 04 September 2009 08:35:07 alind wrote:
> Sorry to bother you guys again. But again while downloading tg2 for
> offline with say install, I am facing a version problem for
> zapo.interface.
> error: Could not find suitable distribution for Requirement.parse
> ('zope.interface==3.3.1') (--always-copy skips system and development
> eggs)
> The reason is the absence of that particular version .
> But the tg2booststrp.py does fine and downloads the latest versions.
> So I think that there must be some falg /option given in
> tg2bootstrap.py for downloading eggs for offline installation.
> - I am ecpecting a solution from tg2bootstrap.py maintainers/
> developers.
> -regards

I guess you have a different version of zope.interface already installed in
your system. I don't know where this --alway-copy comes from - but you should
try that, if 'tis part of tg2bootstrap.py

Alternatively, you can

- use --no-site-packages when creating the virtualenv
- de-install the zope.interface-package with your package management tool

Diez

alind

unread,
Sep 7, 2009, 5:21:08 AM9/7/09
to TurboGears
Hi Diez,
As i am downloading it and then try to install from the downloaded
thing in a virtual env, there should not be a problem with the already
installed thing. As what is happening is that easy_install of
TurboGears2 is dowloading an older version of zope interface from
pypi. While the tg2bootstrap.py installation goes smoothly.

regards - Alind
Reply all
Reply to author
Forward
0 new messages