Ubuntu 16.04lts,试图用pip安装cpickle。我找了一下,还没找到有用的东西。
PYTHONPATH未设置。
user@hostname:~$ sudo -H pip3 install cpickle
Collecting cpickle
Using cached cpickle-0.5.tar.gz
Complete output from command python setup.py egg_info:
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/usr/lib/python3.5/tokenize.py", line 454, in open
buffer = _builtin_open(filename, 'rb')
FileNotFoundError: [Errno 2] No such file or directory: '/tmp/pip-build-wn926hef/cpickle/setup.py'
----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-build-wn926hef/cpickle/
You are using pip version 8.1.1, however version 9.0.1 is available.
You should consider upgrading via the 'pip install --upgrade pip' command.
----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-build-q46tq1l8/cpickle/
You are using pip version 8.1.1, however version 9.0.1 is available.
You should consider upgrading via the 'pip install --upgrade pip' command.
# version info
user@hostname:~$ python --version
Python 2.7.12
user@hostname:~$ python3 --version
Python 3.5.2
# I don't think cache is the problem
rm -rf ~/.cache/
sudo -H pip install cpickle --no-cache-dir # same problem
sudo -H pip3 install cpickle --no-cache-dir # same problem
在互联网上,我发现了这个
也就是说在Python3中它是一个图书馆。。。
cPickle
是Python标准库的一部分;不能用pip
安装它。在Python 2中,it comes installed with Python。在Python 3中,quoting the release notes添加了强调:在试图用pip安装
cpickle
的特定情况下,一些Pythonista决定通知人们这是错误的做法,因此注册了cpickle
项目(以及许多以标准库模块命名的其他项目),并给了它一个setup.py
,它只会退出并返回错误“Package 'cpickle' must not be downloaded from pypi
”。但是,在创建包或PyPI端出现了错误,导致源分发文件格式不正确,从而导致此处出现错误。因此,即使这个错误被修正了,你仍然会得到一个不同的错误,告诉你不要做你想做的事情。相关问题 更多 >
编程相关推荐