如何在MSYS2上安装Python开发工具 [英] How to install Python Development tools on MSYS2
问题描述
我需要在MSYS2上安装Python开发工具.
I need to install the Python development tools on MSYS2.
我的Python安装有效(通过调用python3.6
或python3
:
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已安装:
Setuptools is installed:
$ pip3 install setuptools
Requirement already satisfied: setuptools in /usr/lib/python3.6/site-packages (36.4.0)
我已尝试按照如何安装python开发人员软件包中的建议进行安装?. MSYS2
没有yum
,所以我使用了pacman
:
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
到目前为止,这一切都失败了.如何获得Python开发工具?
So far this has all failed. How can I get the Python development tools?
推荐答案
要安装的Python软件包不同,具体取决于您所使用的MSYS2环境和所需的Python版本:
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
这篇关于如何在MSYS2上安装Python开发工具的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!