python - 找不到lpython2.7

标签 python windows python-2.7 gcc cygwin

/usr/lib/gcc/x86_64-pc-cygwin/5.4.0/../../../../x86_64-pc-cygwin/bin/ld: cannot find -lpython2.7 collect2: error: ld returned 1 exit status

我正在使用 cygwin,尝试安装 sentry 并遇到此错误?

谁能告诉我为什么会遇到这个问题,这个问题与 python-dev 包有关吗?

如果需要的话,如何在 cygwin 上安装 python-dev ?

最佳答案

要搜索包含文件的包,您可以使用cygcheckhttps://cygwin.com/packages/

在您的情况下使用 cygcheck:

$ cygcheck -p libpython2.7.dll.a
Found 3 matches for libpython2.7.dll.a
python-devel-2.7.12-1 - python-devel: Python language interpreter (installed binaries and support files)
python-2.7.10-1 - python: Python language interpreter (installed binaries and support files)
python2-devel-2.7.13-1 - python2-devel: Python 2 language interpreter

因此您需要使用 Cygwin Setup 安装 python2-devel 软件包 因为它是具有正确文件的最后一个版本。
不要对 Cygwin 安装程序 中已提供的软件包使用 pip install

关于python - 找不到lpython2.7,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/43271403/

相关文章:

python - 如何从 CSV 文件创建 Target(y) 和 X 变量

python - 将字符串与 Python 中的片段列表进行比较

python - 当不满足条件时中断 if __name__

python - VScode 看不到 pyenv python 解释器

c - 如何解决错误消息 re : C:\WINDOWS\SysWOW64\msvcrt. dll

javascript - 类型错误 : 'NoneType' object is not subscriptable while invoking execute_script() for Chrome Download Manager through Selenium

windows - 如何让我的程序在特定文件夹中搜索依赖项?

mysql - 如何查看不同表中的 2 列之间是否存在匹配(以百分比表示)

python - 对列表类变量进行映射操作

python - 在 Pandas 中用 Groupby 减去两列