当前位置:网站首页>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
边栏推荐
- Microsoft Research Institute's new book "Fundamentals of data science", 479 Pages pdf
- Wechat applet - realize the countdown of 60 seconds to obtain the mobile verification code (mobile number + verification code login function)
- Suggestions on settlement solution of u standard contract position explosion
- Target free or target specific: a simple and effective zero sample position detection comparative learning method
- Jetpack's livedata extension mediatorlivedata
- 整理了一份ECS夏日省钱秘籍,这次@老用户快来领走
- 66.qt quick QML Custom Calendar component (supports vertical and horizontal screens)
- Go function
- Actual combat | use composite material 3 in application
- Which is better, industrial intelligent gateway or edge computing gateway? How to choose the right one?
猜你喜欢

《动手学深度学习》(二)-- 多层感知机

Use of go package

go 包的使用

Playing with concurrency: what are the ways of communication between threads?

office_ Delete the last page of word (the seemingly blank page)

Common sense of cloud server security settings

Spring moves are coming. Watch the gods fight

A thorough understanding of the development of scorecards - the determination of Y (Vintage analysis, rolling rate analysis, etc.)

【c语言】动态规划---入门到起立

【力扣刷题】15.三数之和(双指针);17.电话号码的字母组合(递归回溯)
随机推荐
Finally got byte offer. The 25-year-old inexperienced perception of software testing is written to you who are still confused
How to solve the code error when storing array data into the database
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
WPViewPDF Delphi 和 .NET 的 PDF 查看组件
Nacos 配置中心整体设计原理分析(持久化,集群,信息同步)
Pytoch --- use pytoch to predict birds
[source code analysis] NVIDIA hugectr, GPU version parameter server - (1)
QT designer plug-in implementation of QT plug-in
Yyds dry goods inventory kubernetes introduction foundation pod concept and related operations
LCM of Spreadtrum platform rotates 180 °
【leetcode】81. Search rotation sort array II
Www 2022 | rethinking the knowledge map completion of graph convolution network
Monkey test
Typescript practice for SAP ui5
Which is better, industrial intelligent gateway or edge computing gateway? How to choose the right one?
文档声明与字符编码
[live broadcast review] the first 8 live broadcasts of battle code Pioneer have come to a perfect end. Please look forward to the next one!
go 变量与常量
powershell_ View PowerShell function source code (environment variable / alias) / take function as parameter
Installation et utilisation du lac bleu