1

I was trying to install biopython with pip, but I get an error saying Python 3.6 or later is required, but 2.7 was detected. Weirdly though, when I look for my python version, it indicates I have 3.8.5 installed.

Should I move directories somehow? I just upgraded my Catalina version and did a thorough cleanup on my mac. Maybe I accidentally moved a file or two?

here's what my terminal looks like

Thank you!!!!!

  • 1
    Look at your PATH environment variable. It is probably looking for the version in `/usr/bin` (Python 2.7) before looking for the version you just installed (Python 3.x). You'll have to ensure that the directory containing the new version is on your PATH before the directory containing the old version. And ensure that it happens automatically for you — editing `.profile` or similar. – Jonathan Leffler Oct 01 '20 at 02:38
  • Have you tried updating `pip`? It may be configured to use the old version still. This should be able to help you update it https://stackoverflow.com/questions/38938205/how-to-override-the-pip-command-to-python3-x-instead-of-python2-7/38938246 – Nano Oct 01 '20 at 03:57

1 Answers1

1

You have to deconflict pip and make sure you're using the right one. There's a good answer on another Stack Overflow question.

The bottom line is, you might try:

which -a pip

to see all pip installations in your path.

You can use a specific version of pip like this:

python3 -m pip install something

or, I think you can also do:

pip3.6 install something
Joseph Hansen
  • 12,665
  • 8
  • 50
  • 68