python中安装pandas失败报错pip._vendor.urllib3.exceptions.ReadTimeoutError: HTTPSConnectionPool(host=‘files.

1.安装pandas安装

pip3 install pandas

报错如下:

 raise ReadTimeoutError(self._pool, None, "Read timed out.") pip._vendor.urllib3.exceptions.ReadTimeoutError: HTTPSConnectionPool(host='files.pythonhosted.org', port=443): Read timed out.

 

 2.解决办法:超时,需要更换镜像即可

pip3 install -i https://pypi.tuna.tsinghua.edu.cn/simple pandas

 安装成功后,导入后不报错

import pandas as pd

 

 

 

ERROR: Exception: Traceback (most recent call last): File "F:\anaconda\Lib\site-packages\pip\_vendor\urllib3\response.py", line 438, in _error_catcher yield File "F:\anaconda\Lib\site-packages\pip\_vendor\urllib3\response.py", line 561, in read data = self._fp_read(amt) if not fp_closed else b"" ^^^^^^^^^^^^^^^^^^ File "F:\anaconda\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 "F:\anaconda\Lib\site-packages\pip\_vendor\cachecontrol\filewrapper.py", line 98, in read data: bytes = self.__fp.read(amt) ^^^^^^^^^^^^^^^^^^^ File "F:\anaconda\Lib\http\client.py", line 479, in read s = self.fp.read(amt) ^^^^^^^^^^^^^^^^^ File "F:\anaconda\Lib\socket.py", line 707, in readinto return self._sock.recv_into(b) ^^^^^^^^^^^^^^^^^^^^^^^ File "F:\anaconda\Lib\ssl.py", line 1252, in recv_into return self.read(nbytes, buffer) ^^^^^^^^^^^^^^^^^^^^^^^^^ File "F:\anaconda\Lib\ssl.py", line 1104, 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 "F:\anaconda\Lib\site-packages\pip\_internal\cli\base_command.py", line 180, in exc_logging_wrapper status = run_func(*args) ^^^^^^^^^^^^^^^ File "F:\anaconda\Lib\site-packages\pip\_internal\cli\req_command.py", line 245, in wrapper return func(self, options, args) ^^^^^^^^^^^^^^^^^^^^^^^^^ File "F:\anaconda\Lib\site-packages\pip\_internal\commands\install.py", line 377, in run requirement_set = resolver.resolve( ^^^^^^^^^^^^^^^^^ File "F:\anaconda\Lib\site-packages\pip\_internal\resolution\resolvelib\resolver.py", line 179, in resolve self.factory.preparer.prepare_linked_requirements_more(reqs) File "F:\anaconda\Lib\site-packages\pip\_internal\operations\prepare.py", line 552, in prepare_linked_requirements_more self._complete_partial_requirements( File "F:\anaconda\Lib\site-packages\pip\_internal\operations\prepare.py", line 467, in _complete_partial_requirements for link, (filepath, _) in batch_download: File "F:\anaconda\Lib\site-packages\pip\_internal\network\download.py", line 183, in __call__ for chunk in chunks: File "F:\anaconda\Lib\site-packages\pip\_internal\cli\progress_bars.py", line 53, in _rich_progress_bar for chunk in iterable: File "F:\anaconda\Lib\site-packages\pip\_internal\network\utils.py", line 63, in response_chunks for chunk in response.raw.stream( File "F:\anaconda\Lib\site-packages\pip\_vendor\urllib3\response.py", line 622, in stream data = self.read(amt=amt, decode_content=decode_content) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "F:\anaconda\Lib\site-packages\pip\_vendor\urllib3\response.py", line 560, in read with self._error_catcher(): File "F:\anaconda\Lib\contextlib.py", line 158, in __exit__ self.gen.throw(value) File "F:\anaconda\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.
最新发布
05-23
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值