【问题标题】:Learn python the hard way excercise 50学python的艰辛练习50
【发布时间】:2012-12-24 02:19:25
【问题描述】:

所以,我是 python 的新手,但在这本书之前,我对这本书没有真正的问题.. 此时我们将安装lpthw.web,但在尝试安装时出现错误。

这是我们被告知要写入终端的内容:

$ sudo pip install lpthw.web

这是我不断收到的错误:

异常:回溯(最近一次调用最后一次):文件 "/Library/Python/2.6/site-packages/pip-1.2.1-py2.6.egg/pip/basecommand.py", 第 107 行,主要 status = self.run(options, args) 文件“/Library/Python/2.6/site-packages/pip-1.2.1-py2.6.egg/pip/commands/install.py”, 第 248 行,运行中 导入 setuptools ImportError: 没有名为 setuptools 的模块

在 /Users/user/Library/Logs/pip.log 中存储完整的日志 用户-MacBook-Pro:~用户$

是的,我去了我的 pip 文件夹,发现那里的 setuptools 没有。这是如何以及为什么会发生的?

我很困惑,有什么建议吗?

【问题讨论】:

标签: python setuptools


【解决方案1】:

在 Ubuntu 上,您可以通过 apt-get 获取 setuptools:

$ sudo apt-cache search setuptools
[sudo] password for me: 
...
python-setuptools - Python Distutils Enhancements (setuptools compatibility)
...
python3-setuptools - Python3 Distutils Enhancements (setuptools compatibility)

【讨论】:

    猜你喜欢
    • 2013-05-16
    • 1970-01-01
    • 2015-04-23
    • 2015-05-01
    • 2013-04-06
    • 2011-12-04
    • 2016-06-28
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多