0

I'm a novice Python developer and I'm experiencing trouble getting started on my first project. My background is not in computer science either, so I've been climbing that learning curve as well.

The root of my problem is that when I input:

python --version

The terminal outputs:

Python 2.7.16

This would be fine if I hadn't already tried installing the most up-to-date Python. Since I've tried installing the most recently released version, when I input:

echo $PATH

The terminal outputs:

/Library/Frameworks/Python.framework/Versions/3.8/bin:/Applications/anaconda3/bin:/anaconda3/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin

My Question:

Why is there a discrepancy between my current version of Python and my PATH? And is this discrepancy the reason why I am having trouble getting started with my first project?

Any advice is much appreciated.

ak40837
  • 13
  • 1
  • 6
  • 1
    Hi ak40837, Welcome to StackOverflow. I don't have a Mac so I don't know exasctly how to help you but have seen the section about [how to setup Python on a Mac](https://docs.python.org/3/using/mac.html) in the official documentation? – EvensF May 14 '20 at 05:06

1 Answers1

0

Because you have installed another version of python as I can see from your mentioned path and it is Python 3.x ('/anaconda3/bin:/anaconda3/bin') and probably you have installed it through anaconda. I explained the solution to this in detail in the below answer. which I hope it helps you: How to add anaconda to PATH?

Anya Samadi
  • 673
  • 1
  • 5
  • 13