下载matplotlib报错
来源:1-6 Pandas、Numpy、Matplotlib实操

yoght
2025-03-16
下面是报错信息:
ERROR: Exception:
Traceback (most recent call last):
File “D:\anaconda3\envs\imooc_ai\Lib\site-packages\pip_vendor\urllib3\response.py”, line 438, in _error_catcher
yield
File “D:\anaconda3\envs\imooc_ai\Lib\site-packages\pip_vendor\urllib3\response.py”, line 561, in read
data = self._fp_read(amt) if not fp_closed else b""
^^^^^^^^^^^^^^^^^^
File “D:\anaconda3\envs\imooc_ai\Lib\site-packages\pip_vendor\urllib3\response.py”, line 527, in _fp_read
return self._fp.read(amt) if amt is not None else self._fp.read()
^^^^^^^^^^^^^^^^^^
File “D:\anaconda3\envs\imooc_ai\Lib\site-packages\pip_vendor\cachecontrol\filewrapper.py”, line 98, in read
data: bytes = self.__fp.read(amt)
^^^^^^^^^^^^^^^^^^^
File “D:\anaconda3\envs\imooc_ai\Lib\http\client.py”, line 479, in read
s = self.fp.read(amt)
^^^^^^^^^^^^^^^^^
File “D:\anaconda3\envs\imooc_ai\Lib\socket.py”, line 720, in readinto
return self._sock.recv_into(b)
^^^^^^^^^^^^^^^^^^^^^^^
File “D:\anaconda3\envs\imooc_ai\Lib\ssl.py”, line 1251, in recv_into
return self.read(nbytes, buffer)
^^^^^^^^^^^^^^^^^^^^^^^^^
File “D:\anaconda3\envs\imooc_ai\Lib\ssl.py”, line 1103, in read
return self._sslobj.read(len, buffer)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
TimeoutError: The read operation timed out
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File “D:\anaconda3\envs\imooc_ai\Lib\site-packages\pip_internal\cli\base_command.py”, line 106, in _run_wrapper
status = _inner_run()
^^^^^^^^^^^^
File “D:\anaconda3\envs\imooc_ai\Lib\site-packages\pip_internal\cli\base_command.py”, line 97, in _inner_run
return self.run(options, args)
^^^^^^^^^^^^^^^^^^^^^^^
File “D:\anaconda3\envs\imooc_ai\Lib\site-packages\pip_internal\cli\req_command.py”, line 67, in wrapper
return func(self, options, args)
^^^^^^^^^^^^^^^^^^^^^^^^^
File “D:\anaconda3\envs\imooc_ai\Lib\site-packages\pip_internal\commands\install.py”, line 386, in run
requirement_set = resolver.resolve(
^^^^^^^^^^^^^^^^^
File “D:\anaconda3\envs\imooc_ai\Lib\site-packages\pip_internal\resolution\resolvelib\resolver.py”, line 179, in resolve
self.factory.preparer.prepare_linked_requirements_more(reqs)
File “D:\anaconda3\envs\imooc_ai\Lib\site-packages\pip_internal\operations\prepare.py”, line 554, in prepare_linked_requirements_more
self._complete_partial_requirements(
File “D:\anaconda3\envs\imooc_ai\Lib\site-packages\pip_internal\operations\prepare.py”, line 469, in _complete_partial_requirements
for link, (filepath, _) in batch_download:
^^^^^^^^^^^^^^
File “D:\anaconda3\envs\imooc_ai\Lib\site-packages\pip_internal\network\download.py”, line 184, in call
for chunk in chunks:
^^^^^^
File “D:\anaconda3\envs\imooc_ai\Lib\site-packages\pip_internal\cli\progress_bars.py”, line 55, in _rich_progress_bar
for chunk in iterable:
^^^^^^^^
File “D:\anaconda3\envs\imooc_ai\Lib\site-packages\pip_internal\network\utils.py”, line 65, in response_chunks
for chunk in response.raw.stream(
^^^^^^^^^^^^^^^^^^^^
File “D:\anaconda3\envs\imooc_ai\Lib\site-packages\pip_vendor\urllib3\response.py”, line 622, in stream
data = self.read(amt=amt, decode_content=decode_content)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File “D:\anaconda3\envs\imooc_ai\Lib\site-packages\pip_vendor\urllib3\response.py”, line 560, in read
with self._error_catcher():
^^^^^^^^^^^^^^^^^^^^^
File “D:\anaconda3\envs\imooc_ai\Lib\contextlib.py”, line 158, in exit
self.gen.throw(value)
File “D:\anaconda3\envs\imooc_ai\Lib\site-packages\pip_vendor\urllib3\response.py”, line 443, in _error_catcher
raise ReadTimeoutError(self._pool, None, “Read timed out.”)
pip._vendor.urllib3.exceptions.ReadTimeoutError: HTTPSConnectionPool(host=‘files.pythonhosted.org’, port=443): Read timed out.
1回答
-
flare_zhao
2025-03-29
网络问题,试试换网络,或关闭vpn,或安转报的时候试用国内的镜像源。
pip install -i https://mirrors.tuna.tsinghua.edu.cn/pypi/web/simple matplotlib
00
相似问题