python - 如何在 easy_install 中更改站点包目录的路径

标签 python windows-7-x64 easy-install

我正在尝试在 windows7x64 上使用 easy_install 并得到这个:

<output>
c:\Python27\Scripts>easy_install.exe django-piston
error: can't create or remove files in install directory

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).

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

最佳答案

easy_install 应该将包安装在 Python 安装的站点包目录中。可能是您不小心更改了 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 目录

关于python - 如何在 easy_install 中更改站点包目录的路径,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/9874405/

相关文章:

C# 64 位应用程序,大内存地址感知

performance - 有什么方法可以在 PostgreSQL 中使用 >1 Core 进行单个连接/查询?

python - easy_install 失败,出现错误 "Couldn' t 二进制文件上传后找不到安装脚本?

python - Python 发布/版本号的标准排序顺序是什么?

python - 如何修复 "AttributeError: ' str' 对象在从 PubSub 读取并写入 BigQuery 的数据流管道中没有属性 'items'

python - Django,获取 ChoiceField 表单的值

sqlite - 在 Windows 7x64 上使用 PowerShell 中的 SQLite?

python - 如何卸载使用 easy_install 安装的软件包的非事件版本

python - 我在无限循环的尝试中做错了什么?

python - 我想更改 DataFrame (Python) 中的字符串值