Installation of a .whl-module fails for python

Hi. I have troubles installing a module called “neoAPI” for python:
ERROR: neoapi-1.3.0-cp310-cp310-linux_x86_64.whl is not a supported wheel on this platform.

The supplier of the software “neoAPI” writes in his documentation:

run python3 -m pip install neoapi_<neoapi-version>-cp<python-version>-cp<python-version>m-<platform>.whl to install the neoAPI

Here is the most relevant system information:
(baumer_test) [dejhost@lenovoB50 wheel]$ python3 --version Python 3.11.3

System:
  Kernel: 6.1.38-1-MANJARO arch: x86_64 bits: 64 compiler: gcc v: 13.1.1

These versions of neoAPI are available for linux:

neoapi-1.3.0-cp37-cp37m-linux_x86_64.whl  
neoapi-1.3.0-cp27-cp27m-linux_x86_64.whl   
neoapi-1.3.0-cp35-cp35m-linux_x86_64.whl  
neoapi-1.3.0-cp38-cp38-linux_x86_64.whl
neoapi-1.3.0-cp310-cp310-linux_x86_64.whl  
neoapi-1.3.0-cp36-cp36m-linux_x86_64.whl  
neoapi-1.3.0-cp39-cp39-linux_x86_64.whl

Your help is much appreciated!

The wheels are not built for Python 3.11.

You could use pyenv to install a local version of 3.10, or ask the developer to build the wheels for 3.11, (maybe build it yourself?). But seeing that the last commit was in 2015, I guess you should migrate to another package.

Pyenv seems to be best solution.

Thank you very much for your reply, mithrial.
I installed pyenv and the version 3.10.5, and activated it:

pamac install python-virtualenv
virtualenv -p /usr/bin/python3 baumer_test
source baumer_test/bin/activate
pamac install pyenv
pyenv install 3.10.5
pyenv global 3.10.5
pyenv local 3.10.5

So far, so good. in what way would the initial command change? I still get

python3 -m pip install neoapi-1.3.0-cp310-cp310-linux_x86_64.whl 
ERROR: neoapi-1.3.0-cp310-cp310-linux_x86_64.whl is not a supported wheel on this platform.

Thank you

I understand that I mixed things up - so here are the commands that I ran - including the (new) error I get:

pamac install python-virtualenv pyenv-virtualenv
pyenv virtualenv 3.10.5 baumer_test_2
pyenv activate 3.10.5/envs/baumer_test_2
pyenv install neoapi-1.3.0-cp310-cp310-linux_x86_64.whl
/usr/share/pyenv/plugins/python-build/bin/python-build: line 2418: source: neoapi-1.3.0-cp310-cp310-linux_x86_64.whl: cannot execute binary file

Can you help me with this?

By the way: in order to work with virtualenv, I had to modify my ~/.bash_profile (following these instructions. I added

eval "$(pyenv virtualenv-init -)"

Now I have to source it everytime I want to work with virtualenv - which is a bit annoying:

source ~/.bash_profile

Do you know a cure?

Use pyenv to manage the venv:

pyenv install 3.10.12
pyenv virtualenv 3.10.12 yourvenvname

Then you can activate it with

pyenv activate yourvenvname 

(The prompt of the terminal should have changed to indicate the now active venv.)

Then you can install what you like with pip:

pip install neoapi

The following excerpt goes in your shell rc file.
If you use zsh, it has to go to the ~/.zshrc file.

eval "$(pyenv init -)"
eval "$(pyenv virtualenv-init -)"

Thank you so much. That worked!

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.