This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

nRF5 SDK for Mesh v2.2.0 - Python 2.7 and 3 Coexistence

So what steps do we need to take to have these two different Python versions both installed & usable at the same time on the same machine?

The 'Installing the toolchain' page says that tools have to be in the PATH - but, surely, it is going to matter what order they appear in the PATH ?

Parents
  • Hi,

    Newer versions of Python 3.x will install as "py" in addition to "python". You may have to rearrange your PATH in order for "python" to refer to the Python 2 install (having the Python 2 directory come first in PATH), but if you install Python 2 before Python 3 then this should work out of the box.

    Similarly, by default you can use "pip3" for the Python 3 version of pip, and "pip" for the Python 2 version.

    Regards,
    Terje

Reply
  • Hi,

    Newer versions of Python 3.x will install as "py" in addition to "python". You may have to rearrange your PATH in order for "python" to refer to the Python 2 install (having the Python 2 directory come first in PATH), but if you install Python 2 before Python 3 then this should work out of the box.

    Similarly, by default you can use "pip3" for the Python 3 version of pip, and "pip" for the Python 2 version.

    Regards,
    Terje

Children
No Data
Related