当前位置: 首页 > news >正文

本地安装yolo算法环境的步骤

下载pytorch到本地的命令

pip download torch==2.2.0 torchvision==0.17.0 torchaudio==2.2.0 --index-url https://download.pytorch.org/whl/cu121 -d C:\Users\Administrator\Desktop\pytorch2.2.0-py3.8-gpu11.8 --python-version 38 --platform win_amd64  --only-binary=:all:

注意选择好下载路径【-d后面的参数为路径】

注意选择好python版本【--python-version 38】这个38代表python3.8

注意选择好需要安装的平台【--platform win_amd64】代表下载windows64位版本的

1、本地安装gpu版本的torch
在pycharm终端,通过cd 命令,切换到本地torch的安装包所在的文件夹
然后进行本地安装,使用:
pip install torch文件名字.whl 

批量安装使用:
for %i in (*.whl) do pip install "%i"

for %i in (*.whl) do pip install "%i"

在PS窗口时运行:
Get-ChildItem *.whl | ForEach-Object { pip install $_.FullName }

Get-ChildItem *.whl | ForEach-Object { pip install $_.FullName }


2、安装ultralytics
为避免ultralytics自动安装cpu版本的torch,覆盖第一步安装的gpu版本的torch
使用:
pip install ultralytics --no-deps


pip install -i https://pypi.tuna.tsinghua.edu.cn/simple ultralytics --no-deps


pip install ultralytics==8.2.45 -i https://pypi.tuna.tsinghua.edu.cn/simple --no-deps

pip install ultralytics==8.2.45 -i https://pypi.tuna.tsinghua.edu.cn/simple --no-deps


3、由于第2步单独安装了ultralytics还有很多包没有安装,因此接着安装

yolo-requirements.txt  如下

opencv-python
matplotlib>=3.3.0
pandas>=1.1.4
pillow>=7.1.2
psutil
py-cpuinfo
pyyaml>=5.3.1
requests>=2.23.0
scipy>=1.4.1
seaborn>=0.11.0
tqdm>=4.64.0
einops
numpy==1.24.4

pip install -r yolo-requirements.txt

pip install -r yolo-requirements.txt -i https://pypi.tuna.tsinghua.edu.cn/simple

pip install -r yolo-requirements.txt -i https://pypi.tuna.tsinghua.edu.cn/simple

直接指定yolo-requirements.txt的绝对路径:
pip install -r E:\yolo-requirements.txt -i https://pypi.tuna.tsinghua.edu.cn/simple


可能还需安装其余的库

No module named 'einops'

pip install dill -i https://pypi.tuna.tsinghua.edu.cn/simple

pip install numpy==1.24.4 -i https://pypi.tuna.tsinghua.edu.cn/simple

pip install numpy==1.24.4 -i https://pypi.tuna.tsinghua.edu.cn/simple

http://www.dtcms.com/a/532287.html

相关文章:

  • 8.1 时钟树
  • perl网站建设南宁网站定制
  • 计算机网络自顶向下方法6——应用层 进程通信与运输服务
  • HTTP 常考问题简洁回答(速记版)
  • MQTT 与 HTTP 协议对比
  • 商城网站建设视频教程wordpress教程cms
  • SZU大学物理A2实验报告-汇总链接-free
  • IOT项目——电源入门系列-第四章
  • ① leetcode刷题汇总(数组 / 字符串)
  • 网站名称填写什么晋中品牌网站建设建设
  • 宫殿记忆术AI训练系统:可扩展的终身记忆框架
  • 掌握机器学习算法及其关键超参数
  • 网站建设收费价目表织梦制作网站如何上线
  • 【传奇开心果系列】基于Flet框架实现的窗口加载显示本地图像示例自定义模板实现原理深度解析
  • 机器学习算法常用算法
  • Gorm(七)关联的Tag写法
  • 零基础理解k8s
  • *Python基础语法
  • 广东卫视你会怎么做网站化妆品网站的建设方案
  • WPF 静态样式与动态样式的定义及使用详解
  • 有没有专业做盐的网站手机wap网站程序
  • 【线程同步系列6】一个基于VC封装的多线程类CMyThread(类似QT中的QThread类的run方法)
  • python+vue旅游购票管理系统设计(源码+文档+调试+基础修改+答疑)
  • 宠物管理|宠物店管理|基于SSM+vue的宠物店管理系统(源码+数据库+文档)
  • 站内关键词自然排名优化制作图片的免费软件
  • Cline中模型识别任务与clinerules相关性的实现逻辑
  • Linux 进程面试考点:进程状态、通信方式、信号量等关键问题速记
  • 网站建设有哪些类型西昌网站建设公司
  • 风中有朵雨做的云网站观看美容网站开发
  • Java IO 流详解:字符流(Reader/Writer)与字符编码那些事