I am trying to setup a travis continuous build system with my project, which has numpy, scipy and matplotlib in its dependencies. I am targeting python 3.3.
In my .travis.yml
script I am installing numpy and scipy from apt-get, as well as (to be sure) from pip (only numpy). Unfortunatelly, matplotlib build still says that numpy is missing from deps. I tried almost all the methods found on the WEB but most of them do not work (they are outdated I think).
language: python
python:
- "3.3"
install:
- pip install numpy
- pip install colorama
- pip install matplotlib
- pip install nose
script: nosetests
virtualenv:
system_site_packages: true
before_install:
- sudo apt-get update -qq
- sudo apt-get install -qq python3-numpy python3-scipy
Below is the interesting part of travis log. It says that dependence is not satisfied, yet pip command can see numpy installed already from apt.
BUILDING MATPLOTLIB
matplotlib: 1.2.0
python: 3.3.2 (default, May 16 2013, 18:32:41) [GCC 4.6.3]
platform: linux
REQUIRED DEPENDENCIES
numpy: no
* You must install numpy 1.4 or later to build
* matplotlib.
Complete output from command python setup.py egg_info:
basedirlist is: ['/usr/local', '/usr']
If you don't need to test against multiple python versions, the easiest trick is to tell travis that your language is c
and then install everything from apt-get. This gets around all of the issues with system_site_packages and virtualenv.
This library, for instance, uses travis-ci for testing and depends on the full scipy stack (numpy, scipy, matplotlib, pytables, pandas, etc), which is installed via apt
with language=c
.
https://github.com/rmcgibbo/mdtraj/blob/master/.travis.yml
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With