用requirements.txt配置环境
1. 在anaconda创建环境
创建Python版本为3.8的环境,与yolov5所需的包适配。
2. 在Anaconda Prompt中激活环境
(base) C:\Users\吴伊晴>conda activate yolov5
3. 配置环境
用指定路径中的requirements.txt配置环境。
(yolov5) C:\Users\吴伊晴>pip install -r D:\object_detection\yolov5-master\requirements.txt
Collecting gitpython>=3.1.30 (from -r D:\object_detection\yolov5-master\requirements.txt (line 5))
Downloading GitPython-3.1.43-py3-none-any.whl.metadata (13 kB)
Collecting matplotlib>=3.3 (from -r D:\object_detection\yolov5-master\requirements.txt (line 6))
Downloading matplotlib-3.7.5-cp38-cp38-win_amd64.whl.metadata (5.8 kB)
Collecting numpy>=1.23.5 (from -r D:\object_detection\yolov5-master\requirements.txt (line 7))
Downloading numpy-1.24.4-cp38-cp38-win_amd64.whl.metadata (5.6 kB)
Collecting opencv-python>=4.1.1 (from -r D:\object_detection\yolov5-master\requirements.txt (line 8))
Downloading opencv_python-4.10.0.84-cp37-abi3-win_amd64.whl.metadata (20 kB)
Collecting pillow>=10.3.0 (from -r D:\object_detection\yolov5-master\requirements.txt (line 9))
Downloading pillow-10.4.0-cp38-cp38-win_amd64.whl.metadata (9.3 kB)
Collecting psutil (from -r D:\object_detection\yolov5-master\requirements.txt (line 10))
Downloading psutil-6.0.0-cp37-abi3-win_amd64.whl.metadata (22 kB)
Collecting PyYAML>=5.3.1 (from -r D:\object_detection\yolov5-master\requirements.txt (line 11))
Downloading PyYAML-6.0.1-cp38-cp38-win_amd64.whl.metadata (2.1 kB)
Collecting requests>=2.32.0 (from -r D:\object_detection\yolov5-master\requirements.txt (line 12))
Downloading requests-2.32.3-py3-none-any.whl.metadata (4.6 kB)
Collecting scipy>=1.4.1 (from -r D:\object_detection\yolov5-master\requirements.txt (line 13))
Downloading scipy-1.10.1-cp38-cp38-win_amd64.whl.metadata (58 kB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 59.0/59.0 kB 447.1 kB/s eta 0:00:00
Collecting thop>=0.1.1 (from -r D:\object_detection\yolov5-master\requirements.txt (line 14))
Using cached thop-0.1.1.post2209072238-py3-none-any.whl.metadata (2.7 kB)
Collecting torch>=1.8.0 (from -r D:\object_detection\yolov5-master\requirements.txt (line 15))
Downloading torch-2.3.1-cp38-cp38-win_amd64.whl.metadata (26 kB)
Collecting torchvision>=0.9.0 (from -r D:\object_detection\yolov5-master\requirements.txt (line 16))
Downloading torchvision-0.18.1-cp38-cp38-win_amd64.whl.metadata (6.6 kB)
Collecting tqdm>=4.64.0 (from -r D:\object_detection\yolov5-master\requirements.txt (line 17))
Using cached tqdm-4.66.4-py3-none-any.whl.metadata (57 kB)
Collecting ultralytics>=8.2.34 (from -r D:\object_detection\yolov5-master\requirements.txt (line 18))
Downloading ultralytics-8.2.49-py3-none-any.whl.metadata (41 kB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 41.2/41.2 kB 999.0 kB/s eta 0:00:00
Collecting pandas>=1.1.4 (from -r D:\object_detection\yolov5-master\requirements.txt (line 27))
Downloading pandas-2.0.3-cp38-cp38-win_amd64.whl.metadata (18 kB)
Collecting seaborn>=0.11.0 (from -r D:\object_detection\yolov5-master\requirements.txt (line 28))
Using cached seaborn-0.13.2-py3-none-any.whl.metadata (5.4 kB)
Requirement already satisfied: setuptools>=65.5.1 in d:\env\anaconda\envs\yolov5\lib\site-packages (from -r D:\object_detection\yolov5-master\requirements.txt (line 42)) (69.5.1)
Collecting gitdb<5,>=4.0.1 (from gitpython>=3.1.30->-r D:\object_detection\yolov5-master\requirements.txt (line 5))
Downloading gitdb-4.0.11-py3-none-any.whl.metadata (1.2 kB)
Collecting contourpy>=1.0.1 (from matplotlib>=3.3->-r D:\object_detection\yolov5-master\requirements.txt (line 6))
Downloading contourpy-1.1.1-cp38-cp38-win_amd64.whl.metadata (5.9 kB)
Collecting cycler>=0.10 (from matplotlib>=3.3->-r D:\object_detection\yolov5-master\requirements.txt (line 6))
Downloading cycler-0.12.1-py3-none-any.whl.metadata (3.8 kB)
Collecting fonttools>=4.22.0 (from matplotlib>=3.3->-r D:\object_detection\yolov5-master\requirements.txt (line 6))
Downloading fonttools-4.53.1-cp38-cp38-win_amd64.whl.metadata (165 kB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 165.9/165.9 kB 905.1 kB/s eta 0:00:00
Collecting kiwisolver>=1.0.1 (from matplotlib>=3.3->-r D:\object_detection\yolov5-master\requirements.txt (line 6))
Downloading kiwisolver-1.4.5-cp38-cp38-win_amd64.whl.metadata (6.5 kB)
Collecting packaging>=20.0 (from matplotlib>=3.3->-r D:\object_detection\yolov5-master\requirements.txt (line 6))
Downloading packaging-24.1-py3-none-any.whl.metadata (3.2 kB)
Collecting pyparsing>=2.3.1 (from matplotlib>=3.3->-r D:\object_detection\yolov5-master\requirements.txt (line 6))
Downloading pyparsing-3.1.2-py3-none-any.whl.metadata (5.1 kB)
Collecting python-dateutil>=2.7 (from matplotlib>=3.3->-r D:\object_detection\yolov5-master\requirements.txt (line 6))
Using cached python_dateutil-2.9.0.post0-py2.py3-none-any.whl.metadata (8.4 kB)
Collecting importlib-resources>=3.2.0 (from matplotlib>=3.3->-r D:\object_detection\yolov5-master\requirements.txt (line 6))
Downloading importlib_resources-6.4.0-py3-none-any.whl.metadata (3.9 kB)
Collecting charset-normalizer<4,>=2 (from requests>=2.32.0->-r D:\object_detection\yolov5-master\requirements.txt (line 12))
Downloading charset_normalizer-3.3.2-cp38-cp38-win_amd64.whl.metadata (34 kB)
Collecting idna<4,>=2.5 (from requests>=2.32.0->-r D:\object_detection\yolov5-master\requirements.txt (line 12))
Using cached idna-3.7-py3-non