当前位置:网站首页>Pytorch yolov5 exécute la résolution de bogues à partir de 0:
Pytorch yolov5 exécute la résolution de bogues à partir de 0:
2022-07-02 04:15:00 【_ Bar _ Kx】
Hyperlien du Répertoire:
- Q: La version correspondante doit être installée pytorch 、 torchvision 、opencv Attendez une série de bibliothèques, Où installer?(Comment parfaitement changer de source)
- Q: import cv2 - Oui. libGL.so.1: cannot open shared object file: No such file or directory
- Q:AttributeError: ‘Upsample’ object has no attribute ‘recompute_scale_factor’
Processus: docker Après avoir créé le miroir, Installation dans le miroiranacondaAprès,Créer yolov5L'environnement de
Q: La version correspondante doit être installée pytorch 、 torchvision 、opencv Attendez une série de bibliothèques, Où installer?(Comment parfaitement changer de source)
Details:MaisAnacodna La source par défaut est étrangère,Ça nous ralentit l'installation,pip (pythonLa source de l'outil de gestion des paquets est également étrangère,On doit changer de source、Ou lors de l'installation,Changement temporaire de source)
Solutions:
1. anaconda Quand vous ajoutez une source,Assurez - vous d'écrire http N'écris pas. https
# Exécutez la commande sur la ligne de commande du terminal
conda config --add channels http://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/pytorch/
conda config --add channels http://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/menpo/
conda config --add channels http://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/bioconda/
conda config --add channels http://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/msys2/
conda config --add channels http://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/conda-forge/
conda config --add channels http://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main/
conda config --add channels http://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/free/
conda config --set show_channel_urls yes
Après exécution,Vous verrez que dans home Il y en a un de plus dans le catalogue. .condarc Documents
- vim ~/.condarc
Il se lit comme suit::
channels:
- http://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/pytorch/
- http://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/menpo/
- http://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/bioconda/
- http://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/msys2/
- http://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/conda-forge/
- http://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main/
- http://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/free/
Jusqu'ici., Changement de source réussi , Disponible sur le site officiel de pytorch Commande d'installation pour installer .
- N'oubliez pas, Supprimer la fin -c Ptyorch ( -c, Oui. -channel DePytorch Installation du site officiel ,Particulièrement lent, Il y a une forte probabilité d'échec )
- Pytorch Site officiel:
- https://pytorch.org/
- Ancienne version:https://pytorch.org/get-started/previous-versions/
2. pip Changement de source
#Tsinghua:
https://pypi.tuna.tsinghua.edu.cn/simple
#Alicloud:
http://mirrors.aliyun.com/pypi/simple/
#Pétales de haricot:
http://pypi.douban.com/simple/
- yolov5 Commande d'installation suivante ( Tirez directement et installez yolov5 Toutes les bibliothèques sous la version correspondante ):
pip install -r requirements.txt -i https://pypi.tuna.tsinghua.edu.cn/simple –-trusted-host pypi.douban.com
Q:import cv2 - Oui. libGL.so.1: cannot open shared object file: No such file or directory
Solutions:
pip install opencv-python-headless
Référence de:https://blog.csdn.net/qq_50195602/article/details/124188467
Le frère a expliqué plus en détail , J'ai même dit comment dockerfile Ajouter la commande d'installation ,Pour contourner ce problème.
Q:AttributeError: 'Upsample' object has no attribute 'recompute_scale_factor'
Description: Je raisonne. yolov5 Erreur lors de la démonstration de l'image de l'exemple .
Raisons: torch Et torchvision En raison d'un décalage de version ;
Solutions:
- Installer la version correspondante
- Changement upsample.py Code dans, Supprimer le paramètre de la fonction
RÉFÉRENCES: https://blog.csdn.net/qq_40280673/article/details/125095353
边栏推荐
猜你喜欢
![[JS event -- event flow]](/img/fe/199890b082845f68b65f25056e6f29.jpg)
[JS event -- event flow]

Hands on deep learning (II) -- multi layer perceptron

整理了一份ECS夏日省钱秘籍,这次@老用户快来领走

藍湖的安裝及使用

Pytoch --- use pytoch for image positioning

Pytoch --- use pytoch to realize u-net semantic segmentation

66.qt quick QML Custom Calendar component (supports vertical and horizontal screens)

文档声明与字符编码

Force buckle 540 A single element in an ordered array

First acquaintance with string+ simple usage (II)
随机推荐
手撕——排序
C language: examples of logical operation and judgment selection structure
[Li Kou brush questions] 15 Sum of three numbers (double pointer); 17. Letter combination of phone number (recursive backtracking)
66.qt quick-qml自定义日历组件(支持竖屏和横屏)
QT designer plug-in implementation of QT plug-in
Mysql中常见的锁
MySQL error: expression 1 of select list is not in group by claim and contains nonaggre
Realizing deep learning framework from zero -- Introduction to neural network
Handling of inconsistency between cursor and hinttext position in shutter textfield
Shenzhen will speed up the cultivation of ecology to build a global "Hongmeng Oula city", with a maximum subsidy of 10million yuan for excellent projects
office_ Delete the last page of word (the seemingly blank page)
MySQL advanced SQL statement 2
Spring moves are coming. Watch the gods fight
66.qt quick QML Custom Calendar component (supports vertical and horizontal screens)
FAQ | FAQ for building applications for large screen devices
Learn more about materialapp and common attribute parsing in fluent
[tips] use Matlab GUI to read files in dialog mode
go 包的使用
powershell_ View PowerShell function source code (environment variable / alias) / take function as parameter
XSS prevention