【发布时间】:2019-10-15 14:48:49
【问题描述】:
我一直在尝试使用pip install 在Cygwin 上的Python3.8 下安装cython 和lxml 软件包。然而,这反复失败,出现难以理解的错误,从 python 错误到 gcc 头文件未找到,即使它们在那里。
因为lxml 依赖于Cython,我们需要先确保它能够正常工作。不幸的是,Cygwin 的 python3.8 似乎还不支持 cython。所以我们被告知从here下载和使用wheel。
pip install Cython-0.29.13-cp38-cp38-win32.whl
# This fails with:
#ERROR: Cython-0.29.13-cp38-cp38-win32.whl is not a supported wheel on this platform.
# Instead use:
pip install Cython --install-option="--no-cython-compile"
# OK!
现在让我们尝试安装lxml 包。
pip install lxml
# FAIL
STATIC_DEPS=true pip3 install lxml
# FAIL
让我们检查Python.h 是否存在:
# find /usr/include -type f -name "Python.h"
/usr/include/python2.7/Python.h
/usr/include/python3.6m/Python.h
/usr/include/python3.8/Python.h
好的...
那么问题出在哪里?
相关问题:
【问题讨论】:
标签: python cygwin lxml cython python-3.8