Fix virtualenvwrapper mkvirtualenv Command Not Found Linux

Fix virtualenvwrapper mkvirtualenv Command Not Found, Maybe you got this error, So in this article, we want to teach you why this error happen and how to fix it. First, let’s discuss why you may be getting this error. To answer this question, we can say that this usually happens because your shell doesn’t recognize where to access the virtualenvwrapper. So the virtualenvwrapper may not be installed correctly or configured. Now you can follow the steps below to see how you can fix this error.

Steps To Fix virtualenvwrapper mkvirtualenv Command Not Found Linux

At this point, you can fix this issue by editing your shell’s startup file and adding the correct path of the packages to the file. To do this, follow the steps below.

Step 1 – Find Python Interpreter and virtualenvwrapper.sh Script Path

First, you must find your Python and virtualenvwrapper.sh Script path on your Linux server. To do this, run the commands below:

which python3
Output
/usr/bin/python3

To find your script path, run the command below:

find / -name virtualenvwrapper.sh 2>/dev/null
Output
/home/edxd/.local/bin/virtualenvwrapper.sh

Step 2 – Fix the mkvirtualenv command not found on Linux

At this point, you can edit the shell’s startup file with your favorite text editor. Here my shell is bash and I open the file with the vi editor:

vi ~/.bashrc

At the end of the file, add the following lines:

export WORKON_HOME=$HOME/.virtualenvs
export VIRTUALENVWRAPPER_PYTHON=your_python_interpreter_path
source your_virtualenvwrapper.sh_path

Remember to replace your_python_interpreter_path and your_virtualenvwrapper.sh_path with the ones you have found in the above step.

In my case it is as follows:

export WORKON_HOME=$HOME/.virtualenvs
export VIRTUALENVWRAPPER_PYTHON=/usr/bin/python3
source /home/edxd/.local/bin/virtualenvwrapper.sh

When you are done, save and close the file. with these easy steps, you can Fix virtualenvwrapper mkvirtualenv Command Not Found Linux, So to confirm and apply the changes, you need to enter the below command to reload bashrc file again. Also, you can reboot your Linux.

source ~/.bashrc

That’s it you are done. Now you can use both the work on, mkvirtualenv, and all other virtualenvwrapper commands in your command line in Linux.

Conclusion

As we described, this error happens because the shell doesn’t recognize the correct path of the virtualenvwrapper. So we show you how you can fix this error by editing the shell’s startup file and adding your virtualenvwrapper and Python to the file. This can help you to easily fix this error. Hope you enjoy it.

Also, you may be interested in these articles:

Fix APT Error Download is performed unsandboxed as root

Fix Unknown collation utf8mb4_0900_ai_ci in MySQL

Network ifup: failed to bring up eth0:0 Ubuntu

Newsletter Updates

Enter your email address below and subscribe to our newsletter

Leave a Reply

Stay informed and not overwhelmed, subscribe now!