[SciPy-User] Travis, wheels, and scikit-image

Fabien fabien.maussion at gmail.com
Sat Oct 10 08:54:17 EDT 2015


Folks,

I have a project which requires several packages from the scipy track. I 
configured travis to use cached wheels in order to reduce build time. 
Everything worked fine until I had to add scikit-image to my 
dependencies. Here are the relevant parts of my travis config:

language: python
sudo: false
cache:
   directories:
     - ~/.cache/pip
env:
   global:
     - PIP_WHEEL_DIR=$HOME/.cache/pip/wheels
     - PIP_FIND_LINKS=file://$HOME/.cache/pip/wheels
     - NUMPY=numpy
[...]
before_install:
   - pip install -U pip
   - pip install wheel
install:
   - "pip wheel -r requirements.txt"
   - "pip install -r requirements.txt"
   - "pip install coveralls"
   - "pip install nose"
   - "pip install -e ."
script:
   - nosetests

And of requirements.txt:

numpy
scipy
scikit-image


The problem is that scikit-image wants to import scipy from setup.py, 
and I get this error from my travis log:

9.50s$ pip wheel -r requirements.txt
Collecting numpy (from -r requirements.txt (line 2))
   File was already downloaded 
/home/travis/.cache/pip/wheels/numpy-1.10.0.post2-cp27-none-linux_x86_64.whl
Collecting scipy (from -r requirements.txt (line 3))
   File was already downloaded 
/home/travis/.cache/pip/wheels/scipy-0.16.0-cp27-none-linux_x86_64.whl
Collecting scikit-image (from -r requirements.txt (line 8))
   Downloading scikit-image-0.11.3.tar.gz (18.6MB)
     100% |████████████████████████████████| 18.6MB 22kB/s
     Complete output from command python setup.py egg_info:
     Traceback (most recent call last):
       File "<string>", line 20, in <module>
       File "/tmp/pip-build-WRt8fn/scikit-image/setup.py", line 77, in 
<module>
         import scipy
     ImportError: No module named scipy


Is my way to configure travis a bad one? Should I handle my wheels 
differently? I am also thinking about using conda in travis as explained 
here (http://conda.pydata.org/docs/travis.html) but I wanted to avoid it 
as long as not necessary: it seems that it doesn't use the travis cache?

Thanks for your advices,

Fabien




More information about the SciPy-User mailing list