Sos mac terminal completing breaking down

I tried to do the pipenv lesson but I typed in something wrong in the code and now my mac terminal is running this code NONSTOP and I do not know how to get it to the way it was before. SOMEBODY PLS HELP

Hello @design1501151272, welcome to the forums! Try to quit terminal (cmd + Q), and if it says something like ‘this program is still running’, just force quit.

1 Like

Hi there.

As @codeneutrino has said, you should be able to forcibly end the terminal session.

Once you’ve done that, I presume you were in the process of changing something in your ~/.bash_profile or similar. Hopefully, you created a backup copy of whichever file you were changing before you started changing it. If not, you should be able to work backwards and undo the changes you made.

After that, your terminal should behave correctly again. :slight_smile:

i have tried that countless times, whenever I quit and go back in the code is still running

I have no idea what I changed, is there some way you could help me undo the changes I did? I really need it to work properly

You could try quitting terminal, then putting the code file in the bin-I’m not sure how drastic that would be, but it might help-then clear the bin. Alternatively you could try a force-shut down, although I wouldn’t recommend that.

This is likely caused by something that was incorrectly changed in one of the following files in your “home” directory:

  • .bash_profile
  • .bashrc
  • .profile
  • .zshrc

Since the problem occurs whenever you open a new Terminal window, you cannot use Terminal to fix the problem.

Instead, open a Finder window and navigate to your “home” directory, which may or may be listed on the left side of your Finder window. If you do, it will have an icon that looks like a little house (home) and is labeled with your username. If you don’t, select your Desktop icon on the left, and then navigate up one directory level. That’s your home directory, which is /Users/<your-username>.

Your home directory should contain all of the files listed above, but you probably cannot see them listed in your home directory in the Finder window because files with names that start with a dot (.) are hidden by default (which can be very annoying). To make Finder show such files, press Shift-Command-. (press the Shift, Command, and period keys simultaneously, then release them all).

Now that you should be able to see all of the hidden files, you should be able to see all of the files above, although they may be harder to see because they may be grayed out.

One by one, find each of the files listed above in the Finder window and click on each one. When you click on one of them, you should see some of the file information displayed on the right, including several dates (Created, Modified, Last opened).

If any of those dates seem to correspond with when you started seeing this behavior, then open the selected file using a text editor, such as TextPad (all of the files listed above are text files).

Then, go to the bottom of the file to see what might have been added by some command you used during the installation process. Sometimes, whatever modified the file will even insert comments above or around the bits that were added.

If you don’t see anything that looks suspicious, move to the next file.

If you do find lines that look suspicious, comment them out by inserting a hash (#) at the beginning of the line(s). Then save the file and open a new Terminal window to see if the problem persists. If not, you’re done. If so, move on to the next file in the list above and follow the same steps.


You could check on the Python website, their installer might be able to repair it, if it is a problem with a python file.
If it is a problem with your computer OS, you could check with your OS manufacture, an installation disk might be able to repair it.

Follow @chuckwondo’s instructions and you should be able to fix your error. I’ve done something similar by mistyping a .bash_profile command in the linux terminal and you just have to find the file and delete what you accidentally added. The nice thing is that when you’re adding something to the bash_profile it gets added on the bottom, so you just scroll to the bottom of the correct file and you should see your mistyped command there.


it fixed it!

the problem was in the problem attached

If someone could tell me what my laptop was doing from this picture it would be helpful (I added the hashtag sign at the beginning of the first line).

but now I have a new problem, when I open in terminal I can no loner see my username with the dollar sign next to it ready to take in code. Is there some way I can fix it?

actually that’s the same problem as before. you had no prompt then, you have no prompt now.
i suggest looking at your cpu usage when you have your terminal open

What exactly were you trying to do? Is this the link to the lesson?

If I were you, the first thing I would change is to delete the spaces on either side of your = in the first line, uncomment that line, save the file and try opening a terminal. Your original error said this because there are not supposed to be spaces around your equals sign:

Which file is that? If it is your ~/.bash_profile, the problem is that you have an infinite loop, which would explain why you don’t get a prompt. When you open a new Terminal window, your ~/.bash_profile is automatically sourced, but the following line causes an infinite loop, so delete this line:

source ~/.bash_profile
1 Like