erreur d'installation pense pythonpath est vide
Je suis en train d'installer le scikits.nufft paquet ici
J'ai télécharger le fichier zip, le décompresser et cd dans le répertoire. Il contient un setup.py fichier, donc je lance
python setup.py install
mais il me donne l'erreur suivante lié à mon PYTHONPATH
sudo python setup.py install
sudo: unable to resolve host Lenovo
/usr/local/lib/python2.7/dist-packages/distribute-0.6.31-py2.7.egg/setuptools/command/install_scripts.py:3: UserWarning: Module dap was already imported from None, but /usr/lib/python2.7/dist-packages is being added to sys.path
from pkg_resources import Distribution, PathMetadata, ensure_directory
running install
Checking .pth file support in /usr/local/lib/python2.7/site-packages/
/usr/bin/python -E -c pass
TEST FAILED: /usr/local/lib/python2.7/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:
/usr/local/lib/python2.7/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://packages.python.org/distribute/easy_install.html#custom-installation-locations
Please make the appropriate changes for your system and try again.
Il semble penser que le chemin est vide, mais quand je vérifie mon chemin, j'en ai
echo $PYTHONPATH
/usr/local/lib/python2.7/site-packages:/home/david/PYTHON
Personne ne sait pourquoi il pourrait penser que le chemin est vide?? ou avez d'autres idées quant à ce qui peut être mal ici.
Merci,
Dave
Ainsi, même si votre
PYTHONPATH
semble correct, il n'est pas nécessairement correct après le sudo
. Essayez de mettre en place un shell root, d'abord avec sudo su -
, puis vérifier PYTHONPATH
regarde, à droite, avant d'exécuter le script à partir de la même coquille.OriginalL'auteur Dave | 2013-05-23
Vous devez vous connecter pour publier un commentaire.
Après Aya du commentaire ci-dessus, j'ai trouvé similaire résolu problème ici et réussi à le faire exécuter par l'ajout de
le fichier sudoers.
Ta,
Dave
OriginalL'auteur Dave
Pour les personnes qui veulent éviter de sudo et installation dans le local de l'utilisateur:
OriginalL'auteur GerardJP