开发者

Python setup.py install uses wrong Python installation path

I'm on a bluehost-server which has a "rudimental" installation of python2.6. I installed python2.6 in my user-directory whi开发者_StackOverflow中文版ch works fine so far, but when I try to install python packages with "setup.py install", "easy_install" or "pip install" I get:

error: invalid Python installation: unable to open /usr/lib/python2.6/config/Makefile (No such file or directory)

So, it tries to use the system-wide installation which does not have this Makefile. Also using the --prefix or --user argument doesn't help.

How can I tell pip or easy_install to use the python-installation in my user-directory?


You need to execute setup.py by specifying which python interpreter on the command line, like this:

/path/to/python setup.py install


UPDATE:

The error message indicates that you don't have the python-dev package installed on your system.


I just solved the problem by installing the needed packages manually, meaning copying the sourcefiles into my local python folder. Thanks for helping anyway.

Best Jacques

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜