How to install Python Development tools on MSYS2
Asked Answered
D

1

9

I need to install the Python development tools on MSYS2.

My Python installation works (by either calling python3.6 or python3:

$ python3.6
Python 3.6.5 (default, Apr 16 2018, 10:17:38)  [GCC 7.3.0 64 bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>>

Setuptools is installed:

$ pip3 install setuptools
Requirement already satisfied: setuptools in /usr/lib/python3.6/site-packages (36.4.0)

I have tried to install as it suggested in How to install python developer package?. MSYS2 does not have yum so I used pacman:

$ pacman -S python-devel
error: target not found: python-devel

$ pacman -S python3-devel
error: target not found: python3-devel

$ pacman -S python3.6-devel
error: target not found: python3.6-devel

$ pacman -S python-dev
error: target not found: python-dev

$ pacman -S python3-dev
error: target not found: python3-dev

$ pacman -S python3.6-dev
error: target not found: python3.6-dev

So far this has all failed. How can I get the Python development tools?

Distemper answered 10/6, 2018 at 13:49 Comment(0)
T
5

There are different Python packages to install depending on which MSYS2 environment you are using and which version of Python you want:

$ pacman -Qs python
local/mingw-w64-i686-python2 2.7.14-5
    A high-level scripting language (mingw-w64)
local/mingw-w64-i686-python3 3.6.4-2
    A high-level scripting language (mingw-w64)
local/mingw-w64-x86_64-python2 2.7.14-5
    A high-level scripting language (mingw-w64)
local/mingw-w64-x86_64-python3 3.6.4-2
    A high-level scripting language (mingw-w64)
local/python2 2.7.13-1
    A high-level scripting language
Ticon answered 10/6, 2018 at 18:21 Comment(2)
OK I have Python 2 and 3 compatibility utilities local/scons 2.5.1-1 (base-devel) Extensible Python-based build utility. Does that mean it is ready to use?Distemper
scons is just a build tool written in Python, not Python itself. Try installing one of the packages I listed above. For example, in a MinGW 32-bit shell, install the MinGW 32-bit Python by running pacman -S mingw-w64-i686-python3. You didn't tell me what MSYS2 environment you want to use so I'm just guessing here; it's hard to provide a specific answer tailored to your needs without more info. By the way, there are almost no "dev" packages in MSYS2; every package comes with related development headers and libraries if applicable.Ticon

© 2022 - 2024 — McMap. All rights reserved.