I'm on an RPi4 running the 64-bit version of Raspbian and want to have 2.7 and 3.x coexisting with NO problems. 3.x is part of the 64-bit Raspbian when installed. I just installed 2.7 (i.e., sudo apt install python2.7).

Now I need to install 2.7 modules for which I've already installed the 3.x version. There is no pip2.7, so what's the best way to do this? In particular scipy, so I'll have a 2.7 scipy and a 3.x scipy.

  • 1
    There should be a pip2 as far as I know.
    – Ghanima
    Jun 7 at 20:06
  • 1
    You should reconsider as 2.7 is no longer supported, not even for security updates. Jun 7 at 20:17
  • The problem is, I'm trying to make use of some older Python code to translate MatLab into Python and it's written in 2.7. Not sure I want to try updating all this code to 3.x.
    – jski
    Jun 8 at 13:30
  • Oh yeah, I forgot. It' >5,000 lines of 2.7 code.
    – jski
    Jun 8 at 14:05


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.