close

[Solved] Error “virtualenv : command not found” but install location is in PYTHONPATH

Hello Guys, How are you all? Hope You all Are Fine. Today I get the following error Error “virtualenv : command not found” but install location is in PYTHONPATH in python. So Here I am Explain to you all the possible solutions here.

Without wasting your time, Let’s start This Article to Solve This Error.

How Error “virtualenv : command not found” but install location is in PYTHONPATH Error Occurs?

Today I get the following error Error “virtualenv : command not found” but install location is in PYTHONPATH in python.

How To Solve Error “virtualenv : command not found” but install location is in PYTHONPATH Error ?

  1. How To Solve Error “virtualenv : command not found” but install location is in PYTHONPATH Error ?

    To Solve Error “virtualenv : command not found” but install location is in PYTHONPATH Error The fact that virtualenv is not a recognized command is a result of the virtualenv.py not being in your system PATH and/or not being executable.

  2. Error “virtualenv : command not found” but install location is in PYTHONPATH

    To Solve Error “virtualenv : command not found” but install location is in PYTHONPATH Error The fact that virtualenv is not a recognized command is a result of the virtualenv.py not being in your system PATH and/or not being executable.

Solution 1

The only workable approach I could figure out (with help from @Gator_Python was to do python -m virtualenv venv. This creates the virtual environment and works as expected.

I have custom python installed and maybe that’s why the default approach doesn’t work for me.

Solution 2

As mentioned in the comments, you’ve got the virtualenv module installed properly in the expected environment since python -m venv allows you to create virtualenv’s.

The fact that virtualenv is not a recognized command is a result of the virtualenv.py not being in your system PATH and/or not being executable. The root cause could be outdated distutils or setuptools.

You should attempt to locate the virtualenv.py file, ensure it is executable (chmod +x) and that its location is in your system PATH. On my system, virtualenv.py is in the ../Pythonx.x/Scripts folder, but this may be different for you.

Summery

It’s all About this issue. Hope all solution helped you a lot. Comment below Your thoughts and your queries. Also, Comment below which solution worked for you? Thank You.

Also, Read