Install "Easy Install" using virtual python and setuptool

I am trying to install virtual python on a linux server that does not have root access. I read the PEAK guide for custom installation, but I still can’t understand what I am doing wrong.

Here are my settings:

created by .pythdisutils.cfg

[install] install_lib = /home2/me/lib install_scripts = /home2/me/bin 

Python env path in .bashrc:

  export PYTHONPATH="${PYTHONPATH}:~/lib/" 

virtual python is set to:

  ~/lib/python2.4/site-packages ~/bin/python 

I tried these codes but failed:

  sh setuptools-0.6c11-py2.4.egg sh setuptools-0.6c11-py2.4.egg --prefix=~ ... 

Error:

  TEST FAILED: /home2/me/lib/ 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: /home2/me/lib/ and your PYTHONPATH environment variable currently contains: ':~/lib/python2.4/site-packages/:~/lib/python2.4/site-packages/' Here are some of your options for correcting the problem: * You can choose a different installation directory, ie, 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. 
+4
source share
2 answers

Your PYTHONPATH does not seem to be configured correctly. Try " exec bash " and check the output

 echo $PYTHONPATH 

to contain the expected values. Replace ~ with $HOME .

Oh, and are you actually using bash as a shell? Unless you restart the shell and use bash, modifying .bashrc will of course not change anything.

+3
source
 export PYTHONPATH="${PYTH/home2/me/lib" 

It seems ... either a typo or incorrect. Perhaps you meant ...

 export PYTHONPATH="$PYTHONPATH:/home2/me/lib" 

?

0
source

Source: https://habr.com/ru/post/1397573/


All Articles