问题描述:
(MindSpore) C:\Users\wlc12>pip install https://ms-release.obs.cn-north-4.myhuaweicloud.com/1.7.0/MindSpore/cpu/x86_64/mindspore-1.7.0-cp37-cp37m-win_amd64.whl --trusted-host ms-release.obs.cn-north-4.myhuaweicloud.com -i https://pypi.tuna.tsinghua.edu.cn/simple
Looking in indexes: https://pypi.tuna.tsinghua.edu.cn/simple
Collecting mindspore==1.7.0
Downloading https://ms-release.obs.cn-north-4.myhuaweicloud.com/1.7.0/MindSpore/cpu/x86_64/mindspore-1.7.0-cp37-cp37m-win_amd64.whl (48.6 MB)
|███████████ | 16.8 MB 7.6 kB/s eta 1:09:26ERROR: Exception:
Traceback (most recent call last):
File "D:\Pr\envs\MindSpore\lib\site-packages\pip\_vendor\urllib3\response.py", line 438, in _error_catcher
yield
File "D:\Pr\envs\MindSpore\lib\site-packages\pip\_vendor\urllib3\response.py", line 519, in read
data = self._fp.read(amt) if not fp_closed else b""
File "D:\Pr\envs\MindSpore\lib\site-packages\pip\_vendor\cachecontrol\filewrapper.py", line 62, in read
data = self.__fp.read(amt)
File "D:\Pr\envs\MindSpore\lib\http\client.py", line 457, in read
n = self.readinto(b)
File "D:\Pr\envs\MindSpore\lib\http\client.py", line 501, in readinto
n = self.fp.readinto(b)
File "D:\Pr\envs\MindSpore\lib\socket.py", line 589, in readinto
return self._sock.recv_into(b)
File "D:\Pr\envs\MindSpore\lib\ssl.py", line 1071, in recv_into
return self.read(nbytes, buffer)
File "D:\Pr\envs\MindSpore\lib\ssl.py", line 929, in read
return self._sslobj.read(len, buffer)
socket.timeout: The read operation timed out
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "D:\Pr\envs\MindSpore\lib\site-packages\pip\_internal\cli\base_command.py", line 173, in _main
status = self.run(options, args)
File "D:\Pr\envs\MindSpore\lib\site-packages\pip\_internal\cli\req_command.py", line 203, in wrapper
return func(self, options, args)
File "D:\Pr\envs\MindSpore\lib\site-packages\pip\_internal\commands\install.py", line 316, in run
reqs, check_supported_wheels=not options.target_dir
File "D:\Pr\envs\MindSpore\lib\site-packages\pip\_internal\resolution\resolvelib\resolver.py", line 75, in resolve
collected = self.factory.collect_root_requirements(root_reqs)
File "D:\Pr\envs\MindSpore\lib\site-packages\pip\_internal\resolution\resolvelib\factory.py", line 473, in collect_root_requirements
requested_extras=(),
File "D:\Pr\envs\MindSpore\lib\site-packages\pip\_internal\resolution\resolvelib\factory.py", line 438, in _make_requirement_from_install_req
version=None,
File "D:\Pr\envs\MindSpore\lib\site-packages\pip\_internal\resolution\resolvelib\factory.py", line 209, in _make_candidate_from_link
version=version,
File "D:\Pr\envs\MindSpore\lib\site-packages\pip\_internal\resolution\resolvelib\candidates.py", line 301, in __init__
version=version,
File "D:\Pr\envs\MindSpore\lib\site-packages\pip\_internal\resolution\resolvelib\candidates.py", line 156, in __init__
self.dist = self._prepare()
File "D:\Pr\envs\MindSpore\lib\site-packages\pip\_internal\resolution\resolvelib\candidates.py", line 227, in _prepare
dist = self._prepare_distribution()
File "D:\Pr\envs\MindSpore\lib\site-packages\pip\_internal\resolution\resolvelib\candidates.py", line 306, in _prepare_distribution
self._ireq, parallel_builds=True
File "D:\Pr\envs\MindSpore\lib\site-packages\pip\_internal\operations\prepare.py", line 508, in prepare_linked_requirement
return self._prepare_linked_requirement(req, parallel_builds)
File "D:\Pr\envs\MindSpore\lib\site-packages\pip\_internal\operations\prepare.py", line 552, in _prepare_linked_requirement
self.download_dir, hashes
File "D:\Pr\envs\MindSpore\lib\site-packages\pip\_internal\operations\prepare.py", line 243, in unpack_url
hashes=hashes,
File "D:\Pr\envs\MindSpore\lib\site-packages\pip\_internal\operations\prepare.py", line 102, in get_http_url
from_path, content_type = download(link, temp_dir.path)
File "D:\Pr\envs\MindSpore\lib\site-packages\pip\_internal\network\download.py", line 145, in __call__
for chunk in chunks:
File "D:\Pr\envs\MindSpore\lib\site-packages\pip\_internal\cli\progress_bars.py", line 144, in iter
for x in it:
File "D:\Pr\envs\MindSpore\lib\site-packages\pip\_internal\network\utils.py", line 87, in response_chunks
decode_content=False,
File "D:\Pr\envs\MindSpore\lib\site-packages\pip\_vendor\urllib3\response.py", line 576, in stream
data = self.read(amt=amt, decode_content=decode_content)
File "D:\Pr\envs\MindSpore\lib\site-packages\pip\_vendor\urllib3\response.py", line 541, in read
raise IncompleteRead(self._fp_bytes_read, self.length_remaining)
File "D:\Pr\envs\MindSpore\lib\contextlib.py", line 130, in __exit__
self.gen.throw(type, value, traceback)
File "D:\Pr\envs\MindSpore\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='ms-release.obs.cn-north-4.myhuaweicloud.com', port=443): Read timed out.
【操作步骤&问题现象】
1、出现了如上错误
【截图信息】
解答:
建议可以在官网下载whl包重新安装:下载地址