Python安装lz4-0.10.1遇到的坑

因为项目的需求,要 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>", line 1, in <module>
  File "/private/tmp/pip-build-Cc2Av_/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 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>", line 1, in <module>
  File "/private/tmp/pip-build-ML2zwz/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 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-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", 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 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", 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 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", line 592, 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'))

咦,报错终于不是 too old 了,看来还真是那坑爹货的问题。既然说certifi版本不符合,那就重装下吧

sudo pip install certifi==2016.9.26
Collecting certifi==2016.9.26
 Downloading https://files.pythonhosted.org/packages/a2/35/b7b457c95fdd661d4c179201e9e58a2181934695943b08ccfcba09284b4e/certifi-2016.9.26-py2.py3-none-any.whl (377kB)
 100% |████████████████████████████████| 378kB 4.4MB/s
requests 2.18.1 has requirement certifi>=2017.4.17, but you'll have certifi 2016.9.26 which is incompatible.
Installing collected packages: certifi
 Found existing installation: certifi 2017.4.17
 Uninstalling certifi-2017.4.17:
  Successfully uninstalled certifi-2017.4.17
Successfully installed certifi-2016.9.26

然后就继续安装咯,

sudo pip install lz4==0.10.1
Traceback (most recent call last):
 File "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
 .....
 .... (日志真的太多了)
 File "/Library/Python/2.7/site-packages/distribute-0.6.28-py2.7.egg/pkg_resources.py", line 2130, in __init__
 self._version = safe_version(version)
 File "/Library/Python/2.7/site-packages/distribute-0.6.28-py2.7.egg/pkg_resources.py", line 1149, in safe_version
 return re.sub('[^A-Za-z0-9.]+', '-', version)
 File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/re.py", line 155, in sub
 return _compile(pattern, flags).sub(repl, string, count)
 File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/re.py", line 237, in _compile
 p, loc = _cache[cachekey]
RuntimeError: maximum recursion depth exceeded in cmp

瞬间懵逼.. maximum recursion 最大递归错误都出现了。。直接谷歌,有人安装下get-pip-py`, 并没用

折腾好几次,还是这个问题, 仔细想了想这个是在安装了那个 certifi-2016.9.26之后出现的,会不会就是这个库本身的缺陷?

还是先更新到 certifi==2017.4.17 再看看,毫无疑问,肯定就是又会出现那个错误:

pkg_resources.VersionConflict: (certifi 2017.4.17 (/Library/Python/2.7/site-packages), Requirement.parse('certifi==2016.9.26'))

然后针对这个问题谷歌,查了好久,看到一个博主说,之前遇到相似的问题,原因就是他的distribute版本太老,尝试升级下这个库版本。

因为本身有安装,所以我们需要指定最新版本或者升级,直接去Pypi看看最新版本是什么?

Pypi地址:https://pypi.org/project/distribute/

看到最新版本是:distribute 0.7.3,所以直接安装

sudo pip install distribute==0.7.3
Collecting distribute==0.7.3
 Downloading https://files.pythonhosted.org/packages/5f/ad/1fde06877a8d7d5c9b60eff7de2d452f639916ae1d48f0b8f97bf97e570a/distribute-0.7.3.zip (145kB)
 100% |████████████████████████████████| 153kB 4.5MB/s
Installing collected packages: distribute
 Found existing installation: distribute 0.6.28
 Uninstalling distribute-0.6.28:
  Successfully uninstalled distribute-0.6.28
 Running setup.py install for distribute ... done
Successfully installed distribute-0.7.3

最后再安装下:

sudo pip install lz4==0.10.1
running install
running bdist_egg
running egg_info
writing lz4.egg-info/PKG-INFO
writing top-level names to lz4.egg-info/top_level.txt
writing dependency_links to lz4.egg-info/dependency_links.txt
reading manifest file 'lz4.egg-info/SOURCES.txt'
reading manifest template 'MANIFEST.in'
warning: no files found matching 'src/*.h'
warning: no previously-included files found matching 'tests/*.pyc'
writing manifest file 'lz4.egg-info/SOURCES.txt'
installing library code to build/bdist.macosx-10.13-intel/egg
running install_lib
running build_py
creating build
creating build/lib.macosx-10.13-intel-2.7
creating build/lib.macosx-10.13-intel-2.7/lz4
copying lz4/version.py -> build/lib.macosx-10.13-intel-2.7/lz4
copying lz4/deprecated.py -> build/lib.macosx-10.13-intel-2.7/lz4
copying lz4/__init__.py -> build/lib.macosx-10.13-intel-2.7/lz4
copying lz4/lz4version.py -> build/lib.macosx-10.13-intel-2.7/lz4
creating build/lib.macosx-10.13-intel-2.7/lz4/frame
copying lz4/frame/__init__.py -> build/lib.macosx-10.13-intel-2.7/lz4/frame
creating build/lib.macosx-10.13-intel-2.7/lz4/block
copying lz4/block/__init__.py -> build/lib.macosx-10.13-intel-2.7/lz4/block
running build_ext
building 'lz4._version' extension
creating build/temp.macosx-10.13-intel-2.7
creating build/temp.macosx-10.13-intel-2.7/lz4
creating build/temp.macosx-10.13-intel-2.7/lz4libs
cc -fno-strict-aliasing -fno-common -dynamic -arch x86_64 -arch i386 -g -Os -pipe -fno-common -fno-strict-aliasing -fwrapv -DENABLE_DTRACE -DMACOSX -DNDEBUG -Wall -Wstrict-prototypes -Wshorten-64-to-32 -DNDEBUG -g -fwrapv -Os -Wall -Wstrict-prototypes -DENABLE_DTRACE -arch i386 -arch x86_64 -pipe -Ilz4libs -Ipy3c -I/System/Library/Frameworks/Python.framework/Versions/2.7/include/python2.7 -c lz4/_version.c -o build/temp.macosx-10.13-intel-2.7/lz4/_version.o -O3 -Wall -Wundef
In file included from lz4/_version.c:38:
In file included from py3c/py3c.h:31:
py3c/py3c/compat.h:76:18: warning: unused function 'PyStr_Concat' [-Wunused-function]
static PyObject *PyStr_Concat(PyObject *left, PyObject *right) {
     ^
1 warning generated.
In file included from lz4/_version.c:38:
In file included from py3c/py3c.h:31:
py3c/py3c/compat.h:76:18: warning: unused function 'PyStr_Concat' [-Wunused-function]
static PyObject *PyStr_Concat(PyObject *left, PyObject *right) {
     ^
1 warning generated.
cc -fno-strict-aliasing -fno-common -dynamic -arch x86_64 -arch i386 -g -Os -pipe -fno-common -fno-strict-aliasing -fwrapv -DENABLE_DTRACE -DMACOSX -DNDEBUG -Wall -Wstrict-prototypes -Wshorten-64-to-32 -DNDEBUG -g -fwrapv -Os -Wall -Wstrict-prototypes -DENABLE_DTRACE -arch i386 -arch x86_64 -pipe -Ilz4libs -Ipy3c -I/System/Library/Frameworks/Python.framework/Versions/2.7/include/python2.7 -c lz4libs/lz4.c -o build/temp.macosx-10.13-intel-2.7/lz4libs/lz4.o -O3 -Wall -Wundef
cc -bundle -undefined dynamic_lookup -arch x86_64 -arch i386 -Wl,-F. build/temp.macosx-10.13-intel-2.7/lz4/_version.o build/temp.macosx-10.13-intel-2.7/lz4libs/lz4.o -o build/lib.macosx-10.13-intel-2.7/lz4/_version.so
building 'lz4.block._block' extension
creating build/temp.macosx-10.13-intel-2.7/lz4/block
cc -fno-strict-aliasing -fno-common -dynamic -arch x86_64 -arch i386 -g -Os -pipe -fno-common -fno-strict-aliasing -fwrapv -DENABLE_DTRACE -DMACOSX -DNDEBUG -Wall -Wstrict-prototypes -Wshorten-64-to-32 -DNDEBUG -g -fwrapv -Os -Wall -Wstrict-prototypes -DENABLE_DTRACE -arch i386 -arch x86_64 -pipe -Ilz4libs -Ipy3c -I/System/Library/Frameworks/Python.framework/Versions/2.7/include/python2.7 -c lz4/block/_block.c -o build/temp.macosx-10.13-intel-2.7/lz4/block/_block.o -O3 -Wall -Wundef
lz4/block/_block.c:354:17: warning: comparison of unsigned expression < 0 is always false [-Wtautological-compare]
 if (dest_size < 0 || dest_size > PY_SSIZE_T_MAX)
  ~~~~~~~~~ ^ ~
lz4/block/_block.c:396:59: warning: implicit conversion loses integer precision: 'size_t' (aka 'unsigned long') to 'int'
  [-Wshorten-64-to-32]
 LZ4_decompress_safe (source_start, dest, source_size, dest_size);
 ~~~~~~~~~~~~~~~~~~~         ^~~~~~~~~
In file included from lz4/block/_block.c:38:
In file included from py3c/py3c.h:31:
py3c/py3c/compat.h:76:18: warning: unused function 'PyStr_Concat' [-Wunused-function]
static PyObject *PyStr_Concat(PyObject *left, PyObject *right) {
     ^
3 warnings generated.
lz4/block/_block.c:354:17: warning: comparison of unsigned expression < 0 is always false [-Wtautological-compare]
 if (dest_size < 0 || dest_size > PY_SSIZE_T_MAX)
  ~~~~~~~~~ ^ ~
In file included from lz4/block/_block.c:38:
In file included from py3c/py3c.h:31:
py3c/py3c/compat.h:76:18: warning: unused function 'PyStr_Concat' [-Wunused-function]
static PyObject *PyStr_Concat(PyObject *left, PyObject *right) {
     ^
2 warnings generated.
cc -fno-strict-aliasing -fno-common -dynamic -arch x86_64 -arch i386 -g -Os -pipe -fno-common -fno-strict-aliasing -fwrapv -DENABLE_DTRACE -DMACOSX -DNDEBUG -Wall -Wstrict-prototypes -Wshorten-64-to-32 -DNDEBUG -g -fwrapv -Os -Wall -Wstrict-prototypes -DENABLE_DTRACE -arch i386 -arch x86_64 -pipe -Ilz4libs -Ipy3c -I/System/Library/Frameworks/Python.framework/Versions/2.7/include/python2.7 -c lz4libs/lz4.c -o build/temp.macosx-10.13-intel-2.7/lz4libs/lz4.o -O3 -Wall -Wundef
cc -fno-strict-aliasing -fno-common -dynamic -arch x86_64 -arch i386 -g -Os -pipe -fno-common -fno-strict-aliasing -fwrapv -DENABLE_DTRACE -DMACOSX -DNDEBUG -Wall -Wstrict-prototypes -Wshorten-64-to-32 -DNDEBUG -g -fwrapv -Os -Wall -Wstrict-prototypes -DENABLE_DTRACE -arch i386 -arch x86_64 -pipe -Ilz4libs -Ipy3c -I/System/Library/Frameworks/Python.framework/Versions/2.7/include/python2.7 -c lz4libs/lz4hc.c -o build/temp.macosx-10.13-intel-2.7/lz4libs/lz4hc.o -O3 -Wall -Wundef
cc -bundle -undefined dynamic_lookup -arch x86_64 -arch i386 -Wl,-F. build/temp.macosx-10.13-intel-2.7/lz4/block/_block.o build/temp.macosx-10.13-intel-2.7/lz4libs/lz4.o build/temp.macosx-10.13-intel-2.7/lz4libs/lz4hc.o -o build/lib.macosx-10.13-intel-2.7/lz4/block/_block.so
building 'lz4.frame._frame' extension
creating build/temp.macosx-10.13-intel-2.7/lz4/frame
cc -fno-strict-aliasing -fno-common -dynamic -arch x86_64 -arch i386 -g -Os -pipe -fno-common -fno-strict-aliasing -fwrapv -DENABLE_DTRACE -DMACOSX -DNDEBUG -Wall -Wstrict-prototypes -Wshorten-64-to-32 -DNDEBUG -g -fwrapv -Os -Wall -Wstrict-prototypes -DENABLE_DTRACE -arch i386 -arch x86_64 -pipe -Ilz4libs -Ipy3c -I/System/Library/Frameworks/Python.framework/Versions/2.7/include/python2.7 -c lz4/frame/_frame.c -o build/temp.macosx-10.13-intel-2.7/lz4/frame/_frame.o -O3 -Wall -Wundef
In file included from lz4/frame/_frame.c:38:
In file included from py3c/py3c.h:31:
py3c/py3c/compat.h:76:18: warning: unused function 'PyStr_Concat' [-Wunused-function]
static PyObject *PyStr_Concat(PyObject *left, PyObject *right) {
     ^
1 warning generated.
lz4/frame/_frame.c:836:55: warning: format specifies type 'ssize_t' (aka 'long') but the argument has type 'int' [-Wformat]
     "Extra data: %zd trailing bytes", source_end - source_cursor);
         ~~~     ^~~~~~~~~~~~~~~~~~~~~~~~~~
         %d
lz4/frame/_frame.c:720:37: warning: implicit conversion loses integer precision: 'unsigned long long' to 'size_t'
  (aka 'unsigned long') [-Wshorten-64-to-32]
  destination_size = frame_info.contentSize;
      ~ ~~~~~~~~~~~^~~~~~~~~~~
In file included from lz4/frame/_frame.c:38:
In file included from py3c/py3c.h:31:
py3c/py3c/compat.h:76:18: warning: unused function 'PyStr_Concat' [-Wunused-function]
static PyObject *PyStr_Concat(PyObject *left, PyObject *right) {
     ^
3 warnings generated.
cc -fno-strict-aliasing -fno-common -dynamic -arch x86_64 -arch i386 -g -Os -pipe -fno-common -fno-strict-aliasing -fwrapv -DENABLE_DTRACE -DMACOSX -DNDEBUG -Wall -Wstrict-prototypes -Wshorten-64-to-32 -DNDEBUG -g -fwrapv -Os -Wall -Wstrict-prototypes -DENABLE_DTRACE -arch i386 -arch x86_64 -pipe -Ilz4libs -Ipy3c -I/System/Library/Frameworks/Python.framework/Versions/2.7/include/python2.7 -c lz4libs/lz4.c -o build/temp.macosx-10.13-intel-2.7/lz4libs/lz4.o -O3 -Wall -Wundef
cc -fno-strict-aliasing -fno-common -dynamic -arch x86_64 -arch i386 -g -Os -pipe -fno-common -fno-strict-aliasing -fwrapv -DENABLE_DTRACE -DMACOSX -DNDEBUG -Wall -Wstrict-prototypes -Wshorten-64-to-32 -DNDEBUG -g -fwrapv -Os -Wall -Wstrict-prototypes -DENABLE_DTRACE -arch i386 -arch x86_64 -pipe -Ilz4libs -Ipy3c -I/System/Library/Frameworks/Python.framework/Versions/2.7/include/python2.7 -c lz4libs/lz4hc.c -o build/temp.macosx-10.13-intel-2.7/lz4libs/lz4hc.o -O3 -Wall -Wundef
cc -fno-strict-aliasing -fno-common -dynamic -arch x86_64 -arch i386 -g -Os -pipe -fno-common -fno-strict-aliasing -fwrapv -DENABLE_DTRACE -DMACOSX -DNDEBUG -Wall -Wstrict-prototypes -Wshorten-64-to-32 -DNDEBUG -g -fwrapv -Os -Wall -Wstrict-prototypes -DENABLE_DTRACE -arch i386 -arch x86_64 -pipe -Ilz4libs -Ipy3c -I/System/Library/Frameworks/Python.framework/Versions/2.7/include/python2.7 -c lz4libs/lz4frame.c -o build/temp.macosx-10.13-intel-2.7/lz4libs/lz4frame.o -O3 -Wall -Wundef
cc -fno-strict-aliasing -fno-common -dynamic -arch x86_64 -arch i386 -g -Os -pipe -fno-common -fno-strict-aliasing -fwrapv -DENABLE_DTRACE -DMACOSX -DNDEBUG -Wall -Wstrict-prototypes -Wshorten-64-to-32 -DNDEBUG -g -fwrapv -Os -Wall -Wstrict-prototypes -DENABLE_DTRACE -arch i386 -arch x86_64 -pipe -Ilz4libs -Ipy3c -I/System/Library/Frameworks/Python.framework/Versions/2.7/include/python2.7 -c lz4libs/xxhash.c -o build/temp.macosx-10.13-intel-2.7/lz4libs/xxhash.o -O3 -Wall -Wundef
cc -bundle -undefined dynamic_lookup -arch x86_64 -arch i386 -Wl,-F. build/temp.macosx-10.13-intel-2.7/lz4/frame/_frame.o build/temp.macosx-10.13-intel-2.7/lz4libs/lz4.o build/temp.macosx-10.13-intel-2.7/lz4libs/lz4hc.o build/temp.macosx-10.13-intel-2.7/lz4libs/lz4frame.o build/temp.macosx-10.13-intel-2.7/lz4libs/xxhash.o -o build/lib.macosx-10.13-intel-2.7/lz4/frame/_frame.so
copying build/lib.macosx-10.13-intel-2.7/lz4/_version.so -> lz4
copying build/lib.macosx-10.13-intel-2.7/lz4/block/_block.so -> lz4/block
copying build/lib.macosx-10.13-intel-2.7/lz4/frame/_frame.so -> lz4/frame
creating build/bdist.macosx-10.13-intel
creating build/bdist.macosx-10.13-intel/egg
creating build/bdist.macosx-10.13-intel/egg/lz4
copying build/lib.macosx-10.13-intel-2.7/lz4/version.py -> build/bdist.macosx-10.13-intel/egg/lz4
copying build/lib.macosx-10.13-intel-2.7/lz4/deprecated.py -> build/bdist.macosx-10.13-intel/egg/lz4
copying build/lib.macosx-10.13-intel-2.7/lz4/__init__.py -> build/bdist.macosx-10.13-intel/egg/lz4
creating build/bdist.macosx-10.13-intel/egg/lz4/frame
copying build/lib.macosx-10.13-intel-2.7/lz4/frame/_frame.so -> build/bdist.macosx-10.13-intel/egg/lz4/frame
copying build/lib.macosx-10.13-intel-2.7/lz4/frame/__init__.py -> build/bdist.macosx-10.13-intel/egg/lz4/frame
copying build/lib.macosx-10.13-intel-2.7/lz4/_version.so -> build/bdist.macosx-10.13-intel/egg/lz4
copying build/lib.macosx-10.13-intel-2.7/lz4/lz4version.py -> build/bdist.macosx-10.13-intel/egg/lz4
creating build/bdist.macosx-10.13-intel/egg/lz4/block
copying build/lib.macosx-10.13-intel-2.7/lz4/block/_block.so -> build/bdist.macosx-10.13-intel/egg/lz4/block
copying build/lib.macosx-10.13-intel-2.7/lz4/block/__init__.py -> build/bdist.macosx-10.13-intel/egg/lz4/block
byte-compiling build/bdist.macosx-10.13-intel/egg/lz4/version.py to version.pyc
byte-compiling build/bdist.macosx-10.13-intel/egg/lz4/deprecated.py to deprecated.pyc
byte-compiling build/bdist.macosx-10.13-intel/egg/lz4/__init__.py to __init__.pyc
byte-compiling build/bdist.macosx-10.13-intel/egg/lz4/frame/__init__.py to __init__.pyc
byte-compiling build/bdist.macosx-10.13-intel/egg/lz4/lz4version.py to lz4version.pyc
byte-compiling build/bdist.macosx-10.13-intel/egg/lz4/block/__init__.py to __init__.pyc
creating stub loader for lz4/_version.so
creating stub loader for lz4/block/_block.so
creating stub loader for lz4/frame/_frame.so
byte-compiling build/bdist.macosx-10.13-intel/egg/lz4/_version.py to _version.pyc
byte-compiling build/bdist.macosx-10.13-intel/egg/lz4/block/_block.py to _block.pyc
byte-compiling build/bdist.macosx-10.13-intel/egg/lz4/frame/_frame.py to _frame.pyc
creating build/bdist.macosx-10.13-intel/egg/EGG-INFO
copying lz4.egg-info/PKG-INFO -> build/bdist.macosx-10.13-intel/egg/EGG-INFO
copying lz4.egg-info/SOURCES.txt -> build/bdist.macosx-10.13-intel/egg/EGG-INFO
copying lz4.egg-info/dependency_links.txt -> build/bdist.macosx-10.13-intel/egg/EGG-INFO
copying lz4.egg-info/top_level.txt -> build/bdist.macosx-10.13-intel/egg/EGG-INFO
writing build/bdist.macosx-10.13-intel/egg/EGG-INFO/native_libs.txt
zip_safe flag not set; analyzing archive contents...
creating dist
creating 'dist/lz4-0.10.1-py2.7-macosx-10.13-intel.egg' and adding 'build/bdist.macosx-10.13-intel/egg' to it
removing 'build/bdist.macosx-10.13-intel/egg' (and everything under it)
Processing lz4-0.10.1-py2.7-macosx-10.13-intel.egg
Copying lz4-0.10.1-py2.7-macosx-10.13-intel.egg to /Library/Python/2.7/site-packages
Adding lz4 0.10.1 to easy-install.pth file

Installed /Library/Python/2.7/site-packages/lz4-0.10.1-py2.7-macosx-10.13-intel.egg
Processing dependencies for lz4==0.10.1
Finished processing dependencies for lz4==0.10.1

终于成功了。。不容易啊不容易。。。希望别的童鞋别再因为这问题被坑。

(0)

相关推荐

  • python2.7无法使用pip的解决方法(安装easy_install)

    1. 在Python IDLE下,我们输入以下代码 from urllib import urlopen[回车] data = urlopen('http://peak.telecommunity.com/dist/ez_setup.py')[回车] open('ez_setup.py','wb').write(data.read())[回车] exit[回车] 然后会出现: Use exit() or Ctrl-Z plus Return to exit2. 2.在计算的cmd程序下,切换到自

  • Python使用pip安装pySerial串口通讯模块

    pySerial封装了对串口的访问,供大家参考,具体内容如下 特性 在支持的平台上有统一的接口. 通过python属性访问串口设置. 支持不同的字节大小.停止位.校验位和流控设置. 可以有或者没有接收超时. 类似文件的API,例如read和write,也支持readline等. 支持二进制传输,没有null消除,没有cr-lf转换. 有关Python的环境配置请参考: <Python入门>Windows 7下Python Web开发环境搭建笔记 而 pip 是随 Python 一同安装的,如下

  • Linux(Redhat)安装python3.6虚拟环境(推荐)

    python是3.6 centos 6 64位 1.安装python 2.安装pip wget https://bootstrap.pypa.io/get-pip.py --no-check-certificate python get-pip.py 可能会报错!!!如: pip is configured with locations that require TLS/SSL, however the ssl module in Python is not available. 执行pytho

  • python 2.7.14安装图文教程

    本文为大家分享了python2.7.14的安装教程,供大家参考,具体内容如下 1.下载python2.7.14 下载地址 根据自己电脑配置进行选择,我的是win7 64位,所以我选择的是上述截图中红圈圈中的版本,点击左侧文件名会自动下载.  注意:安装程序下载之后不能放到中文路径下双击安装,必须放到英文路径下才可以. 2.双击下载之后的msi安装程序进行安装,选择"Install just for me(not available on Windows Vista)",然后点"

  • python中virtualenvwrapper安装与使用

    virtualenv与virtualenvwrapper 当涉及到python项目开发时为了不污染全局环境,通常都会使用环境隔离管理工具virtualenv与virtualenvwrapper. virtualenv是在项目底下执行生成venv环境目录以此来进行管理,这非常适合使用诸如pycharm这种集成环境配置的开发工具:那么当通过shell来运行virtualenv时便会显得非常麻烦,因为每次shell关闭再打开后都需要重新配置环境参数. virtualenvwrapper是将所有的pyt

  • 快速解决安装python没有scripts文件夹的问题

    安装Python2.7,好多次都不会产生scripts文件夹,导致无法使用pip. 折腾了一下,找到了解决办法. 让人无法接受的是,只要是我给的安装包一定不会产生scripts文件夹,所以应该是我的安装包出现了问题,建议出现这个问题的宝宝们先去换个安装包,如果换了之后还有这个错误,可以看一下我是怎么解决的,仅供参考. 1 去官网下载ez_setup.py文件 2 cmd,然后切换到对应的路径,执行命令python ez_setup.py,完成后会生成scripts文件夹 3 切换到scripts

  • python安装模块如何通过setup.py安装(超简单)

    有些时候我们发现一些模块没有提供pip install 命令和安装教程 , 只提供了一个setup.py文件 , 这个时候如何安装呢? 步骤 打开cmd 到达安装目录 python setup.py build python setup.py install 总结 以上所述是小编给大家介绍的python安装模块如何通过setup.py安装,希望对大家有所帮助,如果大家有任何疑问欢迎给我留言,小编会及时回复大家的! 您可能感兴趣的文章: python的构建工具setup.py的方法使用示例 使用s

  • windows下安装Python的XlsxWriter模块方法

    在windows环境下安装python的XlsxWriter模块,虽然很简单,但由于自己粗心,少了一个字符,导致不少的错误... 1.通过pip命令来安装. C:\Users\Administrator>pip install XlsWriter Collecting XlsWriter Could not find a version that satisfies the requirement XlsWriter (from versions: ) No matching distribut

  • Python安装lz4-0.10.1遇到的坑

    因为项目的需求,要 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-pac

  • CentOS 7.2 下编译安装PHP7.0.10+MySQL5.7.14+Nginx1.10.1的方法详解(mini版本)

    一.安装前的准备工作 1.yum update #更新系统 2.yum install gcc gcc-c++ autoconf automake cmake bison m4 libxml2 libxml2-devel libcurl-devel libjpeg-devel libpng-devel libicu-devel #安装php.MySQL.Nngix所依赖的包 3.下载以下包 #我把所有源文件都下载在root目录,读者可自行修改源文件存放目录 3.1 libmcrypt-2.5.8

  • Ubuntu 16.04 LTS中源码安装Python 3.6.0的方法教程

    前提 官网上提供了 Mac 和 Windows 上的安装包和 Linux 上安装需要的源码. 下载地址如下: https://www.python.org/downloads/release/python-360/ 安装 wget https://www.python.org/ftp/python/3.6.0/Python-3.6.0.tar.xz xz -d Python-3.6.0.tar.xz tar -xvf Python-3.6.0.tar cd Python-3.6.0 ./conf

  • NPM 安装cordova时警告:npm WARN deprecated minimatch@2.0.10: Please update to minimatch 3.0.2 or higher to

    前言: NPM是随同NodeJS一起安装的包管理工具,能解决NodeJS代码部署上的很多问题,常见的使用场景有以下几种: 允许用户从NPM服务器下载别人编写的第三方包到本地使用. 允许用户从NPM服务器下载并安装别人编写的命令行程序到本地使用. 允许用户将自己编写的包或命令行程序上传到NPM服务器供别人使用. NPM 安装cordova时警告:npm WARN deprecated minimatch@2.0.10: Please update to minimatch 3.0.2 or hig

  • python 3.7.0 安装配置方法图文教程

    本文记录了python 3.7.0 安装配置方法,供大家参考,具体内容如下 S1 登入Python官网下载网址 S2 下载后缀为exe的可执行文件,并根据自己电脑/主机的系统选择32位还是64位. 双击选择"Python for Windows"(网址) 出现选择下载页面 (1)Download:windows x86为32位,windows x86-64为64位: (2) A.在线安装,即执行安装后才透过网络下载python: Download Windows x86-64 web-

  • python 3.7.0 下pillow安装方法

    PIL(Python Imaging Library)是Python中一个强大的图像处理库,但目前其只支持到Python2.7 pillow是PIL的一个分支,虽是分支但是其与PIL同样也具有很强的图像处理库. Python3.7.0 如何安装pillow 此安装方法在windows7环境下完成: >>>win+r调出运行窗口,键入cmd弹出命令窗口 >>>此处需要键入命令调到python所在的文件夹中,如图,我是将python安装在d盘中 >>>在D

  • python安装cx_Oracle模块常见问题与解决方法

    本文实例讲述了python安装cx_Oracle模块常见问题与解决方法.分享给大家供大家参考,具体如下: 安装或使用cx_Oracle时,需要用到Oracel的链接库,如libclntsh.so.10.1,否则会有各种各样的错误信息. 安装Oracle Instant Client就可得到这个链接库,避免安装几百兆之巨的Oracle Client. 软件下载地址: cx_Oracle的主页:http://cx-oracle.sourceforge.net/ 必需的Oracle链接库的下载地址:h

  • python安装与使用redis的方法

    本文实例讲述了python安装与使用redis的方法.分享给大家供大家参考,具体如下: 1.安装 好吧,我承认我只会最简单的安装: sudo apt-get install redis-server python 支持包: (其实就一个文件,搞过来就能用) sudo apt-get install python-redis 2.配置 配置一下吧,默认配置文件在: "/etc/redis/redis.conf" 绑定ip: "bind 127.0.0.1″ -> &quo

  • Python安装pycurl失败的解决方法

    Centos安装pycurl centos 安装pycurl yum install python-devel curl-devel pip3 install pycurl Mac(老版本)安装pycurl 解决MacOS升级后出现xcrun: error: invalid active developer path, missing xcrun的问题 xcode-select --install 然后 dongchang-5:qqmusic baoshan$ pip3 install pycu

  • Python安装Flask环境及简单应用示例

    本文实例讲述了Python安装Flask环境及简单应用.分享给大家供大家参考,具体如下: 安装环境 使用虚拟环境安装Flask,可以避免包的混乱和版本的冲突,虚拟环境是Python解释器的副本,在虚拟环境中你可以安装扩展包,为每个程序单独创建的虚拟环境,可以保证程序只能访问虚拟环境中的包.而不会影响系统中安装的全局Python解释器,从而保证全局解释器的整洁. 虚拟环境使用virtualenv创建,可以查看系统是否安装了virtualenv: $ virtualenv --version 安装虚

随机推荐