【问题标题】:Program with embedded python fails to start with python 2.7.11 amd64带有嵌入式 python 的程序无法以 python 2.7.11 amd64 启动
【发布时间】:2016-02-22 16:13:18
【问题描述】:

我有一个嵌入了 python 用于脚本目的的 Windows 程序

如果我安装 Python 2.7.10 64 位 (python-2.7.10.amd64.msi) 并运行该程序,它可以正常工作。

如果我安装 Python 2.7.11 64 位 (python-2.7.11.amd64.msi) 并运行该程序,它会失败并显示错误“missing module site”。但是,如果我从批处理文件中运行程序,并添加“set PYTHONPATH=C:\python27\lib”,程序就会启动并正常运行。

唯一的区别是安装的 python 版本,我们在 Windows Server 2008 R2 Standard、SP1 上运行,具有 3GB RAM 和四核处理器。

是否有可能是 python 2.7.11 安装没有设置所需的注册表项,或者我的程序做错了什么?

【问题讨论】:

    标签: python python-2.7 python-c-api python-embedding


    【解决方案1】:

    python 2.7.11 有 2 个错误应该在 python 2.7.12 中解决。我们最近在 pythonnet 中遇到了同样的问题:

    https://github.com/pythonnet/pythonnet/issues/156

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2017-07-28
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2012-11-17
      相关资源
      最近更新 更多