1

I've read every piece of advice on how to install virtualenv. i successfully installed in on my computer with the command:

python -m pip install virtualenv' 

As a side note, can someone explain why only this command works, and the popular command in the forum:

pip install virtualenv 

returns a command not found error?

When I try to launch the virtualenv I get a command not found error. When I try to install again, I get a Requirement already satisfied proving the module is there. Furthermore, I can see the virtualenv in my python path.

Does anyone know what is happening here?? I can't work with Django until I complete this step.

Operating System: Windows 7

Belphegor
  • 4,456
  • 11
  • 34
  • 59
  • 1
    Python has been installed on your `$PATH`, which is what your shell uses to search for command executables. Unfortunately, the locations of `pip` and `virtualenv` have not made it onto `$PATH`. What operating system are you using? The solution to this is very different for Windows vs. Linux/OSX. In the meantime, `python -m virtualenv` may work. – Scott Colby Dec 13 '16 at 23:54
  • Hi @ScottColby! Thanks for the quick response. I'm using Windows 7. How do I go about changing the location of pip and virtualenv? – Robert Carroll Dec 13 '16 at 23:56
  • @RobertCarroll, you don't want to move `pip` or `virtualenv`, you want to add the directory they are in to your `PATH`. I'm no windows person, but see http://www.computerhope.com/issues/ch000549.htm maybe? – tobyodavies Dec 14 '16 at 00:01
  • You don't need to move pip and virtualenv. Instead, [add the proper location to your system path](http://stackoverflow.com/a/28545224/600882). Perhaps [this answer](http://stackoverflow.com/a/25331771/600882) can help? I don't actually know where installed command line scripts live on Windows, unfortunately. – Scott Colby Dec 14 '16 at 00:02
  • 2
    Possible duplicate of [Python and Virtualenv on Windows](http://stackoverflow.com/questions/17737203/python-and-virtualenv-on-windows) – Makoto Dec 14 '16 at 00:02
  • Is C:\Python\Scripts (or similar) on your path? – Peter Wood Dec 14 '16 at 00:20
  • @PeterWood I don't have a file path C:\Python\Scripts . Any suggestions as to what that means? Also, oconfused as to the difference between Path annd PYTHONPATH. – Robert Carroll Dec 14 '16 at 13:49

0 Answers0