I installed the Python 3.6.2 that can be downloaded from https://python.org/, but it's causing some trouble with the #!/usr/bin/env python3 instruction, which now uses 3.6 by default when I need it to use 3.5, since that is the version that has a bunch of libraries I need installed and pip3 still installs everything to 3.5.

The thing is, as I said, I installed it manually, and what could be worse, I did it with sudo make install instead of sudo make altinstall, so I don't know if Python 3.5 has been partially replaced or something.

Is there any way to remove Python 3.6 in these conditions? Alternatively, is there any way to get #!/usr/bin/env python3 to use Python 3.5, and to just forget about 3.6?

#!/usr/bin/env python3.5 works for using Python 3.5, and Python 3.5 can still be opened in the terminal, so I'd like to think I didn't mess with it, but I don't know.

  • 1
    Look at ls -l /usr/bin/python3* - if /usr/bin/python3 is just a symlink, you may be able tosimply point it at python3.5 – steeldriver Aug 19 '17 at 9:36
  • Have you tried sudo apt-get remove python3.6 anyway? – Nagev Sep 6 '17 at 10:00
  • What's the output of which python3 python3.5 python3.6 | xargs -rd '\n' -- ls -l --? – David Foerster Sep 27 '17 at 9:37

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Browse other questions tagged or ask your own question.