0

我整天都在尝试安装beeware,但我一直收到错误消息

failed with error code 1 in C:\Users\dmcga\AppData\Local\Temp\pip-install- 
snn9ad__\pythonnet\

看到这个错误与pythonnet有关,我尝试使用

pip install pythonnet

然后我得到同样的错误,我将粘贴下面的所有 cmd

C:\Users\dmcga>pip install pythonnet
Collecting pythonnet
Using cached 
https://files.pythonhosted.org/packages/89/3b/
a22cd45b591d6cf490ee8b24d52b9db1f30b4b478b64a9b231c53474731e/pythonnet- 
2.3.0.tar.gz
Installing collected packages: pythonnet
Running setup.py install for pythonnet ... error
Complete output from command 
c:\users\dmcga\appdata\local\programs\python\python37-32\python.exe -u -c 
"import setuptools, 
tokenize;__file__='C:\\Users\\dmcga\\AppData\\Local\\Temp\\pip-install- 
snn9ad__\\pythonnet\\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\dmcga\AppData\Local\Temp\pip- 
record-33b2bjj0\install-record.txt --single-version-externally-managed -- 
compile:
running install
running build
running build_ext
Checking for updates from https://www.nuget.org/api/v2/.
Currently running NuGet.exe 3.5.0.
Updating NuGet.exe to 4.9.2.
Update successful.
MSBuild auto-detection: using msbuild version '4.0' from 
'C:\Windows\Microsoft.NET\Framework64\v4.0.30319'.
Restoring NuGet package NUnit.3.6.0.
Restoring NuGet package UnmanagedExports.1.2.7.
Restoring NuGet package NUnit.ConsoleRunner.3.6.0.
Adding package 'UnmanagedExports.1.2.7' to folder 
'C:\Users\dmcga\AppData\Local\Temp\pip-install-snn9ad__\pythonnet\packages'
Adding package 'NUnit.3.6.0' to folder 
'C:\Users\dmcga\AppData\Local\Temp\pip-install-snn9ad__\pythonnet\packages'
Adding package 'NUnit.ConsoleRunner.3.6.0' to folder 
'C:\Users\dmcga\AppData\Local\Temp\pip-install-snn9ad__\pythonnet\packages'
Added package 'UnmanagedExports.1.2.7' to folder 
'C:\Users\dmcga\AppData\Local\Temp\pip-install-snn9ad__\pythonnet\packages'
Added package 'NUnit.ConsoleRunner.3.6.0' to folder 
'C:\Users\dmcga\AppData\Local\Temp\pip-install-snn9ad__\pythonnet\packages'
Added package 'NUnit.3.6.0' to folder 
'C:\Users\dmcga\AppData\Local\Temp\pip-install-snn9ad__\pythonnet\packages'

NuGet Config files used:
    C:\Users\dmcga\AppData\Roaming\NuGet\NuGet.Config

Feeds used:
    C:\Users\dmcga\.nuget\packages\
    https://api.nuget.org/v3/index.json

Installed:
    3 package(s) to packages.config projects
Traceback (most recent call last):
  File "tools\geninterop\geninterop.py", line 24, in <module>
    from pycparser import c_ast, c_parser
ModuleNotFoundError: No module named 'pycparser'
Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "C:\Users\dmcga\AppData\Local\Temp\pip-install- 
snn9ad__\pythonnet\setup.py", line 405, in <module>
    zip_safe=False,
  File "c:\users\dmcga\appdata\local\programs\python\python37-32\lib\site- 
packages\setuptools\__init__.py", line 143, in setup
    return distutils.core.setup(**attrs)
  File "c:\users\dmcga\appdata\local\programs\python\python37- 
32\lib\distutils\core.py", line 148, in setup
    dist.run_commands()
  File "c:\users\dmcga\appdata\local\programs\python\python37- 
32\lib\distutils\dist.py", line 966, in run_commands
    self.run_command(cmd)
  File "c:\users\dmcga\appdata\local\programs\python\python37- 
32\lib\distutils\dist.py", line 985, in run_command
    cmd_obj.run()
  File "c:\users\dmcga\appdata\local\programs\python\python37-32\lib\site- 
packages\setuptools\command\install.py", line 61, in run
    return orig.install.run(self)
  File "c:\users\dmcga\appdata\local\programs\python\python37- 
32\lib\distutils\command\install.py", line 545, in run
    self.run_command('build')
  File "c:\users\dmcga\appdata\local\programs\python\python37- 
32\lib\distutils\cmd.py", line 313, in run_command
    self.distribution.run_command(command)
  File "c:\users\dmcga\appdata\local\programs\python\python37- 
32\lib\distutils\dist.py", line 985, in run_command
    cmd_obj.run()
  File "c:\users\dmcga\appdata\local\programs\python\python37- 
32\lib\distutils\command\build.py", line 135, in run
    self.run_command(cmd_name)
  File "c:\users\dmcga\appdata\local\programs\python\python37- 
32\lib\distutils\cmd.py", line 313, in run_command
    self.distribution.run_command(command)
  File "c:\users\dmcga\appdata\local\programs\python\python37- 
32\lib\distutils\dist.py", line 985, in run_command
    cmd_obj.run()
  File "c:\users\dmcga\appdata\local\programs\python\python37- 
32\lib\distutils\command\build_ext.py", line 339, in run
    self.build_extensions()
  File "c:\users\dmcga\appdata\local\programs\python\python37- 
32\lib\distutils\command\build_ext.py", line 448, in build_extensions
    self._build_extensions_serial()
  File "c:\users\dmcga\appdata\local\programs\python\python37- 
32\lib\distutils\command\build_ext.py", line 473, in 
_build_extensions_serial
    self.build_extension(ext)
  File "C:\Users\dmcga\AppData\Local\Temp\pip-install- 
snn9ad__\pythonnet\setup.py", line 191, in build_extension
    subprocess.check_call([sys.executable, geninterop, interop_file])
  File "c:\users\dmcga\appdata\local\programs\python\python37- 
32\lib\subprocess.py", line 347, in check_call
    raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command 
'['c:\\users\\dmcga\\appdata\\local\\programs\\python\\python37- 
32\\python.exe', 'tools\\geninterop\\geninterop.py', 
'src\\runtime\\interop37.cs']' returned non-zero exit status 1.

----------------------------------------
Command "c:\users\dmcga\appdata\local\programs\python\python37-32\python.exe 
-u -c "import setuptools, 
tokenize;__file__='C:\\Users\\dmcga\\AppData\\Local\\Temp\\pip-install- 
snn9ad__\\pythonnet\\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\dmcga\AppData\Local\Temp\pip- 
record-33b2bjj0\install-record.txt --single-version-externally-managed -- 
compile" failed with error code 1 in C:\Users\dmcga\AppData\Local\Temp\pip- 
install-snn9ad__\pythonnet\

我正在使用 Python 3.7、pip 19.0.1、Windows 10 这似乎发生在我尝试安装的几乎所有模块中,我尝试全新安装 python,但仍然出现此错误。

4

0 回答 0