Python安装lz4-0.10.1遇到的坑


Posted in Python onMay 20, 2018

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

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

Python 相关文章推荐
python实现数通设备tftp备份配置文件示例
Apr 02 Python
python分割列表(list)的方法示例
May 07 Python
Python math库 ln(x)运算的实现及原理
Jul 17 Python
基于pytorch的保存和加载模型参数的方法
Aug 17 Python
python中的split()函数和os.path.split()函数使用详解
Dec 21 Python
关于python的缩进规则的知识点详解
Jun 22 Python
基于opencv实现简单画板功能
Aug 02 Python
Windows环境下Python3.6.8 importError: DLLload failed:找不到指定的模块
Nov 01 Python
Python常用base64 md5 aes des crc32加密解密方法汇总
Nov 06 Python
通过代码简单了解django model序列化作用
Nov 12 Python
python+opencv实现车道线检测
Feb 19 Python
Python中glob库实现文件名的匹配
Jun 18 Python
Python requests发送post请求的一些疑点
May 20 #Python
python中virtualenvwrapper安装与使用
May 20 #Python
django静态文件加载的方法
May 20 #Python
django中静态文件配置static的方法
May 20 #Python
Python中跳台阶、变态跳台阶与矩形覆盖问题的解决方法
May 19 #Python
Python利用公共键如何对字典列表进行排序详解
May 19 #Python
Python中一些不为人知的基础技巧总结
May 19 #Python
You might like
PHP nl2br函数 将换行字符转成 &amp;lt;br&amp;gt;
2009/08/21 PHP
PHP中array_merge和array相加的区别分析
2013/06/17 PHP
php实现处理输入转义字符的代码
2015/11/08 PHP
laravel5.2实现区分前后台用户登录的方法
2017/01/11 PHP
PHP4和PHP5版本下解析XML文档的操作方法实例分析
2017/05/20 PHP
Yii框架 session 数据库存储操作方法示例
2019/11/18 PHP
在视频前插入广告
2006/11/20 Javascript
javascript实现动态侧边栏代码
2014/02/19 Javascript
javascript中的正则表达式使用详解
2015/08/30 Javascript
一步步教大家编写酷炫的导航栏js+css实现
2016/03/14 Javascript
jQuery弹出下拉列表插件(实现kindeditor的@功能)
2016/08/16 Javascript
webpack自动打包和热更新的实现方法
2019/06/24 Javascript
Vue-drag-resize 拖拽缩放插件的使用(简单示例)
2019/12/04 Javascript
使用vue打包进行云服务器上传的问题
2020/03/02 Javascript
vue实现输入框自动跳转功能
2020/05/20 Javascript
vue+iview使用树形控件的具体使用
2020/11/02 Javascript
uni-app 自定义底部导航栏的实现
2020/12/11 Javascript
python实现删除文件与目录的方法
2014/11/10 Python
python实现下载pop3邮件保存到本地
2018/06/19 Python
对python中不同模块(函数、类、变量)的调用详解
2019/07/16 Python
python代码 FTP备份交换机配置脚本实例解析
2019/08/01 Python
Pycharm创建项目时如何自动添加头部信息
2019/11/14 Python
Python3 socket即时通讯脚本实现代码实例(threading多线程)
2020/06/01 Python
html5 Canvas画图教程(2)—画直线与设置线条的样式如颜色/端点/交汇点
2013/01/09 HTML / CSS
世界上最大的铁人三项商店:Tri UK
2020/11/04 全球购物
高中生校园生活自我评价
2013/09/19 职场文书
艺术爱好者的自我评价分享
2013/10/08 职场文书
应届生个人求职信模板
2013/11/26 职场文书
幼儿园教师请假制度
2014/01/16 职场文书
高中运动会入场词
2014/02/14 职场文书
委托书的写法
2014/09/16 职场文书
2015大学生实训报告
2014/11/05 职场文书
2014年超市员工工作总结
2014/11/18 职场文书
白鹤梁导游词
2015/02/06 职场文书
本地通过nginx配置反向代理的全过程记录
2021/03/31 Servers
利用Python实现Picgo图床工具
2021/11/23 Python