Skip to content

Python Environment

Let's setup environment here

create env

  1. install anaconda or miniconda anaconda
  2. install python common packages
conda create -n fz2h_course python=3.10  

If you are from china(mainland):

conda activate fz2h_course
pip install numpy pandas matplotlib opencv-python -i https://pypi.tuna.tsinghua.edu.cn/simple

else:

conda activate fz2h_course
pip install numpy pandas matplotlib opencv-python 
  1. install pytorch If you only have cpu:
conda activate fz2h_course
pip install torch torchvision --index-url https://download.pytorch.org/whl/cpu

If you have nvidia gpu (e.g., RTX 3060 etc):

Use the command to check your gpu version:

nvidia-smi

Select the correct pytorch version:

pytorch

conda activate fz2h_course
pip install torch torchvision --index-url https://download.pytorch.org/whl/cu118