-
Notifications
You must be signed in to change notification settings - Fork 224
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Memory leak loading python modules compiled by MinGW #271
Comments
I reproduced the problem on Windows 8.1 and I did some further tests. It seems
|
The problem is buried deep in the python internal import routines, as it also occurs when using
So I guess it has something to do with mingw's binary format which python does not like. |
So finally I got it working, compiling with Windows SDK 7.1 for x86 and x64 both imports fine, so it really is a pure MinGW x64 problem. |
@buergi it's known that MinGW x64 is still unstable. It should be recommended to use Visual Studio in Anaconda documentation. |
@ilanschnell what do you think about suggesting in our docs that Visual Studio should be used to compile extensions on Windows? |
Sure, but this is general Python knowledge, not specific to Anaconda. |
@ilanschnell yes, but since Anaconda comes with MinGW, people assumes is better to use it instead of Visual Studio. |
For example, see issue #175 |
@buergi 's test module works out of the box with the Winpython distribution https://winpython.github.io. This distro is equiped with the |
Pinging @stonebig to see if he can give us further context. |
the |
the mingwstatic toolchain IS a fully fledged compiler toolchain with its own set of patches. tdm-mingw i.e. doesn't solve the CRT mismatch issues your are faced with development of python extensions on Windows. |
Hi all, Carl said it all. I do think the carlkl mingwstatic toolchain is the pertinent cython companion for windows, because it solves all problems: I don't think I received any complaint since I ship carlkl mingwstatic in Winpython, since 4 months Hope it helps |
MinGW gcc when used upon python build creates a 4 GB overhead upon import. Try with visual c++. Possibly won't work like that. For the error see ContinuumIO/anaconda-issues#271
Just tried to build an own python module with the MinGW gcc shipped with anaconda.
When loading the build module python allocates >4GB memory instantly, freezing the whole computer and freeing it not before python is closed.
I use a fresh installation of Anaconda3 2.1.0 for Win7 x64 with python 3.4 and the following useless python module.
foo.c
setup.py
Calling
python setup.py build
and importing the module yields the undesired result.I guess it has something to do with libpython, is there anything I can do to produce working python modules?
The text was updated successfully, but these errors were encountered: