当前位置:网站首页>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
边栏推荐
- Monkey测试
- Target free or target specific: a simple and effective zero sample position detection comparative learning method
- MySQL advanced SQL statement 2
- Which is better, industrial intelligent gateway or edge computing gateway? How to choose the right one?
- 2022-07-01: at the annual meeting of a company, everyone is going to play a game of giving bonuses. There are a total of N employees. Each employee has construction points and trouble points. They nee
- Go language introduction
- Pytorch---使用Pytorch进行图像定位
- Wpviewpdf Delphi and Net PDF viewing component
- pip 安装第三方库
- Pytoch --- use pytoch to predict birds
猜你喜欢

手撕——排序

The original author is out! Faker. JS has been controlled by the community..

树莓派GPIO引脚控制红绿灯与轰鸣器

Dare to go out for an interview without learning some distributed technology?

Microsoft Research Institute's new book "Fundamentals of data science", 479 Pages pdf

Hand tear - sort

The first practical project of software tester: web side (video tutorial + document + use case library)

First acquaintance with string+ simple usage (II)

Actual combat | use composite material 3 in application

Introduction to vmware workstation and vSphere
随机推荐
uni-app - 实现获取手机验证码倒计时 60 秒(手机号+验证码登录功能)
Yyds dry goods inventory kubernetes introduction foundation pod concept and related operations
JVM knowledge points
Actual combat | use composite material 3 in application
go 包的使用
Sword finger offer II 006 Sort the sum of two numbers in the array
Is it safe to open an account with first venture securities? I like to open an account. How can I open it?
QT designer plug-in implementation of QT plug-in
A thorough understanding of the development of scorecards - the determination of Y (Vintage analysis, rolling rate analysis, etc.)
Spring recruitment of Internet enterprises: Kwai meituan has expanded the most, and the annual salary of technical posts is up to nearly 400000
《动手学深度学习》(二)-- 多层感知机
IDEA xml中sql没提示,且方言设置没用。
10 minutes to understand CMS garbage collector in JVM
go 分支与循环
手撕——排序
A summary of common interview questions in 2022, including 25 technology stacks, has helped me successfully get an offer from Tencent
Common sense of cloud server security settings
Feature Engineering: summary of common feature transformation methods
Use of go package
66.qt quick QML Custom Calendar component (supports vertical and horizontal screens)