J'ai récemment besoin d'installer des paquets
pip install future
pip install scikit-learn
pip install numpy
pip install scipy
J'ai aussi essayé par écrit Sudo
avant eux, mais tout est arrivé avec les erreurs suivantes dans les lignes rouges:
Exception:
Traceback (most recent call last):
File "/usr/lib/python2.7/dist-packages/pip/basecommand.py", line 122, in main
status = self.run(options, args)
File "/usr/lib/python2.7/dist-packages/pip/commands/install.py", line 290, in run
requirement_set.prepare_files(Finder, force_root_Egg_info=self.bundle, bundle=self.bundle)
File "/usr/lib/python2.7/dist-packages/pip/req.py", line 1198, in prepare_files
do_download,
File "/usr/lib/python2.7/dist-packages/pip/req.py", line 1376, in unpack_url
self.session,
File "/usr/lib/python2.7/dist-packages/pip/download.py", line 572, in unpack_http_url
download_hash = _download_url(resp, link, temp_location)
File "/usr/lib/python2.7/dist-packages/pip/download.py", line 433, in _download_url
for chunk in resp_read(4096):
File "/usr/lib/python2.7/dist-packages/pip/download.py", line 421, in resp_read
chunk_size, decode_content=False):
File "/usr/lib/python2.7/dist-packages/urllib3/response.py", line 256, in stream
data = self.read(amt=amt, decode_content=decode_content)
File "/usr/lib/python2.7/dist-packages/urllib3/response.py", line 201, in read
raise ReadTimeoutError(self._pool, None, 'Read timed out.')
ReadTimeoutError: HTTPSConnectionPool(Host='pypi.python.org', port=443): Read timed out.
Storing debug log for failure in /root/.pip/pip.log'
Yaayy! J'ai trouvé la réponse. Il suffit d’utiliser le paramètre --default-timeout = 100 avec l’installation. par exemple
Sudo pip install --default-timeout=100 future