我用TravisCI来run my unit tests for python 2.7, 3.4, 3.5 and 3.6。我的.travis.yml文件包含- pip install pytest-faulthandler
行,直到2天前我才发现问题。然后,昨天,由于没有明显的原因,这行代码开始导致Travis构建crash错误:
The command "pip install pytest-faulthandler" failed and exited with 1 during .
这似乎又源于一条通往海湾合作委员会的糟糕道路(由Python设置?)公司名称:
unable to execute 'x86_64-conda_cos6-linux-gnu-gcc': No such file or directory
下面是详细的错误日志。据我所知,我没有对我的配置(travis.yml
,setup.cfg
,setup.py
)进行任何可能影响这一点的更改。这个问题只发生在python2.7上,对于3.4-3.6,travis构建环境时没有任何问题。在
我试着在网上搜索,看看是否有人有经验/解决过这个问题,但没有运气。欢迎提出任何建议。谢谢!在
下面是Travis错误日志,完整的构建日志可以找到here。在
Collecting pytest-faulthandler
Downloading pytest_faulthandler-1.3.1-py2.py3-none-any.whl
Collecting pytest>=2.6 (from pytest-faulthandler)
Downloading pytest-3.2.2-py2.py3-none-any.whl (187kB)
100% |████████████████████████████████| 194kB 4.7MB/s
Collecting faulthandler; python_version == "2.6" or python_version == "2.7" (from pytest-faulthandler)
Downloading faulthandler-3.0.tar.gz (55kB)
100% |████████████████████████████████| 61kB 8.7MB/s
Requirement already satisfied: setuptools in /home/travis/miniconda/envs/test-environment/lib/python2.7/site-packages (from pytest>=2.6->pytest-faulthandler)
Collecting py>=1.4.33 (from pytest>=2.6->pytest-faulthandler)
Using cached py-1.4.34-py2.py3-none-any.whl
Building wheels for collected packages: faulthandler
Running setup.py bdist_wheel for faulthandler ... error
Complete output from command /home/travis/miniconda/envs/test-environment/bin/python -u -c "import setuptools, tokenize;__file__='/tmp/pip-build-wI1YGd/faulthandler/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" bdist_wheel -d /tmp/tmpyGVM8Opip-wheel- --python-tag cp27:
running bdist_wheel
running build
running build_ext
building 'faulthandler' extension
creating build
creating build/temp.linux-x86_64-2.7
x86_64-conda_cos6-linux-gnu-gcc -pthread -fno-strict-aliasing -march=nocona -mtune=haswell -ftree-vectorize -fPIC -fstack-protector-strong -fno-plt -O3 -pipe -DNDEBUG -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -I/home/travis/miniconda/envs/test-environment/include/python2.7 -c faulthandler.c -o build/temp.linux-x86_64-2.7/faulthandler.o
unable to execute 'x86_64-conda_cos6-linux-gnu-gcc': No such file or directory
error: command 'x86_64-conda_cos6-linux-gnu-gcc' failed with exit status 1
----------------------------------------
Failed building wheel for faulthandler
Running setup.py clean for faulthandler
Failed to build faulthandler
Installing collected packages: py, pytest, faulthandler, pytest-faulthandler
Running setup.py install for faulthandler ... error
Complete output from command /home/travis/miniconda/envs/test-environment/bin/python -u -c "import setuptools, tokenize;__file__='/tmp/pip-build-wI1YGd/faulthandler/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record /tmp/pip-lKAMMU-record/install-record.txt --single-version-externally-managed --compile:
running install
running build
running build_ext
building 'faulthandler' extension
creating build
creating build/temp.linux-x86_64-2.7
x86_64-conda_cos6-linux-gnu-gcc -pthread -fno-strict-aliasing -march=nocona -mtune=haswell -ftree-vectorize -fPIC -fstack-protector-strong -fno-plt -O3 -pipe -DNDEBUG -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -I/home/travis/miniconda/envs/test-environment/include/python2.7 -c faulthandler.c -o build/temp.linux-x86_64-2.7/faulthandler.o
unable to execute 'x86_64-conda_cos6-linux-gnu-gcc': No such file or directory
error: command 'x86_64-conda_cos6-linux-gnu-gcc' failed with exit status 1
----------------------------------------
Command "/home/travis/miniconda/envs/test-environment/bin/python -u -c "import setuptools, tokenize;__file__='/tmp/pip-build-wI1YGd/faulthandler/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record /tmp/pip-lKAMMU-record/install-record.txt --single-version-externally-managed --compile" failed with error code 1 in /tmp/pip-build-wI1YGd/faulthandler/
The command "pip install pytest-faulthandler" failed and exited with 1 during .
Your build has been stopped.
在进一步搜索之后,我找到了this related post,随后我将python2的}阻止conda更新。这次my environment built correctly for all python versions,问题已修复。在
.travis.yml
中的miniconda版本替换为Miniconda2-4.3.21-Linux-x86_64.sh
,而python3则是Miniconda3-4.3.21-Linux-x86_64.sh
,并通过注释{正如链接文章中所指出的,这看起来像是Anaconda(和miniconda)4.3.27的安装脚本中的一个错误,解决方案是使用早期版本(例如4.3.21)并阻止conda更新。在
相关问题 更多 >
编程相关推荐