0
# echo $PYTHONPATH
/usr/lib/python3.6/site-packages
# whoami
root
# easy_install --prefix=/usr/lib/python3.6/site-packages django==1.9
TEST FAILED: /usr/lib/python3.6/site-packages/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/lib/python3.6/site-packages/lib/python2.7/site-packages
and your PYTHONPATH environment variable currently contains:
'/usr/lib/python3.6/site-packages'
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:
https://pythonhosted.org/setuptools/easy_install.html#custom-installation-locations
Please make the appropriate changes for your system and try again.
# ls /usr/lib/python3.6/site-packages/lib/python2.7/site-packages
#
阅读answer后,我找不到.pydistutils.cfg
文件中的文件系统easy_install的前缀选项不起作用
easy_install
命令试图安装在安装路径/usr/lib/python3.6/site-packages/lib/python2.7/site-packages
这是无效的。此安装路径是越来越创建,水光easy_install
问:
如何使用easy_install的解决安装路径?
提供的链接提供了404未发现 – overexchange
@overexchange,我测试链接,它works.https://计算器。 com/questions/3849762/python-3-easy-install-pip-and-pypi – xiaoyi
命令(wget https://bitbucket.org/pypa/setuptools/raw/bootstrap/ez_setup.py)给出404找不到。请求-URI是错误的,我想 – overexchange