I've looked online for a solution but haven't found one.
I have a new computer which is the first desktop I own and I need to install python and pip and all these things for a high school project, but when installing PyTorch and other packages I need I am met with this error:
C:\Users\Owlsoul>pip3 install torch
Defaulting to user installation because normal site-packages is not writeable
Collecting torch
Using cached torch-0.1.2.post2.tar.gz (128 kB)
Collecting pyyaml
Using cached PyYAML-5.3.1.tar.gz (269 kB)
Building wheels for collected packages: torch, pyyaml
Building wheel for torch (setup.py) ... error
ERROR: Command errored out with exit status 1:
command: 'c:\program files\inkscape\bin\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\Owlsoul\\AppData\\Local\\Temp\\pip-install-hw6a8m3j\\torch\\setup.py'"'"'; __file__='"'"'C:\\Users\\Owlsoul\\AppData\\Local\\Temp\\pip-install-hw6a8m3j\\torch\\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' bdist_wheel -d 'C:\Users\Owlsoul\AppData\Local\Temp\pip-wheel-kmaghkld'
cwd: C:\Users\Owlsoul\AppData\Local\Temp\pip-install-hw6a8m3j\torch\
Complete output (30 lines):
running bdist_wheel
running build
running build_deps
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "C:\Users\Owlsoul\AppData\Local\Temp\pip-install-hw6a8m3j\torch\setup.py", line 225, in <module>
setup(name="torch", version="0.1.2.post2",
File "C:\Users\Owlsoul\.local\lib\python3.8\site-packages\setuptools\__init__.py", line 153, in setup
return distutils.core.setup(**attrs)
File "C:\program files\inkscape\lib\python3.8\distutils\core.py", line 148, in setup
dist.run_commands()
File "C:\program files\inkscape\lib\python3.8\distutils\dist.py", line 966, in run_commands
self.run_command(cmd)
File "C:\program files\inkscape\lib\python3.8\distutils\dist.py", line 985, in run_command
cmd_obj.run()
File "C:\Users\Owlsoul\.local\lib\python3.8\site-packages\wheel\bdist_wheel.py", line 290, in run
self.run_command('build')
File "C:\program files\inkscape\lib\python3.8\distutils\cmd.py", line 313, in run_command
self.distribution.run_command(command)
File "C:\program files\inkscape\lib\python3.8\distutils\dist.py", line 985, in run_command
cmd_obj.run()
File "C:\program files\inkscape\lib\python3.8\distutils\command\build.py", line 135, in run
self.run_command(cmd_name)
File "C:\program files\inkscape\lib\python3.8\distutils\cmd.py", line 313, in run_command
self.distribution.run_command(command)
File "C:\program files\inkscape\lib\python3.8\distutils\dist.py", line 985, in run_command
cmd_obj.run()
File "C:\Users\Owlsoul\AppData\Local\Temp\pip-install-hw6a8m3j\torch\setup.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: 'c:\program files\inkscape\bin\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\Owlsoul\\AppData\\Local\\Temp\\pip-install-hw6a8m3j\\torch\\setup.py'"'"'; __file__='"'"'C:\\Users\\Owlsoul\\AppData\\Local\\Temp\\pip-install-hw6a8m3j\\torch\\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' clean --all
cwd: C:\Users\Owlsoul\AppData\Local\Temp\pip-install-hw6a8m3j\torch
Complete output (2 lines):
running clean
error: [Errno 2] No such file or directory: '.gitignore'
----------------------------------------
ERROR: Failed cleaning build dir for torch
Building wheel for pyyaml (setup.py) ... error
ERROR: Command errored out with exit status 1:
command: 'c:\program files\inkscape\bin\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\Owlsoul\\AppData\\Local\\Temp\\pip-install-hw6a8m3j\\pyyaml\\setup.py'"'"'; __file__='"'"'C:\\Users\\Owlsoul\\AppData\\Local\\Temp\\pip-install-hw6a8m3j\\pyyaml\\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' bdist_wheel -d 'C:\Users\Owlsoul\AppData\Local\Temp\pip-wheel-nztx1z7u'
cwd: C:\Users\Owlsoul\AppData\Local\Temp\pip-install-hw6a8m3j\pyyaml\
Complete output (59 lines):
running bdist_wheel
running build
running build_py
creating build
creating build\lib.mingw-3.8
creating build\lib.mingw-3.8\yaml
copying lib3\yaml\composer.py -> build\lib.mingw-3.8\yaml
copying lib3\yaml\constructor.py -> build\lib.mingw-3.8\yaml
copying lib3\yaml\cyaml.py -> build\lib.mingw-3.8\yaml
copying lib3\yaml\dumper.py -> build\lib.mingw-3.8\yaml
copying lib3\yaml\emitter.py -> build\lib.mingw-3.8\yaml
copying lib3\yaml\error.py -> build\lib.mingw-3.8\yaml
copying lib3\yaml\events.py -> build\lib.mingw-3.8\yaml
copying lib3\yaml\loader.py -> build\lib.mingw-3.8\yaml
copying lib3\yaml\nodes.py -> build\lib.mingw-3.8\yaml
copying lib3\yaml\parser.py -> build\lib.mingw-3.8\yaml
copying lib3\yaml\reader.py -> build\lib.mingw-3.8\yaml
copying lib3\yaml\representer.py -> build\lib.mingw-3.8\yaml
copying lib3\yaml\resolver.py -> build\lib.mingw-3.8\yaml
copying lib3\yaml\scanner.py -> build\lib.mingw-3.8\yaml
copying lib3\yaml\serializer.py -> build\lib.mingw-3.8\yaml
copying lib3\yaml\tokens.py -> build\lib.mingw-3.8\yaml
copying lib3\yaml\__init__.py -> build\lib.mingw-3.8\yaml
running build_ext
'gcc' is not recognized as an internal or external command,
operable program or batch file.
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "C:\Users\Owlsoul\AppData\Local\Temp\pip-install-hw6a8m3j\pyyaml\setup.py", line 291, in <module>
setup(
File "C:\program files\inkscape\lib\python3.8\distutils\core.py", line 148, in setup
dist.run_commands()
File "C:\program files\inkscape\lib\python3.8\distutils\dist.py", line 966, in run_commands
self.run_command(cmd)
File "C:\program files\inkscape\lib\python3.8\distutils\dist.py", line 985, in run_command
cmd_obj.run()
File "C:\Users\Owlsoul\.local\lib\python3.8\site-packages\wheel\bdist_wheel.py", line 290, in run
self.run_command('build')
File "C:\program files\inkscape\lib\python3.8\distutils\cmd.py", line 313, in run_command
self.distribution.run_command(command)
File "C:\program files\inkscape\lib\python3.8\distutils\dist.py", line 985, in run_command
cmd_obj.run()
File "C:\program files\inkscape\lib\python3.8\distutils\command\build.py", line 135, in run
self.run_command(cmd_name)
File "C:\program files\inkscape\lib\python3.8\distutils\cmd.py", line 313, in run_command
self.distribution.run_command(command)
File "C:\program files\inkscape\lib\python3.8\distutils\dist.py", line 985, in run_command
cmd_obj.run()
File "C:\Users\Owlsoul\AppData\Local\Temp\pip-install-hw6a8m3j\pyyaml\setup.py", line 185, in run
_build_ext.run(self)
File "C:\program files\inkscape\lib\python3.8\distutils\command\build_ext.py", line 307, in run
self.compiler = new_compiler(compiler=self.compiler,
File "C:\program files\inkscape\lib\python3.8\distutils\ccompiler.py", line 1034, in new_compiler
return klass(None, dry_run, force)
File "C:\program files\inkscape\lib\python3.8\distutils\cygwinccompiler.py", line 310, in __init__
CygwinCCompiler.__init__ (self, verbose, dry_run, force)
File "C:\program files\inkscape\lib\python3.8\distutils\cygwinccompiler.py", line 127, in __init__
if self.ld_version >= "2.10.90":
TypeError: '>=' not supported between instances of 'NoneType' and 'str'
----------------------------------------
ERROR: Failed building wheel for pyyaml
Running setup.py clean for pyyaml
Failed to build torch pyyaml
Installing collected packages: pyyaml, torch
Running setup.py install for pyyaml ... error
ERROR: Command errored out with exit status 1:
command: 'c:\program files\inkscape\bin\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\Owlsoul\\AppData\\Local\\Temp\\pip-install-hw6a8m3j\\pyyaml\\setup.py'"'"'; __file__='"'"'C:\\Users\\Owlsoul\\AppData\\Local\\Temp\\pip-install-hw6a8m3j\\pyyaml\\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record 'C:\Users\Owlsoul\AppData\Local\Temp\pip-record-v7hld7x2\install-record.txt' --single-version-externally-managed --user --prefix= --compile --install-headers 'C:\Users\Owlsoul\.local\include\python3.8\pyyaml'
cwd: C:\Users\Owlsoul\AppData\Local\Temp\pip-install-hw6a8m3j\pyyaml\
Complete output (61 lines):
running install
running build
running build_py
creating build
creating build\lib.mingw-3.8
creating build\lib.mingw-3.8\yaml
copying lib3\yaml\composer.py -> build\lib.mingw-3.8\yaml
copying lib3\yaml\constructor.py -> build\lib.mingw-3.8\yaml
copying lib3\yaml\cyaml.py -> build\lib.mingw-3.8\yaml
copying lib3\yaml\dumper.py -> build\lib.mingw-3.8\yaml
copying lib3\yaml\emitter.py -> build\lib.mingw-3.8\yaml
copying lib3\yaml\error.py -> build\lib.mingw-3.8\yaml
copying lib3\yaml\events.py -> build\lib.mingw-3.8\yaml
copying lib3\yaml\loader.py -> build\lib.mingw-3.8\yaml
copying lib3\yaml\nodes.py -> build\lib.mingw-3.8\yaml
copying lib3\yaml\parser.py -> build\lib.mingw-3.8\yaml
copying lib3\yaml\reader.py -> build\lib.mingw-3.8\yaml
copying lib3\yaml\representer.py -> build\lib.mingw-3.8\yaml
copying lib3\yaml\resolver.py -> build\lib.mingw-3.8\yaml
copying lib3\yaml\scanner.py -> build\lib.mingw-3.8\yaml
copying lib3\yaml\serializer.py -> build\lib.mingw-3.8\yaml
copying lib3\yaml\tokens.py -> build\lib.mingw-3.8\yaml
copying lib3\yaml\__init__.py -> build\lib.mingw-3.8\yaml
running build_ext
'gcc' is not recognized as an internal or external command,
operable program or batch file.
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "C:\Users\Owlsoul\AppData\Local\Temp\pip-install-hw6a8m3j\pyyaml\setup.py", line 291, in <module>
setup(
File "C:\program files\inkscape\lib\python3.8\distutils\core.py", line 148, in setup
dist.run_commands()
File "C:\program files\inkscape\lib\python3.8\distutils\dist.py", line 966, in run_commands
self.run_command(cmd)
File "C:\program files\inkscape\lib\python3.8\distutils\dist.py", line 985, in run_command
cmd_obj.run()
File "C:\Users\Owlsoul\.local\lib\python3.8\site-packages\setuptools\command\install.py", line 61, in run
return orig.install.run(self)
File "C:\program files\inkscape\lib\python3.8\distutils\command\install.py", line 546, in run
self.run_command('build')
File "C:\program files\inkscape\lib\python3.8\distutils\cmd.py", line 313, in run_command
self.distribution.run_command(command)
File "C:\program files\inkscape\lib\python3.8\distutils\dist.py", line 985, in run_command
cmd_obj.run()
File "C:\program files\inkscape\lib\python3.8\distutils\command\build.py", line 135, in run
self.run_command(cmd_name)
File "C:\program files\inkscape\lib\python3.8\distutils\cmd.py", line 313, in run_command
self.distribution.run_command(command)
File "C:\program files\inkscape\lib\python3.8\distutils\dist.py", line 985, in run_command
cmd_obj.run()
File "C:\Users\Owlsoul\AppData\Local\Temp\pip-install-hw6a8m3j\pyyaml\setup.py", line 185, in run
_build_ext.run(self)
File "C:\program files\inkscape\lib\python3.8\distutils\command\build_ext.py", line 307, in run
self.compiler = new_compiler(compiler=self.compiler,
File "C:\program files\inkscape\lib\python3.8\distutils\ccompiler.py", line 1034, in new_compiler
return klass(None, dry_run, force)
File "C:\program files\inkscape\lib\python3.8\distutils\cygwinccompiler.py", line 310, in __init__
CygwinCCompiler.__init__ (self, verbose, dry_run, force)
File "C:\program files\inkscape\lib\python3.8\distutils\cygwinccompiler.py", line 127, in __init__
if self.ld_version >= "2.10.90":
TypeError: '>=' not supported between instances of 'NoneType' and 'str'
----------------------------------------
ERROR: Command errored out with exit status 1: 'c:\program files\inkscape\bin\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\Owlsoul\\AppData\\Local\\Temp\\pip-install-hw6a8m3j\\pyyaml\\setup.py'"'"'; __file__='"'"'C:\\Users\\Owlsoul\\AppData\\Local\\Temp\\pip-install-hw6a8m3j\\pyyaml\\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record 'C:\Users\Owlsoul\AppData\Local\Temp\pip-record-v7hld7x2\install-record.txt' --single-version-externally-managed --user --prefix= --compile --install-headers 'C:\Users\Owlsoul\.local\include\python3.8\pyyaml' Check the logs for full command output.
Thanks in advance for your help.
After following your advice, a new error has popped up:
C:\Users\Owlsoul>pip install torch
Defaulting to user installation because normal site-packages is not writeable
Collecting torch
Using cached torch-0.1.2.post2.tar.gz (128 kB)
Requirement already satisfied: pyyaml in c:\users\owlsoul\appdata\roaming\python\python38\site-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: 'c:\program files (x86)\python38-32\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\Owlsoul\\AppData\\Local\\Temp\\pip-install-jio16_76\\torch\\setup.py'"'"'; __file__='"'"'C:\\Users\\Owlsoul\\AppData\\Local\\Temp\\pip-install-jio16_76\\torch\\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' bdist_wheel -d 'C:\Users\Owlsoul\AppData\Local\Temp\pip-wheel-iuye_5re'
cwd: C:\Users\Owlsoul\AppData\Local\Temp\pip-install-jio16_76\torch\
Complete output (30 lines):
running bdist_wheel
running build
running build_deps
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "C:\Users\Owlsoul\AppData\Local\Temp\pip-install-jio16_76\torch\setup.py", line 225, in <module>
setup(name="torch", version="0.1.2.post2",
File "c:\program files (x86)\python38-32\lib\site-packages\setuptools\__init__.py", line 144, in setup
return distutils.core.setup(**attrs)
File "c:\program files (x86)\python38-32\lib\distutils\core.py", line 148, in setup
dist.run_commands()
File "c:\program files (x86)\python38-32\lib\distutils\dist.py", line 966, in run_commands
self.run_command(cmd)
File "c:\program files (x86)\python38-32\lib\distutils\dist.py", line 985, in run_command
cmd_obj.run()
File "C:\Users\Owlsoul\AppData\Roaming\Python\Python38\site-packages\wheel\bdist_wheel.py", line 290, in run
self.run_command('build')
File "c:\program files (x86)\python38-32\lib\distutils\cmd.py", line 313, in run_command
self.distribution.run_command(command)
File "c:\program files (x86)\python38-32\lib\distutils\dist.py", line 985, in run_command
cmd_obj.run()
File "c:\program files (x86)\python38-32\lib\distutils\command\build.py", line 135, in run
self.run_command(cmd_name)
File "c:\program files (x86)\python38-32\lib\distutils\cmd.py", line 313, in run_command
self.distribution.run_command(command)
File "c:\program files (x86)\python38-32\lib\distutils\dist.py", line 985, in run_command
cmd_obj.run()
File "C:\Users\Owlsoul\AppData\Local\Temp\pip-install-jio16_76\torch\setup.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: 'c:\program files (x86)\python38-32\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\Owlsoul\\AppData\\Local\\Temp\\pip-install-jio16_76\\torch\\setup.py'"'"'; __file__='"'"'C:\\Users\\Owlsoul\\AppData\\Local\\Temp\\pip-install-jio16_76\\torch\\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' clean --all
cwd: C:\Users\Owlsoul\AppData\Local\Temp\pip-install-jio16_76\torch
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: 'c:\program files (x86)\python38-32\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\Owlsoul\\AppData\\Local\\Temp\\pip-install-jio16_76\\torch\\setup.py'"'"'; __file__='"'"'C:\\Users\\Owlsoul\\AppData\\Local\\Temp\\pip-install-jio16_76\\torch\\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record 'C:\Users\Owlsoul\AppData\Local\Temp\pip-record-z9idl5pc\install-record.txt' --single-version-externally-managed --user --prefix= --compile --install-headers 'C:\Users\Owlsoul\AppData\Roaming\Python\Python38\Include\torch'
cwd: C:\Users\Owlsoul\AppData\Local\Temp\pip-install-jio16_76\torch\
Complete output (23 lines):
running install
running build_deps
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "C:\Users\Owlsoul\AppData\Local\Temp\pip-install-jio16_76\torch\setup.py", line 225, in <module>
setup(name="torch", version="0.1.2.post2",
File "c:\program files (x86)\python38-32\lib\site-packages\setuptools\__init__.py", line 144, in setup
return distutils.core.setup(**attrs)
File "c:\program files (x86)\python38-32\lib\distutils\core.py", line 148, in setup
dist.run_commands()
File "c:\program files (x86)\python38-32\lib\distutils\dist.py", line 966, in run_commands
self.run_command(cmd)
File "c:\program files (x86)\python38-32\lib\distutils\dist.py", line 985, in run_command
cmd_obj.run()
File "C:\Users\Owlsoul\AppData\Local\Temp\pip-install-jio16_76\torch\setup.py", line 99, in run
self.run_command('build_deps')
File "c:\program files (x86)\python38-32\lib\distutils\cmd.py", line 313, in run_command
self.distribution.run_command(command)
File "c:\program files (x86)\python38-32\lib\distutils\dist.py", line 985, in run_command
cmd_obj.run()
File "C:\Users\Owlsoul\AppData\Local\Temp\pip-install-jio16_76\torch\setup.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: 'c:\program files (x86)\python38-32\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\Owlsoul\\AppData\\Local\\Temp\\pip-install-jio16_76\\torch\\setup.py'"'"'; __file__='"'"'C:\\Users\\Owlsoul\\AppData\\Local\\Temp\\pip-install-jio16_76\\torch\\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record 'C:\Users\Owlsoul\AppData\Local\Temp\pip-record-z9idl5pc\install-record.txt' --single-version-externally-managed --user --prefix= --compile --install-headers 'C:\Users\Owlsoul\AppData\Roaming\Python\Python38\Include\torch' Check the logs for full command output.