我正在尝试使Python.net(pythonnet)在Python 3.7上运行,并且在运行setup.py时失败,并出现以下错误。我假设它与路径行中的缺少条目有关,但是我无法对其进行任何引用。从本质上讲,这是Windows 7上Python 3.7的简单安装。pip安装也失败,结果相同。是否有人对可能缺少什么路径或文件提出建议?
PS C:\Users\user\pythonnet-master\pythonnet-master> python setup.py bdist_wheel
running bdist_wheel
running build
running build_ext
Checking for updates from https://www.nuget.org/api/v2/.
Currently running NuGet.exe 4.6.2.
NuGet.exe is up to date.
MSBuild auto-detection: using msbuild version '15.5.180.51428' from 'C:\Program Files (x86)\Microsoft Visual Studio\2017
\Professional\MSBuild\15.0\bin'.
All packages listed in packages.config are already installed.
Traceback (most recent call last):
File "tools\geninterop\geninterop.py", line 292, in <module>
sys.exit(main())
File "tools\geninterop\geninterop.py", line 272, in main
python_h = preprocess_python_headers()
File "tools\geninterop\geninterop.py", line 192, in preprocess_python_headers
for line in _check_output(cmd).splitlines():
File "tools\geninterop\geninterop.py", line 41, in _check_output
output = subprocess.check_output(*args, **kwargs)
File "C:\Users\i102604\AppData\Local\Programs\Python\Python37\lib\subprocess.py", line 376, in check_output
**kwargs).stdout
File "C:\Users\i102604\AppData\Local\Programs\Python\Python37\lib\subprocess.py", line 453, in run
with Popen(*popenargs, **kwargs) as process:
File "C:\Users\i102604\AppData\Local\Programs\Python\Python37\lib\subprocess.py", line 756, in __init__
restore_signals, start_new_session)
File "C:\Users\i102604\AppData\Local\Programs\Python\Python37\lib\subprocess.py", line 1155, in _execute_child
startupinfo)
FileNotFoundError: [WinError 2] The system cannot find the file specified