我刚刚报告了this issue upstream to IPython,但我相信如果我可以完全过滤掉该部分,Buildout中可能存在一种解决方法。
在Travis上,相同的代码在Python 3.5上构建良好,但在2.7和3.4上失败。
当我运行bin/buildout
时
Installing ipython.
Getting distribution for 'ipython'.
error: Setup script exited with error in ipython setup command: Invalid environment marker: sys_platform == "win32" and python_version < "3.6"
An error occurred when trying to install /tmp/tmprLOC_8get_dist/ipython-5.3.0.tar.gz. Look above this message for any errors that were output by easy_install.
While:
Installing ipython.
Getting distribution for 'ipython'.
An internal error occurred due to a bug in either zc.buildout or in a
recipe being used:
Traceback (most recent call last):
File "/home/travis/build/naftulikay/aws-env/eggs/zc.buildout-2.9.2-py2.7.egg/zc/buildout/buildout.py", line 1982, in main
getattr(buildout, command)(args)
File "/home/travis/build/naftulikay/aws-env/eggs/zc.buildout-2.9.2-py2.7.egg/zc/buildout/buildout.py", line 668, in install
installed_files = self[part]._call(recipe.install)
File "/home/travis/build/naftulikay/aws-env/eggs/zc.buildout-2.9.2-py2.7.egg/zc/buildout/buildout.py", line 1419, in _call
return f()
File "/home/travis/build/naftulikay/aws-env/eggs/zc.recipe.egg-2.0.3-py2.7.egg/zc/recipe/egg/egg.py", line 126, in install
reqs, ws = self.working_set()
File "/home/travis/build/naftulikay/aws-env/eggs/zc.recipe.egg-2.0.3-py2.7.egg/zc/recipe/egg/egg.py", line 84, in working_set
allow_hosts=self.allow_hosts)
File "/home/travis/build/naftulikay/aws-env/eggs/zc.buildout-2.9.2-py2.7.egg/zc/buildout/easy_install.py", line 913, in install
return installer.install(specs, working_set)
File "/home/travis/build/naftulikay/aws-env/eggs/zc.buildout-2.9.2-py2.7.egg/zc/buildout/easy_install.py", line 665, in install
for dist in self._get_dist(requirement, ws):
File "/home/travis/build/naftulikay/aws-env/eggs/zc.buildout-2.9.2-py2.7.egg/zc/buildout/easy_install.py", line 563, in _get_dist
dists = [_move_to_eggs_dir_and_compile(dist, self._dest)]
File "/home/travis/build/naftulikay/aws-env/eggs/zc.buildout-2.9.2-py2.7.egg/zc/buildout/easy_install.py", line 1699, in _move_to_eggs_dir_and_compile
[tmp_loc] = glob.glob(os.path.join(tmp_dest, '*'))
ValueError: need more than 0 values to unpack
当我运行bin/buildout
时
Installing ipython.
Getting distribution for 'ipython'.
error: Setup script exited with error in ipython setup command: Invalid environment marker: python_version >= "3.4"
An error occurred when trying to install /tmp/tmpos_bscj8get_dist/ipython-5.3.0.tar.gz. Look above this message for any errors that were output by easy_install.
While:
Installing ipython.
Getting distribution for 'ipython'.
An internal error occurred due to a bug in either zc.buildout or in a
recipe being used:
Traceback (most recent call last):
File "/home/travis/build/naftulikay/aws-env/eggs/zc.buildout-2.9.2-py3.4.egg/zc/buildout/buildout.py", line 1982, in main
getattr(buildout, command)(args)
File "/home/travis/build/naftulikay/aws-env/eggs/zc.buildout-2.9.2-py3.4.egg/zc/buildout/buildout.py", line 668, in install
installed_files = self[part]._call(recipe.install)
File "/home/travis/build/naftulikay/aws-env/eggs/zc.buildout-2.9.2-py3.4.egg/zc/buildout/buildout.py", line 1419, in _call
return f()
File "/home/travis/build/naftulikay/aws-env/eggs/zc.recipe.egg-2.0.3-py3.4.egg/zc/recipe/egg/egg.py", line 126, in install
reqs, ws = self.working_set()
File "/home/travis/build/naftulikay/aws-env/eggs/zc.recipe.egg-2.0.3-py3.4.egg/zc/recipe/egg/egg.py", line 84, in working_set
allow_hosts=self.allow_hosts)
File "/home/travis/build/naftulikay/aws-env/eggs/zc.buildout-2.9.2-py3.4.egg/zc/buildout/easy_install.py", line 913, in install
return installer.install(specs, working_set)
File "/home/travis/build/naftulikay/aws-env/eggs/zc.buildout-2.9.2-py3.4.egg/zc/buildout/easy_install.py", line 665, in install
for dist in self._get_dist(requirement, ws):
File "/home/travis/build/naftulikay/aws-env/eggs/zc.buildout-2.9.2-py3.4.egg/zc/buildout/easy_install.py", line 563, in _get_dist
dists = [_move_to_eggs_dir_and_compile(dist, self._dest)]
File "/home/travis/build/naftulikay/aws-env/eggs/zc.buildout-2.9.2-py3.4.egg/zc/buildout/easy_install.py", line 1699, in _move_to_eggs_dir_and_compile
[tmp_loc] = glob.glob(os.path.join(tmp_dest, '*'))
ValueError: need more than 0 values to unpack
在使用Python 2.7.5的CentOS 7上,它以下列方式失败:
[vagrant@devel vagrant]$ python --version
Python 2.7.5
[vagrant@devel vagrant]$ python bootstrap.py
ez_setup.py is deprecated and when using it setuptools will be pinned to 33.1.1 since it's the last version that supports setuptools self upgrade/installation, check https://github.com/pypa/setuptools/issues/581 for more info; use pip to install setuptools
Downloading https://pypi.io/packages/source/s/setuptools/setuptools-33.1.1.zip
Extracting in /tmp/tmpftyX3t
Now working in /tmp/tmpftyX3t/setuptools-33.1.1
Building a Setuptools egg in /tmp/bootstrap-nc0bVK
warning: no files found matching '*' under directory 'setuptools/_vendor'
/tmp/bootstrap-nc0bVK/setuptools-33.1.1-py2.7.egg
warning: no files found matching '*.txt' under directory 'doc'
Creating directory '/vagrant/develop-eggs'.
Generated script '/vagrant/bin/buildout'.
[vagrant@devel vagrant]$ bin/buildout
Upgraded:
setuptools version 34.3.3;
restarting.
Generated script '/vagrant/bin/buildout'.
Version and requirements information containing setuptools:
Base installation request: 'zc.buildout', 'setuptools'
Requirement of zc.buildout>=2.9.2: setuptools>=8.0
While:
Installing.
Checking for upgrades.
Error: There is a version conflict.
We already have: setuptools 0.9.8
but zc.buildout 2.9.2 requires 'setuptools>=8.0'.
在使用Python 3.4的CentOS 7上,我没有遇到任何问题。
我的buildout配置有问题吗?有没有办法让我在bin/buildout
执行期间配置Travis跳过给定的部分?
答案 0 :(得分:0)
我在使用PyCharms的工具运行时遇到了类似的问题。我的脚本位于:/home/gonczor/Projects/STX/presence-analyzer/presence-analyzer-wgonczaronek/bin/buildout
,在venv中的python 2.7.12,我不得不将工作目录从/home/gonczor/Projects/STX/presence-analyzer/presence-analyzer-wgonczaronek/
更改为/home/gonczor/Projects/STX/presence-analyzer/presence-analyzer-wgonczaronek
(因此要删除尾部斜杠)。我在Linux Mint 18上使用4.4内核)。