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

时间:2018-06-10 13:49:47

标签: 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开发工具?

2 个答案:

答案 0 :(得分:2)

要安装不同的Python软件包,具体取决于您使用的MSYS2环境以及您想要的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

答案 1 :(得分:0)

“正在回答”,因为我也遇到了这个问题,并且注释格式非常糟糕。

我知道这个线程已经使用了两年,但是我在寻找正确的python开发包时遇到了麻烦。我尝试了以下软件包:

  • mingw-w64-x86_64-python

  • libgpgme-python

  • mingw-w64-i686-python3

  • 基础开发

但是我在运行pyinstaller时仍然遇到相同的错误:

OSError: Python library not found: libpython3.8m.dll, libpython38m.dll, libpython3.8.dll, python38.dll, libpython38.dll

如果有人有任何想法,我会向他们开放!

相关问题