Use miniconda to install python packages in Travis#336
Merged
Conversation
Should provide more up-to-date python modules
Merged
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problems with using python with Travis seem to be quite common. Travis themselves recommend not using the system package manager to install python modules, but then trying to install e.g. Numpy through pip is a bit of a nightmare and can take ages.
Instead, using Conda's Miniconda to download vaguely up-to-date pre-compiled packages. This gives also gives us access to the python NetCDF module, which is a bit better than the Scipy version. It also makes a virtual environment, so it should ensure we don't accidentally use any system-python things.
One big side-effect of this is that it does use python 3. Luckily, we're python 3 compatible, so all the tests pass! But this will enforce future tests being python 3 compatible.
Also, I explicitly don't install matplotlib. Some of the tests try to use it to make figures, but at least one of the tests aborts rather than throws an exception which would otherwise be caught.