Skip to content Skip to sidebar Skip to footer

Zsh Can't Find Python Home Directory

I'm having an issue using Python in my Mac Terminal Shell. I used Python through Mac Terminal yesterday, but after I worked in Pycharm this morning, there seems to be an issue with

Solution 1:

Apparently the PATH of your S.O. It can't find the file to launch Python in your terminal so you could:

  1. reinstall Python from the command line (zsh) and validate the "python" command again from the terminal

  2. find the file associated with Python with commands like "find" and then modify the path of the PATH to the path where the Python launcher is

Solution 2:

Pycharm has a tendency of changing your PATH after installation.

You have basically 3 options:

Option 1: Reinstall Python and use the path for both pycharm and zsh

I recommend this. It's a little bit of work, but you have a messy situation right now and completely kicking python off the system and then setting the PATH in your bash_profile and Pycharm is cleaner than the other options.

  1. Uninstall Python. Make sure not to touch MacOS system Python.

  2. Install Python

  3. Path in Pycharm

Option 2: Find the path, Pycharm uses and set it in your bashprofile

See 1.3.

Option 3: Install Python and run it separately to the python path pycharm uses.

See 1.2

Post a Comment for "Zsh Can't Find Python Home Directory"