我需要安装一个名为 h5py 的lb,但是当我尝试使用这些命令将其安装到Powershell中时,它不起作用:
pip.exe install h5py
pip install libhdf5-dev
这是我第二次在Windows上工作,我不知道如何解决此错误:
PS C:\Users\UIC01685\Desktop\h5py-master> pip.exe install h5py
Collecting h5py
Retrying (Retry(total=4, connect=None, read=None, redirect=None)) after connection broken by 'ConnectTimeoutError(<pip._vendor.requests.packages.urllib3.connection.VerifiedHTTPSConnection object at 0x03483CD0>, 'Connection to pypi.python.org timed out. (connect timeout=15)')': /simple/h5py/
Retrying (Retry(total=3, connect=None, read=None, redirect=None)) after connection broken by 'ConnectTimeoutError(<pip._vendor.requests.packages.urllib3.connection.VerifiedHTTPSConnection object at 0x03483E30>, 'Connection to pypi.python.org timed out. (connect timeout=15)')': /simple/h5py/
Retrying (Retry(total=2, connect=None, read=None, redirect=None)) after connection broken by 'ConnectTimeoutError(<pip._vendor.requests.packages.urllib3.connection.VerifiedHTTPSConnection object at 0x03483F10>, 'Connection to pypi.python.org timed out. (connect timeout=15)')': /simple/h5py/
Retrying (Retry(total=1, connect=None, read=None, redirect=None)) after connection broken by 'ConnectTimeoutError(<pip._vendor.requests.packages.urllib3.connection.VerifiedHTTPSConnection object at 0x034DF030>, 'Connection to pypi.python.org timed out. (connect timeout=15)')': /simple/h5py/
Retrying (Retry(total=0, connect=None, read=None, redirect=None)) after connection broken by 'ConnectTimeoutError(<pip._vendor.requests.packages.urllib3.connection.VerifiedHTTPSConnection object at 0x034DF130>, 'Connection to pypi.python.org timed out. (connect timeout=15)')': /simple/h5py/
Could not find a version that satisfies the requirement h5py (from versions: )
No matching distribution found for h5py
PS C:\Users\UIC01685\Desktop\h5py-master> pip install libhdf5-dev
Collecting libhdf5-dev
Retrying (Retry(total=4, connect=None, read=None, redirect=None)) after connection broken by 'ConnectTimeoutError(<pip._vendor.requests.packages.urllib3.connection.VerifiedHTTPSConnection object at 0x03D48CF0>, 'Connection to pypi.python.org timed out. (connect timeout=15)')': /simple/libhdf5-dev/
Retrying (Retry(total=3, connect=None, read=None, redirect=None)) after connection broken by 'ConnectTimeoutError(<pip._vendor.requests.packages.urllib3.connection.VerifiedHTTPSConnection object at 0x03D48E50>, 'Connection to pypi.python.org timed out. (connect timeout=15)')': /simple/libhdf5-dev/
Retrying (Retry(total=2, connect=None, read=None, redirect=None)) after connection broken by 'ConnectTimeoutError(<pip._vendor.requests.packages.urllib3.connection.VerifiedHTTPSConnection object at 0x03D48F30>, 'Connection to pypi.python.org timed out. (connect timeout=15)')': /simple/libhdf5-dev/
Retrying (Retry(total=1, connect=None, read=None, redirect=None)) after connection broken by 'ConnectTimeoutError(<pip._vendor.requests.packages.urllib3.connection.VerifiedHTTPSConnection object at 0x03DA5050>, 'Connection to pypi.python.org timed out. (connect timeout=15)')': /simple/libhdf5-dev/
Retrying (Retry(total=0, connect=None, read=None, redirect=None)) after connection broken by 'ConnectTimeoutError(<pip._vendor.requests.packages.urllib3.connection.VerifiedHTTPSConnection object at 0x03DA5150>, 'Connection to pypi.python.org timed out. (connect timeout=15)')': /simple/libhdf5-dev/
Could not find a version that satisfies the requirement libhdf5-dev (from versions: )
No matching distribution found for libhdf5-dev
我也尝试通过下载源代码进行安装,但是当我运行 python.exe。\ setup.py install 时,出现此错误:
PS C:\Users\UIC01685\Desktop\h5py-master> python.exe .\setup.py install
Download error on https://pypi.python.org/simple/pkgconfig/: timed out -- Some packages may not be found!
Couldn't find index page for 'pkgconfig' (maybe misspelled?)
Download error on https://pypi.python.org/simple/: timed out -- Some packages may not be found!
No local packages or working download links found for pkgconfig
Traceback (most recent call last):
File ".\setup.py", line 155, in <module>
cmdclass = CMDCLASS,
File "C:\LegacyApp\AMESim\R19SL1\Amesim\sys\python\win64\lib\site-packages\setuptools\__init__.py", line 128, in setup
_install_setup_requires(attrs)
File "C:\LegacyApp\AMESim\R19SL1\Amesim\sys\python\win64\lib\site-packages\setuptools\__init__.py", line 123, in _install_setup_requires
dist.fetch_build_eggs(dist.setup_requires)
File "C:\LegacyApp\AMESim\R19SL1\Amesim\sys\python\win64\lib\site-packages\setuptools\dist.py", line 513, in fetch_build_eggs
replace_conflicting=True,
File "C:\LegacyApp\AMESim\R19SL1\Amesim\sys\python\win64\lib\site-packages\pkg_resources\__init__.py", line 774, in resolve
replace_conflicting=replace_conflicting
File "C:\LegacyApp\AMESim\R19SL1\Amesim\sys\python\win64\lib\site-packages\pkg_resources\__init__.py", line 1057, in best_match
return self.obtain(req, installer)
File "C:\LegacyApp\AMESim\R19SL1\Amesim\sys\python\win64\lib\site-packages\pkg_resources\__init__.py", line 1069, in obtain
return installer(requirement)
File "C:\LegacyApp\AMESim\R19SL1\Amesim\sys\python\win64\lib\site-packages\setuptools\dist.py", line 580, in fetch_build_egg
return cmd.easy_install(req)
File "C:\LegacyApp\AMESim\R19SL1\Amesim\sys\python\win64\lib\site-packages\setuptools\command\easy_install.py", line 667, in easy_install
raise DistutilsError(msg)
distutils.errors.DistutilsError: Could not find suitable distribution for Requirement.parse('pkgconfig')
我在一家大公司工作,但受到一些限制,所以我检查了我是否有代理,并在cmd中运行此命令行:
netsh winhttp show proxy
它表示我处于直接访问权限(无代理服务器)
有什么想法吗?
感谢您的帮助。
答案 0 :(得分:2)
您的setup.py
试图下载setup.py
中列出的某些要求,在本例中为pkgconfig
。由于似乎存在使用https的pypi的连接问题,因此失败。尝试询问您的IT部门(当您在公司工作时,他们应该知道是否需要配置一些特殊的东西)或手动从PyPi下载pkgconfig。