Few users need to run Python under Wine, since Python works very well natively on all the systems that Wine works on. However, there are reasons to do it and it seems you have one (building a Windows installer with PyInstaller).
Some versions of Python certainly can run on some versions of Wine. Unfortunately, you've run into a combination that doesn't work.
What's happening
It looks like you're running into Bug #39437: "Visual Studio 2015-compiled C++ programs do not run".
The program you're running uses a function called _initialize_onexit_table
from a library called api-ms-win-crt-runtime-l1-1-0.dll
.
Wine provides its own version of api-ms-win-crt-runtime-l1-1-0.dll
but it did not support the _initialize_onexit_table
function until relatively recently (mid-2016). Wine 2.0 is the first Stable release that supports this function, although Development versions have supported it since 1.9.9.
Wine 2.0 will probably be released in the next couple of weeks, but release candidates are already available. Wine 2.0 was released a couple of weeks after this question was posted.
Can't upgrade Wine?
On a Windows computer, you'd be using Microsoft's version of that library. If you have a copy of Microsoft's version, you can configure Wine to use it instead of its builtin version.
You can use Wine's override
system to achieve this (using winecfg or setting the WINEDLLPATH
and WINEDLLOVERRIDES
environment variables).
There is a project called Winetricks which can download Microsoft's libraries and configure your Wine to use them.
In conclusion
Upgrade your Wine version, or downgrade your Python version.
There are ways around it if you can't upgrade, but upgrading is probably your best option.