创建没有 MSVCP90.dll 的 Python EXE [英] Create Python EXE without MSVCP90.dll

查看:20
本文介绍了创建没有 MSVCP90.dll 的 Python EXE的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试使用 Py2Exe 将 python 程序(使用 wxPython)带到 Windows exe,但存在关于 MSVCP90.dll 的错误.在 StackOverflow 上阅读 来确定正确的版本.右键单击任何 DLL 并单击属性,它会显示从中选择该 DLL 的位置.

打包您的应用程序.

您可以尝试使用 PyInstaller 来打包您的应用程序.这将是一种将 DLL 导入目标机器的便捷方式.

I'm trying to use Py2Exe to take a python program (using wxPython) to a Windows exe but there is an error regarding MSVCP90.dll . After reading py2exe fails to generate an executable on StackOverflow, it says I need to download this file. However, it also says all target users must download this file. This will be a huge inconvenience for my users (mostly corporate clients who will not know how to download the file), so is there a way to package the with the program?

Thanks!

解决方案

What is MSVCP90.dll

MSVCP90.dll is Multithreaded, dynamic Visual Studio 2008 C Runtime Library. Generally your application should package MSVCP90.dll unless you are sure that the target machine have the matching CRT. You can use any of the packaging software to package the necessary DLLs and your software and distribute it.

Purpose of MSVCP90.dll

You may be wondering why you need this weird dll? Well CRT is nothing new to python. All application that is based on C heavily relies on C library functions. All the implementations of the standard C Library functions like (malloc, strcpy ..) to name a few is implemented in these libraries. There are different kinds and the specific MSDN website have more details on it.

Distributing MSVCP90.dll

When distributing CRT, you should understand that depending upon what CRT you have used the version number which is suffixed with the name of the CRT varies. For example MSVCP90.DLL is the CRT from Visual Studio 2008. A single machine can contain multiple CRTs either in the system folder on in application installation path.

If you are planning to package your application, you need to re-verify, which CRT version your application uses. Packaging wrong CRT or using one can cause undesired and undefined effect. Generally speaking the CRT your Python Installation uses, should be the same CRT you should package.

Determining the correct MSVCRT

As there are different CRT builds with different versions, it is difficult to ascertain, which CRT should be packaged. If you have a running application (executable), you can use dependencywalker to determine the correct version. Right click on any of the DLLs and click on properties and it will show you the location from which this DLL is being picked.

Packaging your application.

You can try using PyInstaller to package your application. It would be a convenient way to get the DLL into the target machine.

这篇关于创建没有 MSVCP90.dll 的 Python EXE的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆