Python Anaconda
This is a guide for how to configure an anaconda environment to install python packages on our servers
Note: this only works on servers with anaconda installed, check this with the following command:
anaconda -V
If you do not get a response from anaconda but want to have anaconda installed, email us atroot@cs.odu.edu
What is anaconda
Conda is an Open-Source package and environment management system which can install, run and update python packages and their dependencies
(source: anaconda.com)
How To Use
Virtual Environment
-
First we need to make a virtual environment, this can be done with the following command:
conda create --name <name>
ensure to replace
<name>
with your desired environment name if you want to use a specific python version, include the flagpython=<version>
with your desired version -
enter
y
to proceed
Installing Packages
To install a python in your anaconda environment, use the following:
conda install --name <name> <package>
rensure to replace
<name>
and<package>
with the desired if you want to use a specific package version, use the following<package>=<version>
. such asscipy=0.17.3
Using The Environment
-
Enter the environment with the following command:
conda activate <name>
ensure to replace
<name>
with your environment name -
Execute the python script just like you normally would:
python <script>
- To leave the environment run the following command:
conda deactivate
further documentation
Here is the official conda documentation: conda.io