【发布时间】: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