5
votes

I am using advanced Python as well as Pycharm (Up to date as of 2017) when I am using pip/virtual env install.

I got this error:

'virtualenv' is not recognized as an internal or external command, operable program or batch file.

Could advise a solution for this?

Thanks.

5
use python3.6 -mvenv my-virtual-env instead of virtualenv my-virtual-env. - Antti Haapala
Thanks for your response. Can u elaborate clearly because I am new to this - Vamsi Chowdary

5 Answers

4
votes

You need to install virtualenv using pip (pip installs packages)

Open command prompt and type:

pip install virtualenv. 

Good luck.

3
votes

This worked for me. I am also using Python 3.7.3 and used pip install virtualenv first. With this I did not have mkvirtualenv or workon in the Python Scripts folder. Once I ran the pip install virtualwrapper-win both bat files were added to my 3.7.3 scripts folder.

2
votes

I had a similar problem using Python 3.7.3 on Windows 10 - 64 Bit and in my case it turned out that I had installed the incorrect version of the virtualenvwrapper. I had used the command

pip install virtualenvwrapper

which installed successfully but If you're on Windows you need to make sure you run this command

pip install virtualenvwrapper-win

with the "-win" at the end.

I had to reinstall it and after that my command mkvirtualenv project_name worked fine.

Hope this is useful to someone else out there.

2
votes

Commands:-

md MLTestProject
cd MLTestProject
python -m pip install --upgrade pip
python -m pip install virtualenvwrapper-win
python -m virtualenv testenv
0
votes

The following worked well for me:

  1. pip install virtualenv
  2. pip install virtualwrapper-win
  3. mkvirtualenv project_name