CPM-Bee icon indicating copy to clipboard operation
CPM-Bee copied to clipboard

请问 Linux下安装requirements.txt 报错是什么问题导致的呢 windows也是同样的错误

Open xiaoguaishoubaobao opened this issue 1 year ago • 1 comments

下面是报错信息

image


`Collecting torch<2.0.0,>=1.10 Downloading torch-1.13.1-cp39-cp39-manylinux1_x86_64.whl (887.4 MB) ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 887.4/887.4 MB ? eta 0:00:00 Collecting bmtrain>=0.2.1 Downloading bmtrain-0.2.2.tar.gz (58 kB) ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 58.7/58.7 kB 28.4 kB/s eta 0:00:00 Preparing metadata (setup.py) ... error error: subprocess-exited-with-error

× python setup.py egg_info did not run successfully. │ exit code: 1 ╰─> [6 lines of output] Traceback (most recent call last): File "", line 2, in File "", line 34, in File "/tmp/pip-install-kmtzs45_/bmtrain_31c78e2ca2a3437895f41620e4785051/setup.py", line 2, in import torch ModuleNotFoundError: No module named 'torch' [end of output]

note: This error originates from a subprocess, and is likely not a problem with pip. error: metadata-generation-failed

× Encountered error while generating package metadata. ╰─> See above for output.

note: This is an issue with the package mentioned above, not pip. hint: See above for details.`

xiaoguaishoubaobao avatar Jun 09 '23 01:06 xiaoguaishoubaobao

问题解决了 那个torch不能用pip instal torch 安装 需要用下面的命令

https://pytorch.org/get-started/previous-versions/

# CUDA 11.6
conda install pytorch==1.13.1 torchvision==0.14.1 torchaudio==0.13.1 pytorch-cuda=11.6 -c pytorch -c nvidia
# CUDA 11.7
conda install pytorch==1.13.1 torchvision==0.14.1 torchaudio==0.13.1 pytorch-cuda=11.7 -c pytorch -c nvidia
# CPU Only
conda install pytorch==1.13.1 torchvision==0.14.1 torchaudio==0.13.1 cpuonly -c pytorch

xiaoguaishoubaobao avatar Jun 09 '23 05:06 xiaoguaishoubaobao