tox/conda/travis-ci raises ImportError: _PyErr_ReplaceException

3.2k views Asked by At

I want to set up Travis-CI to run the locally working test suite of a recently open-sourced Python 2.7 library. For efficiently installing dependencies like Numpy and Scipy, I found some advice to use the Miniconda distribution. Unfortunately, my .travis.yml, which follows the official "Using Conda with Travis CI" tutorial, after successfully installing all dependencies produces this error while initializing the tox environment:

ImportError: /home/travis/build/.../.tox/py27-nose/lib/python2.7/lib-dynload/_io.so: undefined symbol: _PyErr_ReplaceException

The mentioned symbol was recently added in Issue 23781 of the Python Bug Tracker. I suspect that the problem is caused by conflicting Python versions, and tried to use Python 2.7.9 as well as 2.7.10, with and without a test environment as produced by conda create, to no avail.

I would greatly appreciate any advice!

3

There are 3 answers

0
Chris Withers On BEST ANSWER

The conda guys have now released a fixed virtualenv package that no longer has this problem.

2
babalu On

You can downgrade by running conda install python=2.7.9 and confirm it resolves your issue.

0
mbenhalima On

Fixed by downgrading my Python version from 2.7.10 to 2.7.9