Only run `deactivate` if running on Linux
This is because Linux has `language: python` but Mac has `language: generic`.
@@ -2,7 +2,10 @@ if [[ "$DISTRIB" == "conda" ]]; then
# Deactivate the travis-provided virtual environment and setup a
# conda-based environment instead
+ if [ $TRAVIS_OS_NAME = 'linux' ]; then
+ # Only Linux has a virtual environment activated; Mac does not.
deactivate
+ fi
# Use the miniconda installer for faster download / install of conda
# itself
