Ubuntu 16.04 LTS,試圖安裝與pip cpickle。我查了一下,還沒有找到有用的東西。pip安裝泡菜不工作 - 沒有這樣的文件或目錄
PYTHONPATH未設置。
錯誤消息
[email protected]:~$ 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
[email protected]:~$ python --version
Python 2.7.12
[email protected]:~$ 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
這是什麼版本的Python? Python 2.7和3。4來與cPickle – lordingtar
看起來像你的'python'是python ** 3 **。 'pip'用於python2。請安裝'pip3' ......並使用pip3爲Python3安裝模塊。 –
剛剛更新問題的版本,ctrl + f的「版本」 – invapid