如何在easy_install中更改site-packages目录的路径

Stq*_*tqs 5 python easy-install windows-7-x64

我正在尝试在windows7x64上使用easy_install并得到这个:c:\ Python27\Scripts> easy_install.exe django-piston错误:无法在安装目录中创建或删除文件

The following error occurred while trying to add or remove files in the
installation directory:

    [Errno 2] No such file or directory: 'C:\\Python27\\Lib\\site-packages\\Lib\
\site-packages\\test-easy-install-4132.pth'

The installation directory you specified (via --install-dir, --prefix, or
the distutils default setting) was:

    C:\Python27\Lib\site-packages\Lib\site-packages\

This directory does not currently exist.  Please create it and try again, or
choose a different installation directory (using the -d or --install-dir
option).
Run Code Online (Sandbox Code Playgroud)

我在哪里可以更改easy_install的路径来更正一个"C:\ Python27\Lib\site-packages"

谢谢.

ela*_*ell 9

easy_install应该在Python安装的site-packages目录中安装软件包.碰巧你不小心改变了Python的目录.重新安装easy_install应该解决这个问题.

否则你可以使用:easy_install --install-dir C:\Python27\Lib\site-packages\Lib\site-packages\ django-piston

但是,最后一个选项有两个问题:

  1. 确保C:\Python27\Lib\site-packages\Lib\site-packages\在PYTHONPATH中
  2. 您需要为安装的每个新软件包指定install-dir目录