Forums

bash: mkvirtualenv: command not found

bloem@conrad-liveconsole2:~$ mkvirtualenv django2 --python=/usr/bin/python3.6 bash: mkvirtualenv: command not found

I have these files: .bashrc .gitconfig .profile .pythonstartup.py .vimrc README.txt and checked extra the .bashrc file. But installing virtualenv is not working. Hope you can help.

Should i first do : pip install virtualenv?

It's already installed. Did you remove the line at the end of .bashrc that says

source virtualenvwrapper.sh &> /dev/null

That's the line that enables mkvirtualenv

No, it is in there.

I see you contacted us earlier over email, mentioning that you'd accidentally deleted some files, and we advised you to create a new .bashrc with the appropriate contents. Is the console that you're working in one that you created after you'd added the new .bashrc? The changes to that file only take effect in new consoles.

Oke, that is the tric. It is working now. Thank you.

works also for me. Thank you

Even I'm having this problem now, in morning it was working fine but now suddenly it started this problem

Have you checked you .bashrc for the line that was mentioned in the third post of this thread?

I have the same problem now. Sure this appeared after upgrading the system image. No changes in .bachrc file. The line is there. However, even if I'm trying to run python it is not there. python3 is there. Even pip or pip3 is not there. Please help

Does it behave like this in newly created console as well?

Yes, I closed all consoles and opened a new one. Still have the same issue.

Thanks for your reply! I found the issue as .bashrc file seems to be corrupted. Reset it to the original file and it works well.

Glad to hear that!