wesupport

25% off on first invoice for all services*

SPRING SALE

Use coupon

*Offer valid for new customers only

25% off on first invoice for all services*

SPRING SALE

Use coupon

*Offer valid for new customers only

Need help?

Our experts have had an average response time of 11.43 minutes in March 2024 to fix urgent issues.

We will keep your servers stable, secure, and fast at all times for one fixed price.

mkvirtualenv: command not found – A quick fix

by | Oct 4, 2020

Trying to fix the error ‘mkvirtualenv: command not found’? We can help you fix it.

Here at Bobcares, we have seen several such Python-related errors as part of our Server Management Services for web hosts, Python users, and online service providers.

Today we’ll take a look at the cause for this error and see how to fix it.

 

Know more about mkvirtualenv

mkvirtualenv is a command that is a part of virtualenvwrapper. It is mainly used to create a new virtualenv (virtual environment). Also, it gets installed as part of virtualenvwrapper.

virtualenvwrapper a set of extension commands for Python virtual environment management.

Moreover, it works in several shell environments for Linux, OSX, and Windows. These include: bash, zsh, Powershell, and the windows command prompt.

 

Remedy for the error ‘mkvirtualenv: command not found’

Now let’s take a look at how our Support Engineers resolve this error.

One of our customers installed virtualenv and virtualenvwrapper, but still received the ‘mkvirtualenv: command not found’ error message. Here are the steps to properly install virtualenvwrapper.

1. Define the path virtualenvwrapper in the “.bashrc” so that the shell knows where the virtualenvwrapper.sh bash script resides. So locate where virtualenvwrapper.sh script is. By default, the virtualenvwrapper is installed in the path:

/usr/local/bin

2. After running the “pip install virtualenvwrapper” command, first create a directory where all the virtual environments will reside. Here, we are putting them in “~/.environments”.

mkdir ~/.environments

3. Now open the “~/.bashrc” or “~/.profile” file and add the following to the end of the file.

export WORKON_HOME=~/.environments
source /usr/local/bin/virtualenvwrapper.sh

4. Finally, we need to inform the bash about the changes we made. For that, run the following command to re-load the .bashrc configuration OR just simply close the shell and re-open it.

source ~/.bashrc

Now, you must be able to run the mkvirtualenv command without any error.

[Need any further assistance in fixing Python errors? – We are here to help you.]

 

Conclusion

In short, this error occurs while running mkvirtualenv command. Today, we saw how our Support Engineers resolve this error.

PREVENT YOUR SERVER FROM CRASHING!

Never again lose customers to poor server speed! Let us help you.

Our server experts will monitor & maintain your server 24/7 so that it remains lightning fast and secure.

GET STARTED

var google_conversion_label = "owonCMyG5nEQ0aD71QM";

2 Comments

  1. Peter Oluoch

    Hi, I have done all that but still get the error: mkvirtualenv: command not found

    Reply
    • Hiba Razak

      Hello Peter,
      Our experts can help you with the issue.we will be happy to talk to you through our live chat(click on the icon at right-bottom).

      Reply

Submit a Comment

Your email address will not be published. Required fields are marked *

Categories

Tags