Python安装lz4-0.10.1遇到的坑
发布时间:2020-05-30 01:12:03 所属栏目:Python 来源:互联网
导读:因为项目的需求,要lz4.0.10.1的,因为本机已经有一个1.1.0版本的,所以必须先卸掉,然后我差点没疯了(手动微笑)
|
因为项目的需求,要 lz4.0.10.1 的,因为本机已经有一个 1.1.0 版本的,所以必须先卸掉,然后我差点没疯了(手动微笑) sudo pip uninstall lz4 Uninstalling lz4-1.1.0: /Library/Python/2.7/site-packages/lz4-1.1.0-py2.7.egg-info /Library/Python/2.7/site-packages/lz4/__init__.py /Library/Python/2.7/site-packages/lz4/__init__.pyc /Library/Python/2.7/site-packages/lz4/block/__init__.py /Library/Python/2.7/site-packages/lz4/block/__init__.pyc /Library/Python/2.7/site-packages/lz4/frame/__init__.py /Library/Python/2.7/site-packages/lz4/frame/__init__.pyc /Library/Python/2.7/site-packages/lz4/frame/_compression.py /Library/Python/2.7/site-packages/lz4/frame/_compression.pyc /Library/Python/2.7/site-packages/lz4/version.py /Library/Python/2.7/site-packages/lz4/version.pyc Proceed (y/n)? y Successfully uninstalled lz4-1.1.0 准备愉快地装上 0.10.1 sudo pip install lz4==0.10.1
Collecting lz4==0.10.1
Downloading https://files.pythonhosted.org/packages/f5/c6/ef2890b5e287735576e15c1389aa0b9032c9d78ed72385fbd1149af593cd/lz4-0.10.1.tar.gz (92kB)
100% || 92kB 1.8MB/s
Complete output from command python setup.py egg_info:
Couldn't find index page for 'setuptools_scm' (maybe misspelled?)
No local packages or download links found for setuptools-scm
Traceback (most recent call last):
File "<string>",line 1,in <module>
File "/private/tmp/pip-build-0IKxUP/lz4/setup.py",line 180,in <module>
'Programming Language :: Python :: 3.6',File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/distutils/core.py",line 111,in setup
_setup_distribution = dist = klass(attrs)
File "/Library/Python/2.7/site-packages/distribute-0.6.28-py2.7.egg/setuptools/dist.py",line 221,in __init__
self.fetch_build_eggs(attrs.pop('setup_requires'))
File "/Library/Python/2.7/site-packages/distribute-0.6.28-py2.7.egg/setuptools/dist.py",line 245,in fetch_build_eggs
parse_requirements(requires),installer=self.fetch_build_egg
File "/Library/Python/2.7/site-packages/distribute-0.6.28-py2.7.egg/pkg_resources.py",line 580,in resolve
dist = best[req.key] = env.best_match(req,self,installer)
File "/Library/Python/2.7/site-packages/distribute-0.6.28-py2.7.egg/pkg_resources.py",line 825,in best_match
return self.obtain(req,installer) # try and download/install
File "/Library/Python/2.7/site-packages/distribute-0.6.28-py2.7.egg/pkg_resources.py",line 837,in obtain
return installer(requirement)
File "/Library/Python/2.7/site-packages/distribute-0.6.28-py2.7.egg/setuptools/dist.py",line 294,in fetch_build_egg
return cmd.easy_install(req)
File "/Library/Python/2.7/site-packages/distribute-0.6.28-py2.7.egg/setuptools/command/easy_install.py",line 592,in easy_install
raise DistutilsError(msg)
distutils.errors.DistutilsError: Could not find suitable distribution for Requirement.parse('setuptools-scm')
咦,需要装这个包setuptools-scm,直接无脑装 sudo pip install setuptools-scm Collecting setuptools-scm Downloading https://files.pythonhosted.org/packages/4d/a0/371355cbd608ef1d865738b94f7681e2fe56ef951070a66a892f30042a86/setuptools_scm-2.1.0-py2.py3-none-any.whl Installing collected packages: setuptools-scm Successfully installed setuptools-scm-2.1.0 继续装我的 lz4 sudo pip install lz4==0.10.1
Collecting lz4==0.10.1
Downloading https://files.pythonhosted.org/packages/f5/c6/ef2890b5e287735576e15c1389aa0b9032c9d78ed72385fbd1149af593cd/lz4-0.10.1.tar.gz (92kB)
100% || 92kB 2.0MB/s
Complete output from command python setup.py egg_info:
Traceback (most recent call last):
File "<string>",in <module>
File "/private/tmp/pip-build-Cc2Av_/lz4/setup.py",line 225,in __init__
_Distribution.__init__(self,attrs)
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/distutils/dist.py",line 287,in __init__
self.finalize_options()
File "/Library/Python/2.7/site-packages/distribute-0.6.28-py2.7.egg/setuptools/dist.py",line 258,in finalize_options
ep.load()(self,ep.name,value)
File "/Library/Python/2.7/site-packages/setuptools_scm/integration.py",line 10,in version_keyword
_warn_if_setuptools_outdated()
File "/Library/Python/2.7/site-packages/setuptools_scm/version.py",line 44,in _warn_if_setuptools_outdated
warnings.warn("your setuptools is too old (<12)",SetuptoolsOutdatedWarning)
setuptools_scm.version.SetuptoolsOutdatedWarning: your setuptools is too old (<12)
----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in /private/tmp/pip-build-Cc2Av_/lz4/
我天。。隐约察觉到有点不对劲,这什么鬼。。 too old ?? 所以要我先升级下? sudo pip install --upgrade setuptools Collecting setuptools Downloading https://files.pythonhosted.org/packages/8c/10/79282747f9169f21c053c562a0baa21815a8c7879be97abd930dbcf862e8/setuptools-39.1.0-py2.py3-none-any.whl (566kB) 100% || 573kB 1.6MB/s Installing collected packages: setuptools Found existing installation: setuptools 18.5 Uninstalling setuptools-18.5: Successfully uninstalled setuptools-18.5 Successfully installed setuptools-39.1.0 这次没毛病了吧? 装我的 lz4 sudo pip install lz4==0.10.1 Collecting lz4==0.10.1 Downloading https://files.pythonhosted.org/packages/f5/c6/ef2890b5e287735576e15c1389aa0b9032c9d78ed72385fbd1149af593cd/lz4-0.10.1.tar.gz (92kB) 100% || 92kB 1.1MB/s Complete output from command python setup.py egg_info: Traceback (most recent call last): File "<string>",in <module> File "/private/tmp/pip-build-ML2zwz/lz4/setup.py",SetuptoolsOutdatedWarning) setuptools_scm.version.SetuptoolsOutdatedWarning: your setuptools is too old (<12) ---------------------------------------- Command "python setup.py egg_info" failed with error code 1 in /private/tmp/pip-build-ML2zwz/lz4/ 又是 too old ??这样真的很迷。。赶紧谷歌了下,尝试了好几次,还是这个坑爹结果。 突然发现一个博文提到一个很神奇的语句, 不管了先试下: sudo pip install -U pip setuptools wheel Collecting pip Downloading https://files.pythonhosted.org/packages/0f/74/ecd13431bcc456ed390b44c8a6e917c1820365cbebcb6a8974d1cd045ab4/pip-10.0.1-py2.py3-none-any.whl (1.3MB) 100% || 1.3MB 804kB/s Requirement already up-to-date: setuptools in /Library/Python/2.7/site-packages Collecting wheel Downloading https://files.pythonhosted.org/packages/81/30/e935244ca6165187ae8be876b6316ae201b71485538ffac1d718843025a9/wheel-0.31.1-py2.py3-none-any.whl (41kB) 100% || 51kB 5.0MB/s Installing collected packages: pip,wheel Found existing installation: pip 9.0.1 Uninstalling pip-9.0.1: Successfully uninstalled pip-9.0.1 Successfully installed pip-10.0.1 wheel-0.31.1 抱着一些幻想,再装下我的 lz4,结果很明显,幻想就是幻想,还是报的神奇的too old... 对比了线上的机器,发现人家根本就没装那个 setuptools_scm,要不试下卸载了? 说干就干: sudo pip uninstall setuptools_scm Uninstalling setuptools-scm-2.1.0: Would remove: /Library/Python/2.7/site-packages/setuptools_scm-2.1.0.dist-info/* /Library/Python/2.7/site-packages/setuptools_scm/* Proceed (y/n)? y Successfully uninstalled setuptools-scm-2.1.0 sudo pip install lz4==0.10.1
Traceback (most recent call last):
File "setup.py",in <module>
'Programming Language :: Python :: 3.6',in setup
_setup_distribution = dist = klass(attrs)
File "/Library/Python/2.7/site-packages/distribute-0.6.28-py2.7.egg/setuptools/dist.py",in __init__
self.fetch_build_eggs(attrs.pop('setup_requires'))
File "/Library/Python/2.7/site-packages/distribute-0.6.28-py2.7.egg/setuptools/dist.py",in fetch_build_eggs
parse_requirements(requires),installer=self.fetch_build_egg
File "/Library/Python/2.7/site-packages/distribute-0.6.28-py2.7.egg/pkg_resources.py",in resolve
dist = best[req.key] = env.best_match(req,installer)
File "/Library/Python/2.7/site-packages/distribute-0.6.28-py2.7.egg/pkg_resources.py",in best_match
return self.obtain(req,installer) # try and download/install
File "/Library/Python/2.7/site-packages/distribute-0.6.28-py2.7.egg/pkg_resources.py",in obtain
return installer(requirement)
File "/Library/Python/2.7/site-packages/distribute-0.6.28-py2.7.egg/setuptools/dist.py",line 272,in fetch_build_egg
dist = self.__class__({'script_args':['easy_install']})
File "/Library/Python/2.7/site-packages/distribute-0.6.28-py2.7.egg/setuptools/dist.py",in __init__
_Distribution.__init__(self,attrs)
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/distutils/dist.py",in __init__
self.finalize_options()
File "/Library/Python/2.7/site-packages/distribute-0.6.28-py2.7.egg/setuptools/dist.py",line 257,in finalize_options
ep.require(installer=self.fetch_build_egg)
File "/Library/Python/2.7/site-packages/distribute-0.6.28-py2.7.egg/pkg_resources.py",line 2029,in require
working_set.resolve(self.dist.requires(self.extras),env,installer))
File "/Library/Python/2.7/site-packages/distribute-0.6.28-py2.7.egg/pkg_resources.py",in resolve
raise VersionConflict(dist,req) # XXX put more info here
pkg_resources.VersionConflict: (certifi 2017.4.17 (/Library/Python/2.7/site-packages),Requirement.parse('certifi==2016.9.26'))
(编辑:安卓应用网) 【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容! |
