简体   繁体   English

无法使用 python3/pip 安装本地轮子(此平台上不支持轮子)

[英]can't install local wheels with python3/pip (not a supported wheel on this platform)

I want to install lxml with python3 on my windows machine, but it complains there is lack of libxml2 so that I can't compile it with Visual Studio, I think.我想在我的 windows 机器上安装带有 python3 的 lxml,但它抱怨缺少libxml2 ,所以我认为我无法用 Visual Studio 编译它。

I googled and found that I maybe have to download "un-official" wheel myself from here and install that with pip, but I can't do that since it seems all the wheels are not supported, by the way, I am using Pycharms' venv我用谷歌搜索,发现我可能必须自己从这里下载“非官方”轮子并用 pip 安装它,但我不能这样做,因为似乎不支持所有轮子,顺便说一下,我正在使用 Pycharms ' venv

(venv) D:\work\bigquery - Copy>python
Python 3.8.2 (tags/v3.8.2:7b3ab59, Feb 25 2020, 23:03:10) [MSC v.1916 64 bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> exit()

(venv) D:\work\bigquery - Copy>pip --version
pip 19.0.3 from d:\work\bigquery - copy\venv\lib\site-packages\pip-19.0.3-py3.8.egg\pip (python 3.8)

(venv) D:\work\bigquery - Copy>pip install lxml-4.5.2-cp38-cp38-win_amd64.whl
lxml-4.5.2-cp38-cp38-win_amd64.whl is not a supported wheel on this platform.

(venv) D:\work\bigquery - Copy>pip install lxml-4.5.2-cp39-cp39-win32.whl
lxml-4.5.2-cp39-cp39-win32.whl is not a supported wheel on this platform.

(venv) D:\work\bigquery - Copy>pip install lxml-4.5.2-cp38-cp38-win32.whl
lxml-4.5.2-cp38-cp38-win32.whl is not a supported wheel on this platform.

I have tried numbers of wheels of that package, but all seems not to work, What could be wrong?我已经尝试了 package 的轮子数量,但似乎都不起作用,可能有什么问题?

Using pip install lxml-4.5.2-cp38-cp38-win_amd64.whl with the cmd console instead of using venv of PyCharm solved this.使用pip install lxml-4.5.2-cp38-cp38-win_amd64.whlcmd控制台而不是使用 Z4149CE0EE30A909A1F62C583FF20C2 的 venv 解决了这个问题。 Post here in case it may inspire someone meeting a similar issue.在此处发布以防它可能会激发遇到类似问题的人。

After installing the lib with cmd console I needed, I could create a new venv that inherits the global site-packages.在使用我需要的cmd控制台安装 lib 后,我可以创建一个继承全局站点包的新 venv。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM