python - 如何在 MSYS2 上安装 Python 开发工具

标签 python python-3.x installation msys msys2

我需要在 MSYS2 上安装 Python 开发工具。

我的 Python 安装有效(通过调用 python3.6python3:

$ 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 已安装:

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

我已尝试按照 How to install python developer package? 中的建议进行安装. MSYS2 没有yum 所以我使用了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 开发工具?

最佳答案

根据您使用的 MSYS2 环境和您想要的 Python 版本,可以安装不同的 Python 包:

$ 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

关于python - 如何在 MSYS2 上安装 Python 开发工具,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/50784367/

相关文章:

python - hvplot.box 中的不同颜色

三引号内的 Python 参数

Python:根据if语句条件填充新的df列

node.js - npm install bower 使用 -g 与 --save-dev

ios - 安装后库内的 Swift Eureka 错误

python - 如何获取 Django 模型中两个字段的乘积

python - 从列表中确定最新日期

python - 代码不适用于黑客等级!适用于 Repl 和 Jupyter

python - 根据值移动列表元素位置

python 2.7.2安装