linux下python使用easy_install_Could not find suitable distribution处理

本文介绍了在CentOS系统中安装Django过程中遇到的问题及解决方法。主要问题为下载Django时报错,通过安装openssl-devel并重新编译安装Python来解决。

 

 

背景:

centos下安装easy_intall后,使用下载 django报错,错误信息如下:

 

 

Download error on https://pypi.python.org/simple/: unknown url type: https -- Some packages may not be found!
No local packages or download links found for django

error: Could not find suitable distribution for Requirement.parse('django')

 

解决办法

 

1.yum install openssl-devel
2.重新编译安装python  (进入python安装好的目录,重新执行make后,在执行make install命令)
3.easy_install django

 

安装成功如下:

Installed /usr/local/python/lib/python2.7/site-packages/Django-1.6.5-py2.7.egg
Processing dependencies for django
Finished processing dependencies for django

 

 

Complete output from command python setup.py egg_info: Couldn't find index page for 'pbr' (maybe misspelled?) No local packages or download links found for pbr Traceback (most recent call last): File "<string>", line 1, in <module> File "/tmp/pip-build-cZ8DNR/virtualenvwrapper/setup.py", line 7, in <module> pbr=True, File "/usr/lib64/python2.7/distutils/core.py", line 112, in setup _setup_distribution = dist = klass(attrs) File "/usr/lib/python2.7/site-packages/setuptools/dist.py", line 265, in __init__ self.fetch_build_eggs(attrs.pop('setup_requires')) File "/usr/lib/python2.7/site-packages/setuptools/dist.py", line 289, in fetch_build_eggs parse_requirements(requires), installer=self.fetch_build_egg File "/usr/lib/python2.7/site-packages/pkg_resources.py", line 618, in resolve dist = best[req.key] = env.best_match(req, self, installer) File "/usr/lib/python2.7/site-packages/pkg_resources.py", line 862, in best_match return self.obtain(req, installer) # try and download/install File "/usr/lib/python2.7/site-packages/pkg_resources.py", line 874, in obtain return installer(requirement) File "/usr/lib/python2.7/site-packages/setuptools/dist.py", line 339, in fetch_build_egg return cmd.easy_install(req) File "/usr/lib/python2.7/site-packages/setuptools/command/easy_install.py", line 617, in easy_install raise DistutilsError(msg) distutils.errors.DistutilsError: Could not find suitable distribution for Requirement.parse('pbr') ---------------------------------------- Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-build-cZ8DNR/virtualenvwrapper/ 出现了什么错误?该如何解决?
07-25
D:\UserData\Downloads>easy_install -Z pysat-6.0.6_r0_20240527-py3.7.egg Processing pysat-6.0.6_r0_20240527-py3.7.egg removing 'd:\python37\lib\site-packages\pysat-6.0.6_r0_20240527-py3.7.egg' (and everything under it) creating d:\python37\lib\site-packages\pysat-6.0.6_r0_20240527-py3.7.egg Extracting pysat-6.0.6_r0_20240527-py3.7.egg to d:\python37\lib\site-packages pysat 6.0.6-r0-20240527 is already the active version in easy-install.pth Installing pysat-admin-script.py script to d:\python37\Scripts Installing pysat-admin.exe script to d:\python37\Scripts Installing pysat-admin.exe.manifest script to d:\python37\Scripts Installed d:\python37\lib\site-packages\pysat-6.0.6_r0_20240527-py3.7.egg Processing dependencies for pysat===6.0.6-r0-20240527 Searching for PyQt5==5.15.1 Reading http://rdsource.tp-link.com/pypi/simple/PyQt5/ Couldn't find index page for 'PyQt5' (maybe misspelled?) Scanning index of all packages (this may take a while) Reading http://rdsource.tp-link.com/pypi/simple/ Reading http://rdsource.tp-link.com/pypi/simple/pyqt5/ Downloading http://rdsource.tp-link.com/pypi/packages/pyqt5/5.15.1/PyQt5-5.15.1-5.15.1-cp35.cp36.cp37.cp38.cp39-none-win32.whl#sha256=4e47021c2b8e89a3bc64247dfb224144e5c8d77e3ab44f3842d120aab6b3cbd4 Best match: PyQt5 5.15.1 Processing PyQt5-5.15.1-5.15.1-cp35.cp36.cp37.cp38.cp39-none-win32.whl Installing PyQt5-5.15.1-5.15.1-cp35.cp36.cp37.cp38.cp39-none-win32.whl to d:\python37\lib\site-packages writing requirements to d:\python37\lib\site-packages\PyQt5-5.15.1-py3.7-win32.egg\EGG-INFO\requires.txt Adding PyQt5 5.15.1 to easy-install.pth file Installing pylupdate5-script.py script to d:\python37\Scripts Installing pylupdate5.exe script to d:\python37\Scripts Installing pylupdate5.exe.manifest script to d:\python37\Scripts Installing pyrcc5-script.py script to d:\python37\Scripts Installing pyrcc5.exe script to d:\python37\Scripts Installing pyrcc5.exe.manifest script to d:\python37\Scripts Installing pyuic5-script.py script to d:\python37\Scripts Installing pyuic5.exe script to d:\python37\Scripts Installing pyuic5.exe.manifest script to d:\python37\Scripts Installed d:\python37\lib\site-packages\pyqt5-5.15.1-py3.7-win32.egg Searching for schedule==0.6.0 Reading http://rdsource.tp-link.com/pypi/simple/schedule/ Downloading http://rdsource.tp-link.com/pypi/packages/schedule/0.6.0/schedule-0.6.0-py2.py3-none-any.whl#sha256=3f895a1036799a25ab9c335de917073e63cf8256920917e932777382f101f08f Best match: schedule 0.6.0 Processing schedule-0.6.0-py2.py3-none-any.whl Installing schedule-0.6.0-py2.py3-none-any.whl to d:\python37\lib\site-packages Adding schedule 0.6.0 to easy-install.pth file Installed d:\python37\lib\site-packages\schedule-0.6.0-py3.7.egg Searching for jsonrpclib-pelix==0.4.0 Reading http://rdsource.tp-link.com/pypi/simple/jsonrpclib-pelix/ Downloading http://rdsource.tp-link.com/pypi/packages/jsonrpclib-pelix/0.4.0/jsonrpclib_pelix-0.4.0-py2.py3-none-any.whl#sha256=a966d17f2f739ee89031cf5c807d85d92db6b2715fb2b2f8a88bbfc87f468b12 Best match: jsonrpclib-pelix 0.4.0 Processing jsonrpclib_pelix-0.4.0-py2.py3-none-any.whl Installing jsonrpclib_pelix-0.4.0-py2.py3-none-any.whl to d:\python37\lib\site-packages Adding jsonrpclib-pelix 0.4.0 to easy-install.pth file Installed d:\python37\lib\site-packages\jsonrpclib_pelix-0.4.0-py3.7.egg Searching for zope.interface==4.7.1 Reading http://rdsource.tp-link.com/pypi/simple/zope.interface/ Couldn't find index page for 'zope.interface' (maybe misspelled?) No local packages or working download links found for zope.interface==4.7.1 error: Could not find suitable distribution for Requirement.parse('zope.interface==4.7.1')
最新发布
08-09
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值