3

I'm currently working with some IMU sensors, and the manufacturer provided a wheel file to manage sensor data from python. but I am getting the following message whenever I try to install it using pip:

pip3 install xsensdeviceapi-2019.0.1-cp35-none-linux_x86_64.whl
xsensdeviceapi-2019.0.1-cp35-none-linux_x86_64.whl is not a supported wheel on this platform.

My system configuration is as follows:

  • OS: Ubuntu 18.04
  • Python: Python 3.6.7
  • Pip: pip 9.0.1 from /usr/lib/python3/dist-packages (python 3.6)

I've read this similar thread, and the response from Arun, and after typing the suggested commands, by first entering the python interpreter:

python3
>>> import pip
>>> print(pip.get425tags.get_supported())

i'm getting the next output:

[('cp36', 'cp36m', 'manylinux1_x86_64'), ('cp36', 'cp36m', 'linux_x86_64'),
('cp36', 'abi3', 'manylinux1_x86_64'), ('cp36', 'abi3', 'linux_x86_64'), 
('cp36', 'none', 'manylinux1_x86_64'), ('cp36', 'none', 'linux_x86_64'), 
('cp35', 'abi3', 'manylinux1_x86_64'), ('cp35', 'abi3', 'linux_x86_64'), 
('cp34', 'abi3', 'manylinux1_x86_64'), ('cp34', 'abi3', 'linux_x86_64'), 
('cp33', 'abi3', 'manylinux1_x86_64'), ('cp33', 'abi3', 'linux_x86_64'), 
('cp32', 'abi3', 'manylinux1_x86_64'), ('cp32', 'abi3', 'linux_x86_64'), 
('py3', 'none', 'manylinux1_x86_64'), ('py3', 'none', 'linux_x86_64'), 
('cp36', 'none', 'any'), ('cp3', 'none', 'any'), ('py36', 'none', 'any'), 
('py3', 'none', 'any'), ('py35', 'none', 'any'), ('py34', 'none', 'any'), 
('py33', 'none', 'any'), ('py32', 'none', 'any'), ('py31', 'none', 'any'), 
('py30', 'none', 'any')]

For what I have read and for what I think I understood, it is not supported because there is no cp35-none tag in the output given by pip.get425tags.get_supported()

The issue now is, that in the other threads the solution for most cases is to go and search for the correct wheel file, depending on the supported tags and python version. But in this particular case, this is the only file available. Also in this other thread DSchmidt suggests to upgrade pip via pip install --upgrade pip, that didn't work for me either, still couldn't install the wheel, and also couldn't import any other module like numpy or matplotlib.

So, is there a way to add support to my python environment? Or do I need to create another environment with a docker or something like that?

I'm kind of a novice, so all the help will be really appreciated.

houman.sanati
  • 1,054
  • 3
  • 18
  • 34
  • @zwer Have you read the question? *manufacturer provided a wheel file*… *this is the only file available* – phd Apr 08 '19 at 18:49
  • 1
    `cp35` means the wheel is for Python 3.5. Either ask manufacturer to provide wheels for other Python versions or install Python 3.5 and install the wheel for a virtualenv created with Python 3.5. – phd Apr 08 '19 at 18:51
  • @phd does that mean that I need to uninstall my python 3.6, or is it safe to have two different python3 versions?. Also I assume I need to install `python3-virtualenv`. How to tell `virtualenv` which version i want to use? – Marco Cardoso Apr 08 '19 at 19:03
  • 1
    1. You can have as many python versions as you need. I for one have 2.7 and all version 3.4+, 32- and 64-bit; I use them to run tests under different Pythons. 2. You can have `virtualenv` installed for one Python and create virtual environments for another: `virtualenv -p /usr/bin/python3.5`. – phd Apr 08 '19 at 19:24
  • Thanks for keep answering. I've been looking on the web, and i found this tool called `pyenv` which apparently makes installation of multiple python version easier, and also provides some sort of `virtualenv` support. Is this a way you would recommend? or is there another way – Marco Cardoso Apr 08 '19 at 19:50
  • Yes, it's a good way. – phd Apr 08 '19 at 20:00

1 Answers1

0

Unfortunately even if you did install that wheel on Python 3.6, it would not run. In general extensions compiled for one version of Python do not work on other versions.

The deadsnakes PPA is a way to install older Python versions on Ubuntu. You might be able to get a compatible Python 3.5 from https://launchpad.net/~deadsnakes/+archive/ubuntu/ppa

joeforker
  • 40,459
  • 37
  • 151
  • 246