我试图使用带有代码"pipenv install python"的pipenv安装numpy,但它不断出现错误



我试图使用pipenv安装numpy,代码为"pipenv install python",但它不断出现错误。以下是我在尝试安装时在终端中获得的最后一个输出。有人可以帮我调试一下吗?

当我尝试安装 numpy 时,出现以下错误: 锁定失败! 回溯(最近一次调用(: 文件 "c:\users\calibest\appdata\local\programs\python\python38-32\lib\site-packages\pipenv\patchedotpip_vendor\urllib3\response.py",第 425 行,_error_catcher 屈服 文件 "c:\users\calibest\appdata\local\programs\python\python38-32\lib\site-packages\pipenv\patchedotpip_vendor\urllib3\response.py",第 507 行,读取中 data = self._fp.read(amt( 如果不是 fp_closed else b" 文件 "c:\users\calibest\appdata\local\programs\python\python38-32\lib\site-packages\pipenv\patchedotpip_vendor\cachecontrol\filewrapper.py",第 62 行,读取中 data = self.__fp.read(amt( 文件 "c:\users\calibest\appdata\local\programs\python\python38-32\lib\http\client.py",第 454 行,读取 n = self.readinto(b( 文件 "c:\users\calibest\appdata\local\programs\python\python38-32\lib\http\client.py",第 498 行,读入 n = self.fp.readinto(b( 文件 "c:\users\calibest\appdata\local\programs\python\python38-32\lib\socket.py",第 669 行,在 读入 return self._sock.recv_into(b( 文件"c:\users\calibest\appdata\local\programs\python\python38-32\lib\ssl.py",第 1241 行,recv_into 返回self.read(nbytes,buffer( 文件 "c:\users\calibest\appdata\local\programs\python\python38-32\lib\ssl.py",第 1099 行,正在读取 返回 self._sslobj.read(len, buffer( 套接字超时:读取操作超时

During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "c:/users/calibest/appdata/local/programs/python/python38-32/lib/site-packages/pipenv/resolver.py", line 807, in <module>
main()
File "c:/users/calibest/appdata/local/programs/python/python38-32/lib/site-packages/pipenv/resolver.py", line 802, in main
_main(parsed.pre, parsed.clear, parsed.verbose, parsed.system, parsed.write,
File "c:/users/calibest/appdata/local/programs/python/python38-32/lib/site-packages/pipenv/resolver.py", line 785, in _main
resolve_packages(pre, clear, verbose, system, write, requirements_dir, packages)
File "c:/users/calibest/appdata/local/programs/python/python38-32/lib/site-packages/pipenv/resolver.py", line 746, in resolve_packages
results, resolver = resolve(
File "c:/users/calibest/appdata/local/programs/python/python38-32/lib/site-packages/pipenv/resolver.py", line 728, in resolve
return resolve_deps(
File "c:userscalibestappdatalocalprogramspythonpython38-32libsite-packagespipenvutils.py", line 1378, in resolve_deps
results, hashes, markers_lookup, resolver, skipped = actually_resolve_deps(
File "c:userscalibestappdatalocalprogramspythonpython38-32libsite-packagespipenvutils.py", line 1093, in actually_resolve_deps
resolver.resolve()
File "c:userscalibestappdatalocalprogramspythonpython38-32libsite-packagespipenvutils.py", line 808, in resolve
results = self.resolver.resolve(max_rounds=environments.PIPENV_MAX_ROUNDS)
File "c:userscalibestappdatalocalprogramspythonpython38-32libsite-packagespipenvpatchedpiptoolsresolver.py", line 180, in resolve
has_changed, best_matches = self._resolve_one_round()
File "c:userscalibestappdatalocalprogramspythonpython38-32libsite-packagespipenvpatchedpiptoolsresolver.py", line 268, in _resolve_one_round
their_constraints.extend(self._iter_dependencies(best_match))
File "c:userscalibestappdatalocalprogramspythonpython38-32libsite-packagespipenvpatchedpiptoolsresolver.py", line 383, in _iter_dependencies
dependencies = self.repository.get_dependencies(ireq)
File "c:userscalibestappdatalocalprogramspythonpython38-32libsite-packagespipenvpatchedpiptoolsrepositoriespypi.py", line 226, in get_dependencies
legacy_results = self.get_legacy_dependencies(ireq)
File "c:userscalibestappdatalocalprogramspythonpython38-32libsite-packagespipenvpatchedpiptoolsrepositoriespypi.py", line 347, in get_legacy_dependencies
results, ireq = self.resolve_reqs(
File "c:userscalibestappdatalocalprogramspythonpython38-32libsite-packagespipenvpatchedpiptoolsrepositoriespypi.py", line 303, in resolve_reqs
results = resolver._resolve_one(reqset, ireq)
File "c:userscalibestappdatalocalprogramspythonpython38-32libsite-packagespipenvpatchednotpip_internallegacy_resolve.py", line 339, in _resolve_one
abstract_dist = self._get_abstract_dist_for(req_to_install)
File "c:userscalibestappdatalocalprogramspythonpython38-32libsite-packagespipenvpatchednotpip_internallegacy_resolve.py", line 287, in _get_abstract_dist_for
abstract_dist = self.preparer.prepare_linked_requirement(req)
File "c:userscalibestappdatalocalprogramspythonpython38-32libsite-packagespipenvpatchednotpip_internaloperationsprepare.py", line 473, in prepare_linked_requirement
local_path = unpack_url(
File "c:userscalibestappdatalocalprogramspythonpython38-32libsite-packagespipenvpatchednotpip_internaloperationsprepare.py", line 282, in unpack_url
return unpack_http_url(
File "c:userscalibestappdatalocalprogramspythonpython38-32libsite-packagespipenvpatchednotpip_internaloperationsprepare.py", line 158, in unpack_http_url
from_path, content_type = _download_http_url(
File "c:userscalibestappdatalocalprogramspythonpython38-32libsite-packagespipenvpatchednotpip_internaloperationsprepare.py", line 303, in _download_http_url
for chunk in download.chunks:
File "c:userscalibestappdatalocalprogramspythonpython38-32libsite-packagespipenvpatchednotpip_internalnetworkutils.py", line 15, in response_chunks
for chunk in response.raw.stream(
File "c:userscalibestappdatalocalprogramspythonpython38-32libsite-packagespipenvpatchednotpip_vendorurllib3response.py", line 564, in stream
data = self.read(amt=amt, decode_content=decode_content)
File "c:userscalibestappdatalocalprogramspythonpython38-32libsite-packagespipenvpatchednotpip_vendorurllib3response.py", line 529, in read
raise IncompleteRead(self._fp_bytes_read, self.length_remaining)
File "c:userscalibestappdatalocalprogramspythonpython38-32libcontextlib.py", line 131, in __exit__
self.gen.throw(type, value, traceback)
File "c:userscalibestappdatalocalprogramspythonpython38-32libsite-packagespipenvpatchednotpip_vendorurllib3response.py", line 430, in _error_catcher
raise ReadTimeoutError(self._pool, None, "Read timed out.")
pipenv.patched.notpip._vendor.urllib3.exceptions.ReadTimeoutError: HTTPSConnectionPool(host='files.pythonhosted.org', port=443): Read timed out.

默认情况下应该安装Python。尝试使用pipenv --py查看 python 解释器的安装位置的详细信息。

最新更新