3

I started virtualenv on my Mac OS, using the commands

python -m virtualenv envsp
source env/bin/activate

Then it was successfully activated.

Then I entered exit, and I got a response which says

logout
Saving session...
...copying shared history...
...saving history...truncating history files...
...completed.

[Process completed]

And I could not type anymore.

So, I opened another terminal and tried basic commands such ls rm nano, now it keeps saying

-bash: ls: command not found

I am not sure what have I done. And I can't seem to find any solution to this. So if anyone has any clue about this. Please Please Please help!

One more important information cd command works however.

Giacomo1968
  • 53,069
  • 19
  • 162
  • 212
debchakra
  • 31
  • 1
  • 2

1 Answers1

0

You mixup exit of the shell and deactivate of virtualenv. If you activate a python virtualenv and you want to continue using the shell, then enter deactivate. If you are done for the day with your shell, then exit it.

bbaassssiiee
  • 1,393
  • 1
  • 11
  • 17
  • As of now I added `export PATH=/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/X11/bin` this line on top of my .bash_profile. Things are working again. But what is the better way to resolve this? – debchakra Sep 10 '19 at 04:57
  • You seem to have lost bash initialization files like .bash_profile and .bashrc – bbaassssiiee Sep 13 '19 at 06:28