[英]Can't install H5PY library on Windows 10 - Python
我需要安裝一個名為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
它說我在直接訪問中(沒有代理服務器)
任何想法 ?
感謝您的幫助。
您的setup.py
試圖下載setup.py
中列出的一些要求,在本例中為pkgconfig
。 由於似乎存在使用https的pypi的連接問題,因此失敗。 嘗試詢問您的IT部門(當您在公司工作時,他們應該知道是否需要配置一些特殊的東西)或手動從PyPi下載pkgconfig。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.