I downloaded Anaconda on my system (Mac OS), for now solely for the purpose of using Spyder to code in Python. I am having two issues, which are probably easy to solve for someone who is more fit with computers than me. I would be glad for help!
- Adding anaconda to the PATH or not, and if yes, how?
In this thread here I got help with updating Anaconda and Spyder, since executing the lines conda update anaconda
and conda update spyder
would result in zsh: command not found
. Apparently this has to do with anaconda not being added to my PATH. In that thread I was offered a workaround without adding anaconda to my path. However I would have to run a commandline everytime before I update it.
Now, I fully admit, that I don't even know what it means to add anaconda to my path. And I don't know what are the pros and cons of adding it, or not. But I kind of would like to add it, such that I don't have to look up and run this command line every time when I update. Could someone please explain if I should add anaconda to PATH, and if so, how?
- Which python distribution is used by what?
I am getting very confused with python distributions on my system.
- In the panel at the bottom of Spyder I see, that it uses Python 3.7.4..
- In the IPython console of Spyder I see that it uses Python 3.7.0.
- If I run
python --version
in a terminal I get Python 2.7.16 - If I run
python3 --version
in a terminal I get Python 3.7.3
Why are all these different versions on my system? If I develop a script in Spyder, and then want to run it from the terminal, then I of course would like to run it with the same python interpreter as the one Spyder uses. How can I make sure this is the case? Do I for example run a script named script.py by python script.py
, by `python3 script.py´, or by yet another command line?
I am not even sure if python
or python3
calls the distributions which came with anaconda, since when I run which python
or which python3
I get /usr/bin/python
or user /usr/bin/python3
, while anaconda is installed in Users/opt/<my_username>/anaconda3/bin
.
So if someone could clear the fog here for me please as well, that would be great! : )
Thanks for help!