I have a python application that I am trying to build as a pyinstaller
distributable. A similar script builds successfully on Linux.
I am building it on Windows 7 x64, but want to build 32-bit binary for better compatibility, so I am using 32-bit python-2.7. Among my dependencies are matplotlib
and pyside
which require MSVC. I install a package called VCForPython27 from Microsoft.
I run into an error when I run my pyinstaller script. I get the following message:
1250 INFO: Adding Microsoft.VC90.CRT to dependent assemblies of final executable 7428 INFO: Searching for assembly x86_Microsoft.VC90.CRT_1fc8b3b9a1e18e3b_9.0.21022.8_none ... 7428 WARNING: Assembly not found 7428 ERROR: Assembly x86_Microsoft.VC90.CRT_1fc8b3b9a1e18e3b_9.0.21022.8_none not found 7475 WARNING: lib not found: MSVCR90.dll dependency of C:\Python27\python.exe 7553 INFO: Searching for assembly x86_Microsoft.VC90.CRT_1fc8b3b9a1e18e3b_9.0.21022.8_none ... 7553 WARNING: Assembly not found 7553 ERROR: Assembly x86_Microsoft.VC90.CRT_1fc8b3b9a1e18e3b_9.0.21022.8_none not found 7662 WARNING: lib not found: MSVCR90.dll dependency of C:\Windows\system32\python27.dll 7662 INFO: Analyzing C:\Python27\lib\site-packages\PyInstaller\loader\_pyi_boots
There are multiple messages like that about both the files MSVCP90.dll and MSVCR90.dll
I can see that I have a folder C:\Windows\winsxs\x86_microsoft.vc90.crt_1fc8b3b9a1e18e3b_9.0.30729.4148_none_5090ab56bcba71c2
that contains versions of both files.
This mismatch occurs both when I install my python packages from Christoph Gohlke's page and with pip
(except for matplotlib, which I can't install with pip because of missing dependencies).
Strangely enough pyinstaller
makes a binary. Yet, when I try to run it I get a popup saying:
WARNING: file already exists but should not: C:\Users\Martin\AppData\Local\Temp\_MEI34922\Include\pyconfig.h
Does anyone know how I can do any of the following:
x86_Microsoft.VC90.CRT_1fc8b3b9a1e18e3b_9.0.21022.8_none
assembly? Where can I take this specific version from?x86_microsoft.vc90.crt_1fc8b3b9a1e18e3b_9.0.30729.4148_none_5090ab56bcba71c2
)?pyconfig.h
unwanted presence issue? Doesn't seem to lead anywhere, but I thought I should try it too.First of all, you need to download Msvcr90.dll to PC from our site. Copy the file to the program install directory after where it is missing the DLL file. Or move the DLL file to the directory of your System (C:\Windows\System32, and for a 64 bit in C:\Windows\SysWOW64\).
Or you can apply the unicode () function to the object to reproduce the version text file. Under macOS, PyInstaller always builds a UNIX executable in dist . If you specify --onedir, the output is a folder named myscript containing supporting files and an executable named myscript .
Use venv to create as many different development environments as you need, each with its unique combination of Python and installed packages. Install PyInstaller in each virtual environment. Use PyInstaller to build your application in each virtual environment. Note that when using venv, the path to the PyInstaller commands is:
The PyInstaller workflow can be summed up by doing the following: Create an entry-point script that calls your main function. Install PyInstaller. Run PyInstaller on your entry-point. Test your new executable. Ship your resulting dist/ folder to users.
The redistributable package that contains version 9.0.21022.8
of msvcr90.dll
and msvcp90.dll
can be downloaded from the Microsoft website here. This will help PyInstaller to find the versions it wants and include them with the resulting executable.
Interestingly enough, I'm able to run the executable compiled by PyInstaller with redistributable version 9.0.30729.6161
installed, it just won't package these dlls. I tried to copy the msvc*90.dll
's into the dist directory, even tried creating and modifying manifest files, but I would still get an error from python27.dll
in the end. Installing any version of VC++ redistributable would fix the issue, but then my package wouldn't be self-containing. I wish I understood what exactly is going on here better...
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With