Skip to content

Latest commit

 

History

History
53 lines (39 loc) · 2.43 KB

BUILD_TOOLS.md

File metadata and controls

53 lines (39 loc) · 2.43 KB

Install Build Tools

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:

  • Install a non-pure Python package from sources by pip (if there is no wheel package provided).

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.

Windows OS

Microsoft provides official C++ compilers called Visual C++, you can find them bundled with Visual Studio or, for some versions, in standalone distributions.

Microsoft Visual C++ 14.0 standalone: Build Tools for Visual Studio 2017 (x86, x64, ARM, ARM64)

This is a standalone version of Visual C++ 14.0 compiler, you don't need to install Visual Studio 2017.

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.

Mac OS X

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.