【问题标题】:pip setuptools missing in ubuntu 17.04ubuntu 17.04 中缺少 pip setuptools
【发布时间】:2017-04-22 19:02:48
【问题描述】:

当我尝试从 pip 安装某些东西时,我对新的 ubuntu 17.04 有一个非常奇怪的问题,我无法做到……这是错误:

sudo pip install psutil

The directory '/home/metu/.cache/pip/http' or its parent directory is not owned by the current user and the cache has been disabled. Please check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag.
The directory '/home/metu/.cache/pip' or its parent directory is not owned by the current user and caching wheels has been disabled. check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag.
Collecting psutil
Downloading psutil-5.2.2.tar.gz (348kB)
100% |████████████████████████████████| 358kB 1.3MB/s 
Could not import setuptools which is required to install from a source 
distribution.
 Traceback (most recent call last):
 File "/usr/lib/python2.7/dist-packages/pip/req/req_install.py", line 387, in setup_py
 import setuptools  # noqa
 File "/usr/share/python-wheels/setuptools-32.3.1-py2.py3-none-any.whl/setuptools/__init__.py", line 10, in <module>
 File "/usr/share/python-wheels/setuptools-32.3.1-py2.py3-none-any.whl/setuptools/extern/__init__.py", line 1, in <module>
 ImportError: No module named extern

这将发生在我想安装的任何工具上。美丽的肥皂,烧瓶 ecc ...

Python 是版本:

Python 2.7.13

Pip 是最新版本:

pip 9.0.1 from /usr/lib/python2.7/dist-packages (python 2.7)

setuptools 已安装:

sudo apt-get install python-setuptools
python-setuptools is already the newest version (33.1.1-1).

使用 pycharm 软件包安装正确,但我有很多库要包含,我无法一一安装,有些像烧瓶登录库一样丢失...

感谢您的帮助

【问题讨论】:

    标签: ubuntu pip setuptools


    【解决方案1】:

    需要extern,但没有安装,所以下载extern:

    https://pypi.python.org/pypi/extern
    

    并使用命令安装它:

    python setup.py install
    

    如果问题没有解决,请从 pip 卸载 setuptools

    pip uninstall setuptools
    

    【讨论】:

      猜你喜欢
      • 2017-09-15
      • 1970-01-01
      • 1970-01-01
      • 2017-09-11
      • 1970-01-01
      • 1970-01-01
      • 2017-12-04
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多