Pip无法使用Python 3.8.5安装PyTorch

时间:2020-11-07 19:07:06

标签: python windows pip pytorch

这是我在尝试安装PyTorch时收到的错误消息!

$ pip install torch
Collecting torch
  Using cached torch-0.1.2.post2.tar.gz (128 kB)
 ** On entry to DGEBAL parameter number  3 had an illegal value
 ** On entry to DGEHRD  parameter number  2 had an illegal value
 ** On entry to DORGHR DORGQR parameter number  2 had an illegal value
 ** On entry to DHSEQR parameter number  4 had an illegal value
    ERROR: Command errored out with exit status 1:
     command: 'c:\users\eriku\appdata\local\programs\python\python38\python.exe' -c 'import sys, setuptools, tokenize; sys.argv[0] =
'"'"'C:\\Users\\eriku\\AppData\\Local\\Temp\\pip-install-_q32y4e_\\torch\\setup.py'"'"'; __file__='"'"'C:\\Users\\eriku\\AppData\\Loc
al\\Temp\\pip-install-_q32y4e_\\torch\\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\
r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' egg_info --egg-base 'C:\Users\eriku\AppData\Local\Te
mp\pip-pip-egg-info-095ert_w'
         cwd: C:\Users\eriku\AppData\Local\Temp\pip-install-_q32y4e_\torch\
    Complete output (9 lines):
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "C:\Users\eriku\AppData\Local\Temp\pip-install-_q32y4e_\torch\setup.py", line 147, in <module>
        import numpy as np
      File "c:\users\eriku\appdata\local\programs\python\python38\lib\site-packages\numpy\__init__.py", line 305, in <module>
        _win_os_check()
      File "c:\users\eriku\appdata\local\programs\python\python38\lib\site-packages\numpy\__init__.py", line 302, in _win_os_check
        raise RuntimeError(msg.format(__file__)) from None
    RuntimeError: The current Numpy installation ('c:\\users\\eriku\\appdata\\local\\programs\\python\\python38\\lib\\site-packages\\
numpy\\__init__.py') fails to pass a sanity check due to a bug in the windows runtime. See this issue for more information: no tinyurl
    ----------------------------------------
ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.

这些是我的系统规格:

Host Name:                 DESKTOP
OS Name:                   Microsoft Windows 10 Pro
OS Version:                10.0.19041 N/A Build 19041
OS Manufacturer:           Microsoft Corporation
OS Configuration:          Standalone Workstation
OS Build Type:             Multiprocessor Free
Registered Owner:          (not leaking my E-Mail here, folks)
Registered Organization:   N/A
Product ID:                (not leaking this either)
Original Install Date:     15/08/2020, 22:55:17
System Boot Time:          07/11/2020, 09:52:30
System Manufacturer:       Micro-Star International Co., Ltd.
System Model:              MS-7B09
System Type:               x64-based PC
Processor(s):              1 Processor(s) Installed.
                           [01]: AMD64 Family 23 Model 1 Stepping 1 AuthenticAMD ~3500 Mhz
BIOS Version:              American Megatrends Inc. A.70, 14/11/2018
Windows Directory:         C:\WINDOWS
System Directory:          C:\WINDOWS\system32
Boot Device:               \Device\HarddiskVolume6
System Locale:             en-us;English (United States)
Input Locale:              (take a wild guess)
Time Zone:                 (Im always awake)
Total Physical Memory:     65.428 MB
Available Physical Memory: 52.078 MB
Virtual Memory: Max Size:  75.156 MB
Virtual Memory: Available: 52.887 MB
Virtual Memory: In Use:    22.269 MB
Page File Location(s):     C:\pagefile.sys
Domain:                    WORKGROUP
Logon Server:              \\DESKTOP

我正在使用Python 3.8.5和最新版本的pip。 我正在Windows的Bash中执行此操作,我真的只想知道“ DGEBAL”和“ DGEHRD”等的含义。

2 个答案:

答案 0 :(得分:0)

PyTorch不能仅通过PIP安装。您需要转到https://pytorch.org/并选择所需的版本,然后运行它提供的命令。

“ pip install火炬”不起作用,因为需要对火炬进行更多定义。

答案 1 :(得分:-2)

确保安装了最新的pip,然后尝试以admin身份运行cmd。