Using Python 3.9 leads to problems with most of the applications. If not, follow up with their instructions. Make sure that your system is up-to-date and you have got Homebrew installed. Therefore, I decided to make a step-by-step tutorial to show and fix all upcoming issues. But during the setup on a clean macOS Big Sur system, I faced some problems. Thus, installing Python with some popular packages like numpy, pandas or matplotlib suits me best. I know that environment systems are a better solution, but I often want to execute some lines of Python code without the work overhead of setting up a virtual system. I really like the idea of the Homebrew package manager and wanted to go this way. When you open it again, your python command should work successfully.If you plan to develop Python on your macOS machine, there are several ways to set it up: Install it directly, use a package manager like Homebrew, use a container or environment system like pipenv or docker and many more. Now that you’ve done that, simply restart your terminal. If you are using bash instead of zsh, you can do the following instead: echo "alias python=/usr/bin/python3" > ~/.bashrc If you are still facing issues, ensure that python=$ where the $ sign should equal the path python is installed on. This will configure your zsh profile to run /usr/bin/python3 when python is run. You can do this by running the following in terminal: echo "alias python=/usr/bin/python3" > ~/.zshrc The next step is to add python to zsh so that it will run upon typing the python command. If you still face the same issue, move to step 2. Once python is installed, try running python from terminal again. You can also download the executable directly from the Python website to install it. You can install python from terminal if you have brew installed by simply typing: brew install python The first thing you should check is that python is installed. This can happen on any system, but does occur slightly more commonly on MacOS since they removed native python support in MacOS 12.3. Or similarly: bash: command not found: python When trying to run python from terminal, it is possible to run into the following issue: zsh: command not found: python
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |