简体   繁体   English

Pip 无法通过 ROCm 安装识别 PyTorch

[英]Pip not recognizing PyTorch with ROCm installation

On the PyTorch website it lists two blocks of commands for the ROCm version installation.PyTorch 网站上,它列出了 ROCm 版本安装的两个命令块。 The first one, that installs torch itself, goes well, but when I try to import it shows this message.第一个安装 Torch 本身,运行良好,但是当我尝试导入它时会显示此消息。

ImportError: libtinfo.so.5: cannot open shared object file: No such file or directory

Also, when trying to install the torchvision package with the second block of commands, it shows a similar error.此外,当尝试使用第二个命令块安装 torchvision 包时,它显示了类似的错误。

ModuleNotFoundError: No module named 'torch'

This only happens for with the ROCm compute platform.这仅适用于 ROCm 计算平台。 Installing with CUDA works just fine, but unfortunately I don't have a NVidia GPU.使用 CUDA 安装工作正常,但不幸的是我没有 NVidia GPU。

I believe it was a bug that haven't been fixed.我相信这是一个尚未修复的错误。 You can make a local symbolic link named libtinfo.6.so to /usr/lib/libtinfo5.so , in the same folder as libtaichi_core.so您可以在与libtaichi_core.so相同的文件夹中创建一个名为libtinfo.6.so的本地符号链接到/usr/lib/libtinfo5.so

This should solve it,这个应该可以解决

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM