title: Install Numpy 1.8 in Travis CI
body: <p>Within my project, I (have to) use a feature included in Numpy 1.8, but not in earlier versions (the <code>formatter</code>option of <code>numpy.set_printoptions</code>).</p>
  
  <p>Since Travis CI build machines are based on Ubuntu 12.04, by default I only have Numpy 1.6.1 available. I then tried to install the Numpy-1.8.1-Debian-package for Ubuntu 14.04 and it's dependencies manually, which led to further problems:</p>
  
  <p>I need to install the packages <code>libblas3</code> and <code>liblapack3</code> to be able to install Numpy 1.8, which is not possible when <code>liblapack3gf</code> and <code>libblas3gf</code> are installed on the system (which are there by default), since the packages would "break" them. If I <code>apt-get remove</code> them, <strong>automatically</strong> <code>libatlas3gf-base</code> is being installed via the same <code>apt-get</code>-command (which is not the case on a standard Ubuntu system, I even set one up on my local machine to make sure). If I then try to uninstall Vlibatlas3gf-baseV, again <code>liblapack3gf</code> and <code>libblas3gf</code> are automatically being installed again.</p>
  
  <p>I do not really know how to handle this problem, or how to get around it to get Numpy 1.8 working with Travis. I also tried the suggestions for upgrading Numpy via <code>pip</code> provided <a href="https://stackoverflow.com/questions/19839488/upgrade-to-numpy-1-8-0-on-ubuntu-12-04">here</a>, but within Travis this did not work.</p>
  
  <p>Any help is highly appreciated!</p>
  
  <p>Thank you very much!</p>
  
  <hr>
  
  <p><strong>The solution:</strong></p>
  
  <p>I completed rth's answer to the following <code>.travis.yml</code>-file, with further help from <a href="http://indexerror.net/699/travis-conda-no-module-named-setuptools" rel="nofollow noreferrer">here</a> and <a href="http://conda.pydata.org/docs/travis.html" rel="nofollow noreferrer">here</a>:</p>
  
  <pre><code>language: python
  
  matrix:
    include:
      - python: 2.7
        env: NUMPY=1.8 SCIPY=0.13
  
  notifications:
    email: false
  
  before_install:
   - travis_retry wget http://repo.continuum.io/miniconda/Miniconda-3.8.3-Linux-x86_64.sh -O miniconda.sh
   - chmod +x miniconda.sh
   - bash miniconda.sh -b -p $HOME/miniconda
   - export PATH=/home/travis/miniconda/bin:$PATH
   - conda update --yes conda
  
  install:
   - conda create --yes -n test python=$TRAVIS_PYTHON_VERSION
   - source activate test
   - conda install --yes numpy=$NUMPY scipy=$SCIPY matplotlib pip
   - pip install setuptools
   - [ ... some other packages to install ... ]
   - python setup.py install
  
  script:
   - nosetests
  </code></pre>
  
  <p>Now everything works as expected. Please note: you will <strong>not</strong> be able to import and use PyLab with this setup, see the comments below for the explanations.</p>