我正在尝试在我的windows电脑上安装pytorch/torch,我试过了
pip intall pytorch
C:\Users\mouss>pip install pytorch
Collecting pytorch
Using cached pytorch-1.0.2.tar.gz (689 bytes)
Preparing metadata (setup.py) ... done
Building wheels for collected packages: pytorch
Building wheel for pytorch (setup.py) ... error
error: subprocess-exited-with-error
× python setup.py bdist_wheel did not run successfully.
│ exit code: 1
╰─> [6 lines of output]
Traceback (most recent call last):
File "<string>", line 2, in <module>
File "<pip-setuptools-caller>", line 34, in <module>
File "C:\Users\mouss\AppData\Local\Temp\pip-install-re456wuk\pytorch_687632f0314d499d868cb85ed33f83ba\setup.py", line 15, in <module>
raise Exception(message)
Exception: You tried to install "pytorch". The package named for PyTorch is "torch"
[end of output]
note: This error originates from a subprocess, and is likely not a problem with pip.
ERROR: Failed building wheel for pytorch
Running setup.py clean for pytorch
Failed to build pytorch
Installing collected packages: pytorch
Running setup.py install for pytorch ... error
error: subprocess-exited-with-error
× Running setup.py install for pytorch did not run successfully.
│ exit code: 1
╰─> [6 lines of output]
Traceback (most recent call last):
File "<string>", line 2, in <module>
File "<pip-setuptools-caller>", line 34, in <module>
File "C:\Users\mouss\AppData\Local\Temp\pip-install-re456wuk\pytorch_687632f0314d499d868cb85ed33f83ba\setup.py", line 11, in <module>
raise Exception(message)
Exception: You tried to install "pytorch". The package named for PyTorch is "torch"
[end of output]
note: This error originates from a subprocess, and is likely not a problem with pip.
error: legacy-install-failure
× Encountered error while trying to install package.
╰─> pytorch
note: This is an issue with the package mentioned above, not pip.
hint: See above for output from the failure.
基于
Exception: You tried to install "pytorch". The package named for PyTorch is "torch"
,我发现它的名字改成了torch
,所以我尝试了pip install torch
C:\Users\mouss>pip install torch
ERROR: Could not find a version that satisfies the requirement torch (from versions: none)
ERROR: No matching distribution found for torch
你知道如何在我的电脑上安装 pytorch/torch 吗?
pip3 install torch torchvision torchaudio --extra-index-url https://download.pytorch.org/whl/cu116