Even though Python is an interpreted language, you may need to install Windows C++ compilers in some cases.
Unlike Linux, compilers for Windows are not included by default in the OS.
For example, you will need to use them if you wish to:
Such as, let's take the regex package that we use 🔎
It has a non-Python code which must be compiled before installing.
They provide built binary wheels for both 32-bit and 64-bit versions of Windows OS who has Python 3.5+ installation.
Other platforms and also systems with python versions below that has to install the package from its source.
Microsoft provides official C++ compilers called Visual C++, you can find them bundled with Visual Studio or, for some versions, in standalone distributions.
This is a standalone version of Visual C++ 14.0 compiler, you don't need to install Visual Studio 2017.
- Install 🧰 Microsoft Build Tools for Visual Studio 2017.
- The setuptools Python package version must be at least 34.4.0.
Restart PC (recommended)
Note: The compiler's architecture must be the same as Python's (for example: if you use Python 64-bit, you have to use an x64 compiler).
You should know that, Visual C++ 14.0 is intended for Python 3.5+.
If you have an older Python, visit the WindowsCompilers Python wiki-page to get the compiler version that corresponds to your Python version.
Generally, it also provides build tools by default like in Linux.
But once users upgrade their OS, they might need to install it again.
You must install the appropriate version of the Command Line Tools - XCode for your Mac OS.
- Install 🧰 it running,
xcode-select --install
- Also, you can run,
xcode-select -print-path
to see your active developer path.