错误:
PS D:Bringing-Old-Photos-Back-to-Life-master> pip install torch -i https://pypi.douban.com/simple
Looking in indexes: https://pypi.douban.com/simple
Collecting torch
Downloading https://pypi.doubanio.com/packages/f8/02/880b468bd382dc79896eaecbeb8ce95e9c4b99a24902874a2cef0b562cea/torch-0.1.2.post2.tar.gz (128 kB)
|████████████████████████████████| 128 kB 6.8 MB/s
Requirement already satisfied: pyyaml in d:pythonpython38libsite-packages (from torch) (5.3.1)
Building wheels for collected packages: torch
Building wheel for torch (setup.py) ... error
ERROR: Command errored out with exit status 1:
command: 'd:pythonpython38python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\Users\wgy\AppData\Local\Temp\pip-install-ka8hl0kf\torch_aa4d618336794de9ac94591e9e350e71\setup.py'"'"'; __file__='"'"'C:\Users\wgy\AppData\Local\Temp\pip-install-ka8hl0kf\torch_aa4d618336794de9ac94591e9e350e71\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'
'"'"', '"'"'
'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' bdist_wheel -d 'C:UserswgyAppDataLocalTemppip-wheel-0fq1ocxu'
cwd: C:UserswgyAppDataLocalTemppip-install-ka8hl0kf orch_aa4d618336794de9ac94591e9e350e71
Complete output (30 lines):
running bdist_wheel
running build
running build_deps
Traceback (most recent call last):
File "" , line 1, in <module>
File "C:UserswgyAppDataLocalTemppip-install-ka8hl0kf orch_aa4d618336794de9ac94591e9e350e71setup.py", line 225, in <module>
setup(name="torch", version="0.1.2.post2",
File "d:pythonpython38libsite-packagessetuptools\__init__.py", line 145, in setup
return distutils.core.setup(**attrs)
File "d:pythonpython38libdistutilscore.py", line 148, in setup
dist.run_commands()
File "d:pythonpython38libdistutilsdist.py", line 966, in run_commands
self.run_command(cmd)
File "d:pythonpython38libdistutilsdist.py", line 985, in run_command
cmd_obj.run()
File "d:pythonpython38libsite-packageswheeldist_wheel.py", line 299, in run
self.run_command('build')
File "d:pythonpython38libdistutilscmd.py", line 313, in run_command
self.distribution.run_command(command)
File "d:pythonpython38libdistutilsdist.py", line 985, in run_command
cmd_obj.run()
File "d:pythonpython38libdistutilscommanduild.py", line 135, in run
self.run_command(cmd_name)
File "d:pythonpython38libdistutilscmd.py", line 313, in run_command
self.distribution.run_command(command)
File "d:pythonpython38libdistutilsdist.py", line 985, in run_command
cmd_obj.run()
File "C:UserswgyAppDataLocalTemppip-install-ka8hl0kf orch_aa4d618336794de9ac94591e9e350e71setup.py", line 51, in run
from tools.nnwrap import generate_wrappers as generate_nn_wrappers
ModuleNotFoundError: No module named 'tools.nnwrap'
----------------------------------------
ERROR: Failed building wheel for torch
Running setup.py clean for torch
ERROR: Command errored out with exit status 1:
command: 'd:pythonpython38python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\Users\wgy\AppData\Local\Temp\pip-install-ka8hl0kf\torch_aa4d618336794de9ac94591e9e350e71\setup.py'"'"'; __file__='"'"'C:\Users\wgy\AppData\Local\Temp\pip-install-ka8hl0kf\torch_aa4d618336794de9ac94591e9e350e71\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'
'"'"', '"'"'
'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' clean --all
cwd: C:UserswgyAppDataLocalTemppip-install-ka8hl0kf orch_aa4d618336794de9ac94591e9e350e71
Complete output (2 lines):
running clean
error: [Errno 2] No such file or directory: '.gitignore'
----------------------------------------
ERROR: Failed cleaning build dir for torch
Failed to build torch
Installing collected packages: torch
Running setup.py install for torch ... error
ERROR: Command errored out with exit status 1:
command: 'd:pythonpython38python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\Users\wgy\AppData\Local\Temp\pip-install-ka8hl0kf\torch_aa4d618336794de9ac94591e9e350e71\setup.py'"'"'; __file__='"'"'C:\Users\wgy\AppData\Local\Temp\pip-install-ka8hl0kf\torch_aa4d618336794de9ac94591e9e350e71\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'
'"'"', '"'"'
'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record 'C:UserswgyAppDataLocalTemppip-record-c6ewbn0zinstall-record.txt' --single-version-externally-managed --compile --install-headers 'd:pythonpython38Include orch'
cwd: C:UserswgyAppDataLocalTemppip-install-ka8hl0kf orch_aa4d618336794de9ac94591e9e350e71
Complete output (23 lines):
running install
running build_deps
Traceback (most recent call last):
File "" , line 1, in <module>
File "C:UserswgyAppDataLocalTemppip-install-ka8hl0kf orch_aa4d618336794de9ac94591e9e350e71setup.py", line 225, in <module>
setup(name="torch", version="0.1.2.post2",
File "d:pythonpython38libsite-packagessetuptools\__init__.py", line 145, in setup
return distutils.core.setup(**attrs)
File "d:pythonpython38libdistutilscore.py", line 148, in setup
dist.run_commands()
File "d:pythonpython38libdistutilsdist.py", line 966, in run_commands
self.run_command(cmd)
File "d:pythonpython38libdistutilsdist.py", line 985, in run_command
cmd_obj.run()
File "C:UserswgyAppDataLocalTemppip-install-ka8hl0kf orch_aa4d618336794de9ac94591e9e350e71setup.py", line 99, in run
self.run_command('build_deps')
File "d:pythonpython38libdistutilscmd.py", line 313, in run_command
self.distribution.run_command(command)
File "d:pythonpython38libdistutilsdist.py", line 985, in run_command
cmd_obj.run()
File "C:UserswgyAppDataLocalTemppip-install-ka8hl0kf orch_aa4d618336794de9ac94591e9e350e71setup.py", line 51, in run
from tools.nnwrap import generate_wrappers as generate_nn_wrappers
ModuleNotFoundError: No module named 'tools.nnwrap'
----------------------------------------
ERROR: Command errored out with exit status 1: 'd:pythonpython38python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\Users\wgy\AppData\Local\Temp\pip-install-ka8hl0kf\torch_aa4d618336794de9ac94591e9e350e71\setup.py'"'"'; __file__='"'"'C:\Users\wgy\AppData\Local\Temp\pip-install-ka8hl0kf\torch_aa4d618336794de9ac94591e9e350e71\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'
'"'"', '"'"'
'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record 'C:UserswgyAppDataLocalTemppip-record-c6ewbn0zinstall-record.txt' --single-version-externally-managed --compile --install-headers 'd:pythonpython38Include orch' Check the logs for full command output.
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
- 11
- 12
- 13
- 14
- 15
- 16
- 17
- 18
- 19
- 20
- 21
- 22
- 23
- 24
- 25
- 26
- 27
- 28
- 29
- 30
- 31
- 32
- 33
- 34
- 35
- 36
- 37
- 38
- 39
- 40
- 41
- 42
- 43
- 44
- 45
- 46
- 47
- 48
- 49
- 50
- 51
- 52
- 53
- 54
- 55
- 56
- 57
- 58
- 59
- 60
- 61
- 62
- 63
- 64
- 65
- 66
- 67
- 68
- 69
- 70
- 71
- 72
- 73
- 74
- 75
- 76
- 77
- 78
- 79
- 80
- 81
- 82
- 83
- 84
- 85
- 86
- 87
- 88
- 89
- 90
- 91
- 92
- 93
- 94
- 95
- 96
- 97
- 98
- 99
- 100
- 101
- 102
- 103
- 104
- 105
- 106
- 107
- 108
- 109
- 110
- 111
- 112
- 113
- 114
- 115
- 116
- 117
- 118
- 119
- 120
- 121
- 122
- 123
- 124
- 125
- 126
- 127
- 128
- 129
- 130
- 131
- 132
- 133
- 134
- 135
- 136
- 137
- 138
- 139
- 140
- 141
- 142
- 143
- 144
- 145
- 146
- 147
- 148
- 149
- 150
- 151
- 152
- 153
- 154
- 155
- 156
- 157
- 158
- 159
- 160
- 161
- 162
- 163
- 164
- 165
- 166
- 167
- 168
- 169
- 170
- 171
https://download.pytorch.org/whl/torch_stable.html
下载对应的whl到本地后(注意GPU和CPU区分)
pip install ". orch-1.7.0+cpu-cp38-cp38-win_amd64.whl" -i https://pypi.douban.com/simple
- 1
评论记录:
回复评论: