Search code examples
bashpipsudo

Bash prompt missing from native terminal shell


I am using a machine running OSX High Sierra 10.13.6. I am not the admin on the computer, but I was granted sudo privileges to work on some of my coding projects.

Yesterday, I ran a handful of sudo commands in VSCode's integrated terminal including:

sudo pip install MySQL-connector-python
sudo pip install beautifulsoup4

At this point, I realized I would be better off installing these packages to my user, and I used commands like:

pip install --user Scrapy

I then started running into issues and was advised to run these two commands.

sudo brew upgrade python
sudo find / -name scrapy

From there, my terminal got stuck, and the prompt wouldn't execute. I recall having a few sudo commands that day that when I hit enter, would move my cursor to the following line, and not allow me to do anything but close the terminal window. After these two commands, my terminal window would not display a bash prompt. Rather, the cursor was all the way to the left of the window.

At this point, I found that my native terminal, and iTerm2 were both experiencing the same problem. I couldn't access the bash prompt, rendering my terminal useless.

Today, the VSCode integrated terminal is offering a bash prompt, but the native terminal and iTerm2 are not.

Please advise


Solution

  • Turns out sudo was running in the background, hanging the native terminal and iTerm. Still unclear why the VSCode terminal was letting me use bash.

    Went into the activity monitor and force quit all instances of sudo. Seems to have solved the problem.