ubuntu16.04 python2.7安装错误

时间:2016-11-20 07:32:50

标签: python-2.7

easy_install pywin32
error: can't create or remove files in install directory

尝试添加或删除文件时发生以下错误 安装目录:

[Errno 13] Permission denied: '/usr/local/lib/python2.7/dist-packages/test-easy-install-4860.write-test'

您指定的安装目录(通过--install-dir, - prefix,或 distutils默认设置)是:

/usr/local/lib/python2.7/dist-packages/

也许您的帐户没有此目录的写入权限?如果 安装目录是系统拥有的目录,您可能需要登录 作为管理员或“root”帐户。如果你没有行政管理 访问这台机器,您可能希望选择不同的安装 目录,最好是PYTHONPATH环境中列出的目录 变量

有关其他选项的信息,您可以参考 文档:

https://pythonhosted.org/setuptools/easy_install.html

请对您的系统进行适当的更改,然后重试。

1 个答案:

答案 0 :(得分:0)

尝试使用sudo,但您可以使用apt-get安装Python,如下所示:

sudo add-apt-repository ppa:fkrull/deadsnakes-python2.7
sudo apt-get update 
sudo apt-get install python2.7