【发布时间】:2017-05-18 21:33:26
【问题描述】:
无法安装 json 模块。 据我所知,我不应该使用 sudo。怎么了?
pip install json
The directory '/home/snow/.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/snow/.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 json
Downloading json-99.0.tar.gz
Complete output from command python setup.py egg_info:
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/tmp/pip-build-YkvqVh/json/setup.py", line 2, in <module>
raise RuntimeError("Package 'json' must not be downloaded from pypi")
RuntimeError: Package 'json' must not be downloaded from pypi
----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-build-YkvqVh/json/
【问题讨论】:
-
raise RuntimeError("Package 'json' must not be downloaded from pypi")有什么不清楚的地方? -
如果发生这种情况,它应该说“不需要包装”。如果我被告知我需要安装一个包,而安装程序说我不能从 X 下载它,那么一个合理的假设是我需要从其他地方下载它。但是在哪里?
标签: python-2.7 pip ubuntu-16.04