python - 如何在 MSYS2 上安装 Python 开发工具
问题描述
我需要在 MSYS2 上安装 Python 开发工具。
我的 Python 安装工作(通过调用python3.6
或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.
>>>
安装工具:
$ pip3 install setuptools
Requirement already satisfied: setuptools in /usr/lib/python3.6/site-packages (36.4.0)
我已尝试按照如何安装 python 开发人员包中的建议进行安装?. 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
推荐阅读
- java - 从现有枚举中生成内部枚举 // 枚举别名
- python - SpeechRecognition 在 Raspberry Pi 上引发 ALSA 错误
- android - 如何强制在外部浏览器中打开应用链接
- mongodb - 如何查找最近检查日期在 2020 年之后的文件?
- javascript - 从 Airports.JSON 查询 Airport Lat 和 long 反应原生
- html - 如何从输入中获取信息并将其放入href
- pine-script - 有没有办法在函数中使用 bgcolor ?
- javascript - Next.js 增量静态重新生成不反映更改而不重新加载页面
- flutter - 例外:坏状态:未来已经完成
- azure - 视频索引器 API INVALID_INPUT - 索引预设“DefaultWithNoiseReduction”无效