0

I just got my Mac back from Apple with a complete reset. I tried downloading and using Anaconda like I normally wood but nothing seemed to be working correctly, so I tried to install Python3 to use because Mac only ships with 2.7

I notice that my terminal has ~% at the end of it, when it used to have ~$ (is this indicative of anything?)

If I try to download python3 and install it from Python.org, it works but then anything I try and do says my Bash doesn't work, or commands aren't recognized.

Harshal Parekh
  • 5,918
  • 4
  • 21
  • 43
NightLearner
  • 295
  • 1
  • 7
  • 21
  • What do you mean by "my Bash doesn't work"? – iz_ Mar 07 '20 at 21:24
  • 1
    If they've put the latest OS on, you probably have macOS 10.15.3 Catalina. The default shell in Catalina is zsh, not bash, that's why you're getting the `%` instead of the familiar `$` - nothing to do with Python. (see https://scriptingosx.com/2019/06/moving-to-zsh/ for example) – David Buck Mar 07 '20 at 21:30
  • When you say you tried downloading Anaconda but nothing seemed to be working correctly, can you be rather more specific as to what you mean? I have the latest Anaconda distribution of Python running on Catalina with zsh so it's not an obvious incompatability problem. – David Buck Mar 07 '20 at 21:31
  • @DavidBuck Thanks for clearing up the % vs $ confusion! I changed my default shell back to bash, and re-installed Anaconda and everything was working. Essentially when zsh was my default and I installed Anaconda, if I tried to do anything as simple as "Conda activate" or "Conda install" I would get error messages as to the syntax and that "command doesn't exist". Did you have to do anything different when you downloaded / Installed Anaconda to make it work with zsh? – NightLearner Mar 07 '20 at 22:10
  • Ah. I did have Anaconda installed before upgrading from Mojave to Catalina and switching to zsh, but it had no issues afterwards. Perhaps try a `conda update --all` in each venv and switch back to zsh? – David Buck Mar 07 '20 at 22:17
  • 1
    Sounds like you might have a PATH problem. When you type conda or Anaconda it doesn't recognize the command. – Natsfan Mar 07 '20 at 23:42
  • 1
    Does this answer your question? [Conda command not working on macOS](https://stackoverflow.com/questions/51338768/conda-command-not-working-on-macos) – AMC Mar 10 '20 at 22:56
  • 1
    Ah, actually this one is better: https://stackoverflow.com/questions/31615322/zsh-conda-pip-installs-command-not-found – AMC Mar 10 '20 at 22:57
  • @AMC, and JMH, yes you guys are correct on those. figured out the problem. Two solutions works: (1) changing my default shell from zsh to bash and then doing a normal Anaconda install; or (2) changing my path. – NightLearner Mar 12 '20 at 01:34

1 Answers1

0

Mac does come with a builtin Python2.7 but since that is outdated now, you can install python3 and above using hombrew python, just follow the steps within this link. If it still doesn't work, you may need to reconfigure your initial path settings.

See link.

de_classified
  • 1,927
  • 1
  • 15
  • 19