【发布时间】:2019-10-25 22:20:44
【问题描述】:
我很难安装 libxml2。我正在尝试使用 wheel 文件通过命令行安装它。我有 Python 3.8,但没有看到 Python 3.8 的任何 .whl 文件。我需要使用早期版本的 Python 吗?
当我尝试使用 Python 文件夹中的 whl 文件进行安装时,出现以下错误:
C:\Users\Jack\AppData\Local\Programs\Python\Python38-32>pip install libxml2_python-2.9.3-cp27-none-win32.whl
ERROR: libxml2_python-2.9.3-cp27-none-win32.whl is not a supported wheel on this platform.
车轮已安装:
C:\Users\Jack\AppData\Local\Programs\Python\Python38-32>python -m pip install wheel
Requirement already satisfied: wheel in c:\users\jack\appdata\local\programs\python\python38-32\lib\site-packages (0.33.6)
这里有更多信息:
C:\Users\Jack\AppData\Local\Programs\Python\Python38-32>where python
C:\Users\Jack\AppData\Local\Programs\Python\Python38-32\python.exe
C:\Users\Jack\Anaconda3\python.exe
C:\Users\Jack\AppData\Local\Programs\Python\Python38-32>where pip
C:\Users\Jack\AppData\Local\Programs\Python\Python38-32\Scripts\pip.exe
C:\Users\Jack\Anaconda3\Scripts\pip.exe
C:\Users\Jack\AppData\Local\Programs\Python\Python38-32>where pip3
C:\Users\Jack\AppData\Local\Programs\Python\Python38-32\Scripts\pip3.exe
C:\Users\Jack\AppData\Local\Programs\Python\Python38-32>python -c"import struct;print( 8 * struct.calcsize('P'))"
32
【问题讨论】:
-
每个 Python 版本都可能有自己的模块版本 - 而
cp27表示它只是Python 2.7的模块。使用pip3 search lxml2我看到libxml2-python3应该适用于 Python 3,但它可能只适用于 3.5、3.6、3.7。 Python 3.8 非常新,最好使用 3.7,等几个月后 3.8 会更好地测试