我在以下环境中安装 PycURL 时遇到问题
环境
Python 3.7.0
Windows 10
问题
C:\>pip install pycurl
Collecting pycurl
Using cached https://files.pythonhosted.org/packages/e8/e4/0dbb8735407189f00b33d84122b9be52c790c7c3b25286826f4e1bdb7bde/pycurl-7.43.0.2.tar.gz
Complete output from command python setup.py egg_info:
Please specify --curl-dir=/path/to/built/libcurl
----------------------------------------
Command "python setup.py egg_info" failed with error code 10 in C:\Users\user01\AppData\Local\Temp\pip-install-xrandomx\pycurl\
C:\>
根据官网... http://pycurl.io/docs/latest/install.html#official-packages
Currently official PycURL packages are built against the following Python versions:
2.7.10 3.2.5 3.3.5 3.4.3 3.5.2 3.6.0
这是否意味着我必须卸载当前的 Python 3.7.0 并安装 3.6.0 才能使其正常工作?
还有其他选择吗?
最佳答案
您有两个主要选择:
- 手动为 Python 3.7 编译 pycurl(挖掘起点是 here)
- 使用 pycurl 的非官方二进制文件
后者要容易得多。
最著名的非官方二进制文件站点是 this one .从 here 下载与您的 python 版本和 python 体系结构相匹配的 pycurl whl
文件.使用 pip 安装下载的文件:
pip install C:/path/to/downloaded/file/pycurl‑7.43.1‑cp37‑cp37m‑win_amd64.whl
关于python - PycURL 在 Python 3.7.0 (Windows 10) 上的安装,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/53492993/