2017-09-28 10 views
1

私はTravisCIをrun my unit tests for python 2.7, 3.4, 3.5 and 3.6に使用しています。私の.travis.ymlファイルには、- pip install pytest-faulthandlerという行が含まれています.2日前までは私には何の問題もありませんでした。その後、昨日は、明らかな理由もなく、この行はトラヴィスがエラーでcrashに構築引き起こし始めた:Anacondaは、Python 2.7 TravisCIのfaulthandler用のビルドホイールに失敗しました。

The command "pip install pytest-faulthandler" failed and exited with 1 during .

これは、順番に(?アナコンダによって設定された)のgccへの悪い道に由来するようだ:

unable to execute 'x86_64-conda_cos6-linux-gnu-gcc': No such file or directory

下記の詳細なエラーログ。限り、私は私の設定(travis.ymlsetup.cfgsetup.py)にこれに影響を与える可能性のある何も変更していないと私が言うことができます。この問題は、python 2.7の場合にのみ発生し、3.4-3.6の場合、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. 

答えて

1

は、追加の検索後、私は、Python 3のためのPython 2及びMiniconda3-4.3.21-Linux-x86_64.shためMiniconda2-4.3.21-Linux-x86_64.sh.travis.ymlでminicondaバージョンを置き換えるthis related post、次を発見し、そして- conda update -q condaをコメントアウトすることによって更新からcondaを防止します。今回はmy environment built correctly for all python versions、問題は修正されました。

リンク先に記載されているように、これはAnaconda(およびminiconda)4.3.27のインストールスクリプトのバグのようですが、解決策は以前のバージョン(4.3.21など)を使用してcondaが更新されないようにすることです。

関連する問題