1

我正在尝试在 Windows 上编译 Python 2.7 安装程序。编译工作正常,但是当我尝试运行时

PCbuild\python.exe setup.py bdist_wininst

我收到一个错误:

error: pyconfig.h: No such file or directory

我该如何解决?

Pyconfig.h.in更新:我在根目录中找到了一个名为的文件。将其重新命名为Pyconfig.hbdist 后失败并出现以下错误:

Traceback (most recent call last):
  File "setup.py", line 2076, in <module>
    main()
  File "setup.py", line 2071, in main
    'Lib/smtpd.py']
  File "Python-2.7.3\lib\distutils\core.py", line 152, in setup
    dist.run_commands()
  File "Python-2.7.3\lib\distutils\dist.py", line 953, in run_commands
    self.run_command(cmd)
  File "Python-2.7.3\Python-2.7.3\lib\distutils\dist.py", line 972, in run_command
    cmd_obj.run()
  File "Python-2.7.3\lib\distutils\command\bdist_wininst.py", line 131, in run
    self.run_command('build')
  File "Python-2.7.3\lib\distutils\cmd.py", line 326, in run_command
    self.distribution.run_command(command)
  File "Python-2.7.3\lib\distutils\dist.py", line 972, in run_command
    cmd_obj.run()
  File "Python-2.7.3\lib\distutils\command\build.py", line 127, in run
    self.run_command(cmd_name)
  File "Python-2.7.3\lib\distutils\cmd.py", line 326, in run_command
    self.distribution.run_command(command)
  File "Python-2.7.3\lib\distutils\dist.py", line 972, in run_command
    cmd_obj.run()
  File "Python-2.7.3\lib\distutils\command\build_ext.py", line 339, in run
    self.build_extensions()
  File "setup.py", line 152, in build_extensions
    missing = self.detect_modules()
  File "setup.py", line 1146, in detect_modules
    for arg in sysconfig.get_config_var("CONFIG_ARGS").split()]
AttributeError: 'NoneType' object has no attribute 'split'

在此先感谢,伊万。

4

0 回答 0