首页
学习
活动
专区
圈层
工具
发布
首页
学习
活动
专区
圈层
工具
MCP广场
社区首页 >问答首页 >为什么我会得到Python easy_install中的“拒绝许可”错误?

为什么我会得到Python easy_install中的“拒绝许可”错误?
EN

Ask Ubuntu用户
提问于 2011-03-23 22:13:00
回答 1查看 29.3K关注 0票数 6

我是一个Ubuntu新手,一直在尝试安装Python的easy_install,这样我在安装Python时就不必处理源文件了。

我运行了以下程序,它似乎安装了正确的应用程序:

代码语言:javascript
复制
sudo apt-get install python-setuptools

但是,当我运行easy_install sqlalchemyeasy_install pysqlite3时,它不起作用。

我收到以下错误消息:

代码语言:javascript
复制
install_dir /usr/local/lib/python2.6/dist-packages/
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 13] Permission denied: '/usr/local/lib/python2.6/dist-packages/test-easy-install-1674.pth'

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

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

Perhaps your account does not have write access to this directory?  If the
installation directory is a system-owned directory, you may need to sign in
as the administrator or "root" account.  If you do not have administrative
access to this machine, you may wish to choose a different installation
directory, preferably one that is listed in your PYTHONPATH environment
variable.

For information on other options, you may wish to consult the
documentation at:

  http://packages.python.org/distribute/easy_install.html

Please make the appropriate changes for your system and try again.

帮助!

亚伯拉罕

EN

回答 1

Ask Ubuntu用户

回答已采纳

发布于 2011-03-23 22:26:02

答案很简单,只需运行sudo easy_install

但是,如果出于某些原因不想这样做,也可以在主目录中安装Python包。这个过程在这篇文章中有详细的描述,包括修改PYTHONPATH环境变量。

票数 6
EN
页面原文内容由Ask Ubuntu提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://askubuntu.com/questions/31783

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档