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.
Best Answer
Without much knowledge of Wine, I'd work around that problem making the program happy and giving it a disk that is smaller than 2 GB.
It's very simple. First, create a file filled with 0s that is 512 MB (or more, but less than 2048):
Next, format it using the default file system:
Move the existing directory to a temporary name:
Mount the new disk as a loop device at the original location:
Copy the entire tree in:
And run the program from there. If it still doesn't work, then you'll need a different solution.
(There is, unfortunately, a chance that it won't work. If it can't handle 2 GB of disk space, it will probably not handle 2 GB of RAM...)
Provided it works, I suggest your unmount it and put it in your
/etc/fstab
:In this line
fmask
anddmask
are mask permissions for files and directories. Notice that they are the opposite of what you would use withchmod
. That is,7
stands for no permissions (---
) and0
stands for full permissions (wrx
). Read more here: fstab Permission Masks Explained.