pip 安装 pytorch环境

发布时间:2024-11-16 19:08

利用自动化构建工具如npm、pip #生活技巧# #编程开发#

直接 pip install torch -i https://pypi.tuna.tsinghua.edu.cn/simple

Building wheel for torch (setup.py) ... error ERROR: Failed building wheel for torch 12

失败

pip install --upgrade torch torchvision -i https://pypi.tuna.tsinghua.edu.cn/simple 1

还是失败

ERROR: torchvision 0.5.0 has requirement torch==1.4.0, but you'll have torch 0.1.2.post2 which is incompatible. 1

再次尝试

pip install --upgrade torch==1.4.0 torchvision==0.5.0 -i https://pypi.tuna.tsinghua.edu.cn/simple 但是还是安装失败 Looking in indexes: https://pypi.tuna.tsinghua.edu.cn/simple ERROR: Could not find a version that satisfies the requirement torch==1.4.0 (from versions: 0.1.2, 0.1.2.post1, 0.1.2.post2) ERROR: No matching distribution found for torch==1.4.0 12345

最后找到一种新的方式:
https://pytorch.org/get-started/locally/
win10-pip-cpu

最后安装成功(还得看网速,在另一台笔记本上面就是超时了),注意是使用 pip install,而不是 conda install(安装失败)

pip install torch==1.4.0+cpu torchvision==0.5.0+cpu -f https://download.pytorch.org/whl/torch_stable.html 1

在这里插入图片描述

网址:pip 安装 pytorch环境 https://www.yuejiaxmz.com/news/view/93558

相关内容

创建虚拟环境并,创建pytorch 1.3.1
PyCharm+Python3.8+OpenCV4.1集成环境安装配置
web自动化测试——通过pip安装selenium
pytorch中的model=model.to(device)使用说明
Python机器学习数据挖掘工具sklearn安装和使用
【Python小技巧】pip镜像源:清华镜像、阿里云镜像、豆瓣镜像与如何修改默认镜像源
Python中的Numpy、SciPy、MatPlotLib安装与配置
联塑家装硬装篇:打造安全舒适的家居环境
sift = cv2.xfeatures2d.SIFT
【计算机视觉】基于Python—OpenCV的手势识别详解(一)

随便看看