1
我正在嘗試安裝linecache2,它具有pbr的先決條件。python setup.py install - 已經安裝了一個軟件包,它爲什麼要搜索pypi來安裝它?
我去的PyPI,並通過下載並運行setup.py建立,因爲我在防火牆後面安裝PBR:
cd C:\Users\<user_name>\Downloads\pbr-1.5.0\pbr-1.5.0
python setup.py build
然後我去linecache,並試圖用同樣的方法進行安裝:
cd C:\Users\<user_name>\Downloads\linecache2-1.0.0\linecache2-1.0.0
python setup.py build
然而,輸出:
Download error on https://pypi.python.org/simple/pbr/: timed out -- Some packages may not be found!
Couldn't find index page for 'pbr' (maybe misspelled?)
Download error on https://pypi.python.org/simple/: timed out -- Some packages may not be found!
No local packages or download links found for pbr
Traceback (most recent call last):
File "setup.py", line 5, in <module>
pbr=True)
File "C:\Python27\lib\distutils\core.py", line 111, in setup
_setup_distribution = dist = klass(attrs)
File "C:\Python27\lib\site-packages\setuptools\dist.py", line 268, in __init__
self.fetch_build_eggs(attrs['setup_requires'])
File "C:\Python27\lib\site-packages\setuptools\dist.py", line 313, in fetch_build_eggs
replace_conflicting=True,
File "C:\Python27\lib\site-packages\pkg_resources\__init__.py", line 830, in resolve
dist = best[req.key] = env.best_match(req, ws, installer)
File "C:\Python27\lib\site-packages\pkg_resources\__init__.py", line 1075, in best_match
return self.obtain(req, installer)
File "C:\Python27\lib\site-packages\pkg_resources\__init__.py", line 1087, in obtain
return installer(requirement)
File "C:\Python27\lib\site-packages\setuptools\dist.py", line 380, in fetch_build_egg
return cmd.easy_install(req)
File "C:\Python27\lib\site-packages\setuptools\command\easy_install.py", line 623, in easy_install
raise DistutilsError(msg)
distutils.errors.DistutilsError: Could not find suitable distribution for Requirement.parse('pbr')
因爲我已經有PBR,爲什麼它試圖去尋找pbr?
任何幫助,非常感謝!謝謝!
廢話............ – user1157751
工作........? –
是的,不知怎的,我忘了那一步:( – user1157751