Per the Anaconda docs:
Conda is an open source package management system and environment management system for installing multiple versions of software packages and their dependencies and switching easily between them. It works on Linux, OS X and Windows, and was created for Python programs but can package and distribute any software.
Using Anaconda consists of the following:
- Install
miniconda
on your computer - Create a new
conda
environment using this project - Each time you wish to work, activate your
conda
environment
Download the latest version of miniconda
that matches your system.
NOTE: There have been reports of issues creating an environment using miniconda v4.3.13
. If it gives you issues try versions 4.3.11
or 4.2.12
from here.
Linux | Mac | Windows | |
---|---|---|---|
64-bit | 64-bit (bash installer) | 64-bit (bash installer) | 64-bit (exe installer) |
32-bit | 32-bit (bash installer) | 32-bit (exe installer) |
Install miniconda on your machine. Detailed instructions:
- Linux: https://conda.io/en/latest/miniconda.html#linux-installers
- Mac: https://conda.io/en/latest/miniconda.html#macosx-installers
- Windows: https://conda.io/en/latest/miniconda.html#windows-installers
Setup the carnd-term1
environment.
git clone https://github.com/udacity/CarND-Term1-Starter-Kit.git
cd CarND-Term1-Starter-Kit
If you are on Windows, rename
meta_windows_patch.yml
to
meta.yml
Create carnd-term1. Running this command will create a new conda
environment that is provisioned with all libraries you need to be successful in this program.
conda env create -f environment.yml
Note: Some Mac users have reported issues installing TensorFlow using this method. The cause is unknown but seems to be related to pip
. For the time being, we recommend opening environment.yml in a text editor and swapping
- tensorflow==0.12.1
with
- https://storage.googleapis.com/tensorflow/mac/cpu/tensorflow-0.12.1-py3-none-any.whl
If you have encountered a No module named 'requests' error, try to add in a line under 'pip' line in the environment.yml in a text editor
with
- requests
Note: In Project Behavioral Cloning, classroom workspaces has Keras==2.2.4 version and in Project Traffic Sign Classifier classroom workspaces has Keras==2.0.9. To install Keras==2.2.4 we would recommend opening environment.yml in a text editor and swapping
- keras==2.0.9
with
- keras==2.2.4
or write
pip install keras==2.2.4
Verify that the carnd-term1 environment was created in your environments:
conda info --envs
Cleanup downloaded libraries (remove tarballs, zip files, etc):
conda clean -tp
To uninstall the environment:
conda env remove -n carnd-term1
Prior to installing tensorflow-gpu for Ubuntu or Windows as part of the Anaconda environment for Nvidia GPUs, install the appropriate versions of CUDA Toolkit and cuDNN, along with the necessary Nvidia drivers. See Ubuntu instructions here and Windows instructions here.
When creating the environment, at the Create step above, change the command to:
conda env create -f environment-gpu.yml
Otherwise, follow the same steps as above.
Now that you have created an environment, in order to use it, you will need to activate the environment. This must be done each time you begin a new working session i.e. open a new terminal window.
Activate the carnd-term1
environment:
$ source activate carnd-term1
Depending on shell either:
$ source activate carnd-term1
or
$ activate carnd-term1
That's it. Now all of the carnd-term1
libraries are available to you.
To exit the environment when you have completed your work session, simply close the terminal window.