我在Pi3上的Raspbian Jessie上运行Python 3.4.2
pip3工作正常,直到我尝试这个:
sudo pip3 install dropbox
哪个收益率:
Downloading/unpacking dropbox
Requirement already satisfied (use --upgrade to upgrade): urllib3 in /usr/lib/python3/dist-packages (from dropbox)
Requirement already satisfied (use --upgrade to upgrade): six>=1.3.0 in /usr/lib/python3/dist-packages (from dropbox)
Downloading/unpacking requests>=2.5.1,!=2.6.1 (from dropbox)
Downloading/unpacking idna>=2.5,<2.6 (from requests>=2.5.1,!=2.6.1->dropbox)
Downloading/unpacking certifi>=2017.4.17 (from requests>=2.5.1,!=2.6.1->dropbox)
Downloading/unpacking chardet>=3.0.2,<3.1.0 (from requests>=2.5.1,!=2.6.1->dropbox)
Installing collected packages: dropbox, requests, idna, certifi, chardet
Found existing installation: requests 2.4.3
Not uninstalling requests at /usr/lib/python3/dist-packages, owned by OS
Found existing installation: chardet 2.3.0
Not uninstalling chardet at /usr/lib/python3/dist-packages, owned by OS
Successfully installed dropbox requests idna certifi chardet
Cleaning up...
之后,pip3(但不是pip)现在已损坏且只是运行:
sudo pip3
给出以下错误消息:
/usr/local/lib/python3.4/dist-packages/requests/__init__.py:80: RequestsDependencyWarning: urllib3 (1.9.1) or chardet (3.0.4) doesn't match a supported version!
RequestsDependencyWarning)
Traceback (most recent call last):
File "/usr/bin/pip3", line 9, in <module>
load_entry_point('pip==1.5.6', 'console_scripts', 'pip3')()
File "/usr/lib/python3/dist-packages/pkg_resources.py", line 356, in load_entry_point
return get_distribution(dist).load_entry_point(group, name)
File "/usr/lib/python3/dist-packages/pkg_resources.py", line 2476, in load_entry_point
return ep.load()
File "/usr/lib/python3/dist-packages/pkg_resources.py", line 2190, in load
['__name__'])
File "/usr/lib/python3/dist-packages/pip/__init__.py", line 74, in <module>
from pip.vcs import git, mercurial, subversion, bazaar # noqa
File "/usr/lib/python3/dist-packages/pip/vcs/mercurial.py", line 9, in <module>
from pip.download import path_to_url
File "/usr/lib/python3/dist-packages/pip/download.py", line 22, in <module>
import requests, six
File "/usr/local/lib/python3.4/dist-packages/requests/__init__.py", line 90, in <module>
from urllib3.exceptions import DependencyWarning
ImportError: cannot import name 'DependencyWarning'
我已经从源代码安装了很多其他软件包,包括ffmpeg,gstreamer 1.10.5,opencv 3.2.0,所以我怀疑这个过程有问题,但只是尝试使用pip3安装dropbox破坏了pip3。
任何帮助解决这个问题都将受到赞赏。
答案 0 :(得分:3)
@mdasari非常感谢你的帮助。我正在运行Python 3.4.2,所以我使用easy_install3删除并重新安装pip,如你所建议的那样。此时Dropbox似乎已正确安装(尚未对其进行测试),但pip3再次损坏,并给我与以前相同的错误。但是,重新启动后,错误消失了,pip3似乎没问题。对于其他人来说,这正是我为解决问题所做的工作(再一次,我使用的是Python 3.4.2):
sudo apt-get remove python-pip
sudo apt-get autoremove
sudo easy_install3 -U pip
sudo pip3 install dropbox
reboot
答案 1 :(得分:1)