activate_python_env_EXAMPLE.sh 412 B

123456789101112131415161718
  1. #!/bin/bash
  2. # Adjust CONDADIR to point to your anaconda installation
  3. CONDADIR=$HOME/anaconda/bin
  4. export PATH="$CONDADIR:$PATH"
  5. export ENVNAME=objsim
  6. # example for anaconda, using "source activate"
  7. source activate $ENVNAME
  8. if [ $? -ne 0 ]
  9. then
  10. conda create --name $ENVNAME scipy numpy matplotlib jupyter
  11. source activate $ENVNAME
  12. fi
  13. # alternative for virtualenvwrapper is to use "workon"
  14. # workon $ENVNAME