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:
- Edited my PATH to include
D:\Program Files\Python3
andD:\Program Files\Python3\Scripts
- Opened Command Prompt (running it as administrator)
- Navigated to the directory I want to create my project in
- Typed
python -m venv flask
and a folder containing flask was created - Typed
pip 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:
PATH
issue, step 5 is unnecessary.venv
creates your virtual environment. You don't need to usevirtualenv
to do that. - dirn