Python / Conda Intro

Python

Python

Installing

Libraries

  • Numpy
  • Scipy
  • Matplotlib
  • Sympy
  • Pandas
  • Jupyter

Other Notable Packages

  • subprocess
  • multiprocessing
  • yaml
  • opencv
  • pytorch
  • pyqt
  • pyqtgraph
  • pyserial

Conda

conda list

Conda Environments

Create, List, and Destroy

conda create --name <env name>
conda info --envs
conda remove --name <env name> --all
conda activate <env name>
conda deactivate
conda activate <env name>
conda env export > environment.yml
conda list -n <env name> -r
conda install --revision <revision-num>
conda activate
conda init --reverse --all
rm -rf ~/anaconda3
rm -rf ~/miniconda3

https://docs.anaconda.com/free/anaconda/install/uninstall/ https://docs.conda.io/projects/conda/en/latest/user-guide/tasks/manage-environments.html

Conda & ROS

  • Historically, the Anaconda distribution does not play nice with ROS.

Numpy

Great overview, oriented for MatLab Users converting to Python

Scipy

Documentation API

Major Scipy Packages

Matplotlib

Matplotlib Types

Pandas

  • Better for structured array data
  • Concept of a DataFrame

:::{style=“font-size:12pt;”}

Sympy

  • Symbolic Representation of

Visualizaiton

Simple Conda Environment Environment

make sure you have already installed

ffmpeg gstreamer1.0-plugins-good gstreamer1.0-plugins-bad gstreamer1.0-plugins-ugly

conda create -n cv
conda activate cv
conda install pip
conda install -y jupyter matplotlib numpy scipy
conda install -y -c conda-forge opencv
jupyter lab

Open and run your code

Delete your environment

conda remove --name cv --all