Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Microsoft Visual C++ Compiler for Python 3.4

I know that there is a "Microsoft Visual C++ Compiler for Python 2.7" but is there, currently or planned, a Microsoft Visual C++ Compiler for Python 3.4 or eve Microsoft Visual C++ Compiler for Python 3.x for that matter? It would be supremely beneficial if I didn't have to install a different version of visual studio on my entire lab.

like image 712
Rusty Weber Avatar asked Apr 28 '15 02:04

Rusty Weber


People also ask

What compiler does Visual Studio use for Python?

Visual Studio 2019 contains Visual C++ 14.2 compiler. The setuptools Python package version must be at least 34.4.

Does Python need Visual C++?

Windows Python needs Visual C++ libraries installed via the SDK to build code, such as via setuptools. extension. Extension or numpy. distutils.

How do I install Microsoft Visual Studio for Python?

Download and run the latest Visual Studio installer for Windows. Python support is present in the release 15.2 and later. If you have Visual Studio installed already, open Visual Studio and run the installer by selecting Tools > Get Tools and Features.

Does Visual Studio have C compiler?

The Visual Studio build tools include a C compiler that you can use to create everything from basic console programs to full Windows Desktop applications, mobile apps, and more.


1 Answers

Unfortunately to be able to use the extension modules provided by others you'll be forced to use the official compiler to compile Python. These are:

  • Visual Studio 2008 for Python 2.7. See: https://docs.python.org/2.7/using/windows.html#compiling-python-on-windows

  • Visual Studio 2010 for Python 3.4. See: https://docs.python.org/3.4/using/windows.html#compiling-python-on-windows

Alternatively, you can use MinGw to compile extensions in a way that won't depend on others.

See: https://docs.python.org/2/install/#gnu-c-cygwin-MinGW or https://docs.python.org/3.4/install/#gnu-c-cygwin-mingw

This allows you to have one compiler to build your extensions for both versions of Python, Python 2.x and Python 3.x.

like image 104
Vivian De Smedt Avatar answered Sep 23 '22 05:09

Vivian De Smedt