Search code examples
python-3.xpython-2.7piprhel7python-wheel

Python3 and pip3 + dose the wheels that installed for python2 can used also for python3


Until yesterday we works with python 2.7.5 and wheels packages was installed for python 2.7.5 by pip ( pip that is related to python 2.7.5 )

Now we install the latest python version from redhat – 3.8

We also installed the pip3 , when we installed python 3.8 the additional rpm was also pip3

So until now everything is ok

What we want to understand is about the current wheels packages that was installed with pip (pip2)

Since now we have python 3 , I guess we need to install with pip3 the new wheels for python 3 , I assume python 3 cant use the wheels for python 2

Please let me if I correct , and I will happy to get corrections


Solution

  • dose the wheels that installed for python2 can used also for python3

    Some wheels are compatible with both, some are not.

    For some projects it is possible to produce wheels that are compatible with Python 2 and 3, for some it is impossible. It all comes down to the actual code of the projects.

    It is is quite straightforward to identify which platforms (Python interpreter version, OS, and CPU bitness) a wheel is compatible with by looking at the file name. It is all explained in PEP 425.