Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do you compile python 3.5 code with Mingw?

I've spent a rather long time today trying to compile a pyd for python 3.5 on windows 10 using code generated with cython. I know one can do it with MSVS but I want to use mingw instead because I don't want to download too much junk. I've searched around and I've found this SO question: How to compile .c code from Cython with gcc I've tried to follow the accepted answer (changing all the Python27's to Python35) but to no use. I see it does work with python 2.7 though, so I was wondering why it doesn't work properly on 3.5. If anybody could help me with this issue, it would be magnificent. Thanks in advance.

like image 638
Paolo Celati Avatar asked Dec 22 '15 18:12

Paolo Celati


People also ask

How do I compile Python in MinGW?

MinGW is an alternative C/C++ compiler that works with all Python versions up to 3.4. Install Minimalist GNU For Windows into C:\MinGW. Open MinGW Installation Manager, check mingw32-base and mingw32-gcc-g++, and Apply Changes in the Installation menu. Add C:\MinGW\bin to the PATH environment variable.

Can GCC compile Python?

In theory the plugin allows you to write Python scripts that can run inside GCC as it compiles code, exposing GCC's internal data structures as a collection of Python classes and functions.

What is MinGW Python?

MinGw-W64 (a version of MinGW) is the best compiler for C++ on Windows. To compile and execute the C++ program, you need 'g++' for Windows. MinGW allows to compilation and execution of C++ programs dynamically through a Python program using g++.


1 Answers

mingwpy still doesn't have support for Python 3.5, but it'll change some day.

See Specific Notes section

UPD: mingwpy for python-3.5 could be provided with a significant limitation

like image 155
Winand Avatar answered Oct 21 '22 15:10

Winand