pycharm安装torch和torchvision报错问题记录

安装torch报错版本错误找不到版本解决方法:Could not find a version that satisfies the requirement torch==1.6.0使用以下方法解决:

pip install torch==0.4.1 -f https://download.pytorch.org/whl/torch_stable.html

安装torchversion==0.7.0错误报错:

ERROR: Could not find a version that satisfies the requirement torchvision==0.7.0 (from versions: 0.1.6, 0.1.7, 0.1.8, 0.1.9, 0.2.0, 0.2.1, 0.2.2, 0.2.2.post2, 0.2.2.post3, 0.5.0, 0.9.0, 0.9.1)
ERROR: No matching distribution found for torchvision==0.7.0

使用以下方法解决:

pip install torchversion==0.7.0 -f https://download.pytorch.org/whl/torch_stable.html

  • 0
    点赞
  • 5
    收藏
    觉得还不错? 一键收藏
  • 1
    评论
要在PyCharm安装torchtorchvision,你可以按照以下步骤进行操作: 1. 首先,你需要下载torchtorchvision安装包。你可以从PyTorch官方网站下载torch安装包,网址为。打开该链接后,找到适合你的操作系统和Python版本的安装包,并下载。 2. 安装torchtorchvision安装包。在PyCharm中,你可以使用以下两种方式来安装: - 在PyCharm的终端中使用pip命令来安装。在终端中输入以下命令: ``` pip install torch==x.x.x torchvision==x.x.x ``` 将"x.x.x"替换为你下载的安装包的具体版本号。 - 在PyCharm的Package Manager中安装。点击PyCharm的菜单栏中的"File",然后选择"Settings"。在弹出的窗口中,选择"Project: your_project_name",然后点击"Project Interpreter"。在右侧的窗口中,点击"+"按钮,然后搜索并选择torchtorchvision安装包,点击"Install Package"来安装。 3. 安装完成后,你可以在PyCharm中导入相应的库,并开始使用torchtorchvision。你可以使用以下代码验证安装是否成功: ```python import torch import torchvision # 验证torch是否安装成功 print(torch.__version__) # 验证torchvision是否安装成功 print(torchvision.__version__) ``` 请注意,根据你的操作系统和Python版本,安装过程可能会有所不同。确保你下载的安装包与你的操作系统和Python版本相匹配,以确保安装成功。 : https://download.pytorch.org/whl/torch_stable.html<span class="em">1</span><span class="em">2</span><span class="em">3</span> #### 引用[.reference_title] - *1* *2* [PycharmTorch安装方法](https://blog.csdn.net/soderayer/article/details/128881688)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v93^chatsearchT3_2"}}] [.reference_item style="max-width: 50%"] - *3* [pytorchtorchtorchvision 对应版本与链接及安装注意事项](https://blog.csdn.net/m0_56843848/article/details/129414600)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v93^chatsearchT3_2"}}] [.reference_item style="max-width: 50%"] [ .reference_list ]

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值