When I try to use following command:
pip install pythonnet
I see error that you can see below:
Collecting pythonnet
Using cached pythonnet-2.5.2.tar.gz (1.9 MB)
Requirement already satisfied: pycparser in c:\users\d4wt0\appdata\local\packages\pythonsoftwarefoundation.python.3.9_qbz5n2kfra8p0\localcache\local-packages\python39\site-packages (from pythonnet) (2.20)
Using legacy 'setup.py install' for pythonnet, since package 'wheel' is not installed.
Installing collected packages: pythonnet
Running setup.py install for pythonnet ... error
ERROR: Command errored out with exit status 1:
command: 'C:\Users\d4wt0\AppData\Local\Microsoft\WindowsApps\PythonSoftwareFoundation.Python.3.9_qbz5n2kfra8p0\python.exe' -u -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\d4wt0\\AppData\\Local\\Temp\\pip-install-jlv07504\\pythonnet_0928bad80975481c9950abc5017a28b4\\setup.py'"'"'; __file__='"'"'C:\\Users\\d4wt0\\AppData\\Local\\Temp\\pip-install-jlv07504\\pythonnet_0928bad80975481c9950abc5017a28b4\\setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(__file__) if os.path.exists(__file__) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record 'C:\Users\d4wt0\AppData\Local\Temp\pip-record-x2n0fvt3\install-record.txt' --single-version-externally-managed --user --prefix= --compile --install-headers 'C:\Users\d4wt0\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.9_qbz5n2kfra8p0\LocalCache\local-packages\Python39\Include\pythonnet'
cwd: C:\Users\d4wt0\AppData\Local\Temp\pip-install-jlv07504\pythonnet_0928bad80975481c9950abc5017a28b4\
Complete output (6 lines):
usage: setup.py [global_opts] cmd1 [cmd1_opts] [cmd2 [cmd2_opts] ...]
or: setup.py --help [cmd1 cmd2 ...]
or: setup.py --help-commands
or: setup.py cmd --help
error: option --single-version-externally-managed not recognized
----------------------------------------
ERROR: Command errored out with exit status 1: 'C:\Users\d4wt0\AppData\Local\Microsoft\WindowsApps\PythonSoftwareFoundation.Python.3.9_qbz5n2kfra8p0\python.exe' -u -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\d4wt0\\AppData\\Local\\Temp\\pip-install-jlv07504\\pythonnet_0928bad80975481c9950abc5017a28b4\\setup.py'"'"'; __file__='"'"'C:\\Users\\d4wt0\\AppData\\Local\\Temp\\pip-install-jlv07504\\pythonnet_0928bad80975481c9950abc5017a28b4\\setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(__file__) if os.path.exists(__file__) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record 'C:\Users\d4wt0\AppData\Local\Temp\pip-record-x2n0fvt3\install-record.txt' --single-version-externally-managed --user --prefix= --compile --install-headers 'C:\Users\d4wt0\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.9_qbz5n2kfra8p0\LocalCache\local-packages\Python39\Include\pythonnet' Check the logs for full command output.
How can I fix it? I tried to install that package using PyCharm, but there is the same error. Any ideas?