Reputation: 593
I'm trying to learn Flask at the moment by following this tutorial , but I'm having trouble at the first part where I need to install virtualenv. Here are the steps that I have taken and the results:
D:\Program Files\Python3
and D:\Program Files\Python3\Scripts
python -m venv flask
and a folder containing flask was createdpip install virtualenv
and here's where the error arose:Traceback (most recent call last):
File "D:\Program Files\Python3\lib\runpy.py", line 170, in _run_module_as_main "__main__", mod_spec)
File "D:\Program Files\Python3\lib\runpy.py", line 85, in _run_code exec(code, run_globals)
File "D:\Program Files\Python3\Scripts\pip.exe__main__.py", line 5, in
ImportError: No module named 'pip'
That seems odd to me, as the path is accurate. I even confirmed this by typing echo %PATH%
and got these results:
C:\ProgramData\Oracle\Java\javapath;C:\Program Files (x86)\Intel\iCLS Client\;C: \Program Files\Intel\iCLS Client\;C:\Windows\system32;C:\Windows;C:\Windows\Syst em32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Program Files\Intel\Int el(R) Management Engine Components\DAL;C:\Program Files (x86)\Intel\Intel(R) Man agement Engine Components\DAL;C:\Program Files\Intel\Intel(R) Management Engine Components\IPT;C:\Program Files (x86)\Intel\Intel(R) Management Engine Component s\IPT;C:\Program Files (x86)\NVIDIA Corporation\PhysX\Common;C:\Program Files (x 86)\Skype\Phone\;D:\Program Files\Python3;D:\Program Files\Python3\Scripts
I'm running Python 3.4.3
As you can see by this screenshot, my PATH should be correct:
Upvotes: 0
Views: 291
Reputation: 593
Figured it out:
For some reason, pip install virtualenv
won't work if Python is installed on a drive that is not the C:/ drive. I reinstalled Python to c:/Python34 and tried pip install virtualenv
again (after changing the PATH) and it worked fine.
Upvotes: 0