1. Download Anaconda
Official website link: https://www.anaconda.com/
It is not recommended to download from the official website here, the speed is very slow, Tsinghua source is recommended! ! !
Tsinghua source: https://mirrors.tuna.tsinghua.edu.cn/anaconda/archive/
After the installation is complete, click win to build, find the following Annaconda command line to open
Second, create our virtual environment
conda create -n your_env_name python=3.8
Your_env_name here refers to the name of your own environment
python=3.8 is your Python version
Then activate our virtual environment
conda activate your_env_name
As shown in the figure, after the leftmost (base) becomes your own environment name, it means that the entry is successful
Third, install pytorch and cuda
pip install torch==1.12.0+cu113 torchvision==0.13.0+cu113 --extra-index-url https://download.pytorch.org/whl/cu113
After the installation is complete, we need to download yolov7 from github, just click on github and search for yolov7
Then we need to find the path of the requirements.txt file of the downloaded file, and enter this path in the command interface just now
Fourth, install all yolov7 configuration files
Remember to delete the first line to avoid conflicts with the above-mentioned installation of pytorch and cuda commands
pip install -r requirements.txt -i https://pypi.tuna.tsinghua.edu.cn/simple
At this point we have installed the required configuration files
Five, install pycharm
Then we need to download pycharm: https://www.jetbrains.com/pycharm/
Select Community Community Edition
Six, add our environment to pycharm
Then click to open our project
Find the lower right corner and
find the environment that exists in annaconda as shown in the figure, and click ok after completion
Seven, test whether the installation is successful
Then open the detect.py file in the project to test whether the installation is successful
Renderings:
If the content is helpful to you, please like it, thank you!