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

Viewed 806

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.

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

(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?

1 Answers

Using pip install lxml-4.5.2-cp38-cp38-win_amd64.whl with the cmd console instead of using venv of PyCharm solved this. 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.

Related