0

I am relatively new to using command line interfaces and trying to change the Path aspect of python. The issue I have is that I seem to have three version of python.

  1. python 2.7.16
  2. python 3.10
  3. python 3.8 (installed with homebrew)

I would like to do 2 things:

  1. install python 3.8.9 with homebrew
  2. set python path to be 3.8.9

The issues I have run into are 3.8.9 is not accepted for homebrew when I do

brew install python@3.8.9

And I have tried to follow the directions here but to no avail. I am using zsh. I have python stored in /usr/bin/python or python3 folders.

Jack Armstrong
  • 1,182
  • 4
  • 26
  • 59
  • Your default terminal is zsh. Check the zshrc file. What python path does the file contain? You can update python path in this file. The path in the file is the python version you are using. To update python, try "brew install python3@3.8.9". That should work. – VRComp Jan 12 '22 at 16:32
  • brew install python3@3.8.9 did not work. No available formula with the name.... How do I check the zshrc file? – Jack Armstrong Jan 12 '22 at 16:38
  • Go to cd ~ then type ls -a. Do you see a .zshrc file? If so, open it like this: vim ~/.zshrc. You can use any text editor. – VRComp Jan 12 '22 at 16:43
  • I keep getting command not found: Is I did `cd ~` then `Is -a` – Jack Armstrong Jan 12 '22 at 16:46
  • Oh. It's lower case L -a. Copy and paste this to terminal: `ls -a` – VRComp Jan 12 '22 at 16:47
  • smh... Yes that worked. Now it says E325 Attention. Found a swap file. Options are to open read only, edit anyway, recover, delete it, quit, or abort. I feel like whatever I did previously before asking for help is probably not set up correctly – Jack Armstrong Jan 12 '22 at 16:49
  • Let us [continue this discussion in chat](https://chat.stackoverflow.com/rooms/241008/discussion-between-vrcomp-and-jack-armstrong). – VRComp Jan 12 '22 at 16:50
  • Okay, ready to chat – Jack Armstrong Jan 12 '22 at 17:36
  • The link you are posting in your question, is a solution for _bash_. How did you adapt it for zsh? – user1934428 Jan 13 '22 at 08:48
  • I probably didn't... – Jack Armstrong Jan 13 '22 at 12:19

0 Answers0