Stack Exchange Network

Stack Exchange network consists of 182 Q&A communities including Stack Overflow , the largest, most trusted online community for developers to learn, share their knowledge, and build their careers. Visit Stack Exchange

Super User is a question and answer site for computer enthusiasts and power users. It only takes a minute to sign up.

Sign up to join this community

Teams

Q&A for work

Connect and share knowledge within a single location that is structured and easy to search.

Learn more about Teams

I am a new to macOS and I am using an the iMac running macOS 12.6.3 (Monterey) I am trying to load pygame.

I have already loaded python 3.11 and pycharm. Every time I try to load pygame I keep getting the error that it can not load because of a file problem not associated with PIP.

Most solutions require Homebrew but to load it I have to use Bash. When I do I get command not found. I can not load Homebrew or any program requiring Bash.

After much searching, I believe the problem is I have lost Bash or Zsh somehow. I do not know where to go to find them. Every command I have found to locate bash uses Bash and returns command not found.

Can you tell me how to find the file without using Bash? Or how can I reload bash and where should I put it?

Señor CMasMas's comment below allowed me to start installing Homebrew, it is installing now.

Before I started the Homebrew install I tried to close the terminal and as soon as I got out of terminal, the path reverted to what it was before. I typed in the suggested code again and then started Homebrew.

How can I make the changes to the path permanent? I tried searching for the .rc file but nothing was found.

Check out this link from StackOverflow and check back if it doesn't help you. You might also read this to make it make sense. I myself have never seen this on my mac but of course it is possible since it follows the rules that almost all OSs do. Señor CMasMas Feb 7 at 2:02 bash and zsh are extremely hard to remove in recent versions of macOS, since they're in the areas protected by System Integrity Protection (SIP). It's much more likely your PATH variable is messed up, and as a result they system doesn't know where to look for them (and other command files). There are a lot of earlier questions about problems like this, and I recommend looking through them to see if any are relevant to your situation. Gordon Davisson Feb 7 at 2:14 Senor CMasMas - Thank you. this allowed me to start installing homebrew. It is installing now. But before I started the homebrew install I tried to close the terminal and as soon as I got out of terminal the path reverts to what it was before. I typed in your code again and then started homebrew. How can I make the changes to the path permanent. I tried searching for the .rc file but nothing was found. Tiny Feb 7 at 16:14 When someone asks for clarifications or gives suggestions in commentary, instead of answering in comments it's better to edit the question to add new info, as I now did for you. This way everything relevant is readily available for community members and the question reflects the current situation. Peregrino69 Feb 18 at 18:04 It sounds like something in one of your shell initialization files is messing up the PATH variable for each new shell as it starts up. Run /bin/ls -A ~ to list files in your home directory (including normally-invisible ones that start with "."), and look for files like .bash_profile , .bashrc , .zprofile , .zshrc , .zshenv , etc. You'll have to examine the contents of those for lines that have assignments to PATH . Gordon Davisson Feb 20 at 2:35