我需要安装一个名为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安装时,会出现以下错误:
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上面说我在直接访问(没有代理服务器)
知道吗?
谢谢你的帮助。
发布于 2019-07-11 08:34:31
您的setup.py正在尝试下载setup.py中列出的一些需求,在本例中是pkgconfig。由于使用https会导致pypi的连接问题,所以失败了。尝试询问您的IT部门(当您在一家公司工作时,他们应该知道您是否需要配置一些特殊的东西),或者手动从PyPi下载pkgconfig。
https://stackoverflow.com/questions/56984682
复制相似问题