Anaconda on the AIR-T¶
Anaconda is a great virtual environment for developing Python applications and it is fully supported by the AIR-T and AirStack. This tutorial will show you how to create an AirStack Conda environment on the AIR-T. Anaconda comes pre-installed with a built-in local conda channels for the AIR-T drivers.
The following instructions apply to AirStack version 0.5.0 and newer. For AirStack 0.4, see this tutorial.
Create AirStack Conda Environment¶
We will now create a conda environment called airstack
using the airstack.yml
file provided by Deepwave. You may modify this to fit your application.
A few conda environment files are provided with the AIR-T for AirStack 0.5.0+ in /opt/deepwave/AIR-T_QuickStart_Apps/conda/environments
.
Build Conda Environment¶
On the AIR-T with AirStack 0.5.0+, run the following command to create the environment:
conda env create -f /opt/deepwave/AIR-T_QuickStart_Apps/conda/environments/airstack.yml
Testing a New Conda Environment¶
Activate the conda environment and check that the current python version comes from a conda path:
$ conda activate airstack
$ which python
/home/<your_user>/.conda/envs/airstack/bin/python
Then run the hello_world.py example included in AirStack:
python /opt/deepwave/AIR-T_QuickStart_Apps/python/hello_world.py
Removing the Conda Environment¶
To remove the AirStack Conda environment, run the following command:
conda remove --name airstack --all