sudo pip3 install scikit-learn (任何模块真的只是使用最近的尝试)
sudo pip3 install -U scikit-learn
sudo -H pip3 install -U scikit-learn
sudo -H pip3 --default-timeout=200 install -U scikit-learn
sudo python3 -m pip install scikit-learn
Run Code Online (Sandbox Code Playgroud)
每个命令和上述任何组合都会导致相同的错误:读取超时.错误总是发生在同一点(scikit-learn发生在24%).我正在使用最新版本的pip(8.1.2),而我正在使用ubuntu mate 16.04.确切的错误是:
Traceback (most recent call last):
File "/usr/local/lib/python3.5/dist-packages/pip-8.1.2-py3.5.egg/pip/_vendor/requests/packages/urllib3/response.py", line 228, in _error_catcher
yield
File "/usr/local/lib/python3.5/dist-packages/pip-8.1.2-py3.5.egg/pip/_vendor/requests/packages/urllib3/response.py", line 310, in read
data = self._fp.read(amt)
File "/usr/local/lib/python3.5/dist-packages/pip-8.1.2-py3.5.egg/pip/_vendor/cachecontrol/filewrapper.py", line 49, in read
data = self.__fp.read(amt)
File "/usr/lib/python3.5/http/client.py", line 448, in read
n = self.readinto(b)
File "/usr/lib/python3.5/http/client.py", line 488, in readinto
n = self.fp.readinto(b) …Run Code Online (Sandbox Code Playgroud)