torchsort installation error: ModuleNotFoundError: No module named 'torch'

[Problem]
An error occurred when installing torchsort ModuleNotFoundError: No module named 'torch'.
But torch is actually installed.
[Solution]
This is a problem with the pip version, just roll back to the old version.

pip --version # 查看当前pip版本
pip install pip== # 查看pip所有版本
pip install pip==23.0 # 回退pip至较新版本,该版本可以安装torchsort
pip install torchsort # 回退pip后安装torchsort

When installing torchaudio, update pip to the latest version (23.1.2), and then install torchsort and an error will be reported:
Insert image description here
The installation was successful after rolling back the version.
Insert image description here

Guess you like

Origin blog.csdn.net/qq_39735236/article/details/131953983