[PEAK] Easy Install: Creating a "Virtual" Python
David Froger
david.froger at gmail.com
Wed Feb 17 04:41:43 EST 2010
Hy,
I'm trying to install easyinstall without root privileges, using the
procedure described in this page:
** virtual-python.py
I downloaded the script, executed it, all is ok.
** path modification
I added this line in my ~/.bashrc:
PATH=$HOME/bin:$PATH
then took the modification into account:
bash$ source ~/.bashrc
and checked python path:
bash$ which python
/home/myname/bin/python
I also checked sys.path:
bash$ python
>>> import sys
>>> print sys.path
the output, after some formatting, is:
''
'/home/myname/lib/python2.5'
'/home/myname/lib/python2.5/plat-linux2'
'/home/myname/lib/python2.5/lib-tk'
'/home/myname/lib/python2.5/lib-dynload'
'/usr/local/lib/python2.5/site-packages'
'/home/myname/lib/python2.5/site-packages'
'/home/myname/lib/python2.5/site-packages/Numeric'
'/home/myname/lib/python2.5/site-packages/PIL'
'/home/myname/lib/python2.5/site-packages/gst-0.10'
'/var/lib/python-support/python2.5'
'/home/myname/lib/python2.5/site-packages/gtk-2.0'
'/var/lib/python-support/python2.5/gtk-2.0'
Especially, I noted thas
/home/myname/lib/python2.5/site-packages
was in sys.path
** setuptools-0.6c11-py2.5.egg
I downloaded this script on http://pypi.python.org/pypi/setuptools
and run it as:
sh setuptools-0.6c11-py2.5.egg --prefix=~
which give this error message:
TEST FAILED: /home/dfroger/lib/python2.5/site-packages does NOT support .pth
files
error: bad install directory or PYTHONPATH
You are attempting to install a package to a directory that is not
on PYTHONPATH and which Python does not read ".pth" files from. The
installation directory you specified (via --install-dir, --prefix, or
the distutils default setting) was:
/home/dfroger/lib/python2.5/site-packages
and your PYTHONPATH environment variable currently contains:
''
Here are some of your options for correcting the problem:
* You can choose a different installation directory, i.e., one that is
on PYTHONPATH or supports .pth files
* You can add the installation directory to the PYTHONPATH environment
variable. (It must then also be on PYTHONPATH whenever you run
Python and want to use the package(s) you are installing.)
* You can set up the installation directory to support ".pth" files by
using one of the approaches described here:
http://peak.telecommunity.com/EasyInstall.html#custom-installation-locations
Please make the appropriate changes for your system and try again.
If I understand, the solutions proposed in the error message are like in the
page:
http://peak.telecommunity.com/DevCenter/EasyInstall#traditional-pythonpath-based-installation
What shoud I do to get the installation via "Virtual" Python working?
Thanks for your help!
David
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.eby-sarna.com/pipermail/peak/attachments/20100217/99859966/attachment.html
More information about the PEAK
mailing list