1

I am trying to install Django via pip installer under virtual environment.

I followed following steps:-

  1. Installing virtual environment
  2. Activating virtual environment
  3. Installing Django using pip, this is where I am facing problem.

The command I typed in command prompt is as follows:

C:\hello-world\venv\Scripts\pip install Django==1.7.1 

The error I am getting is:-

 c:\hello-world\venv\Scripts>pip install Django==1.7.1
ack (most recent call last):
 "c:\miniconda3\Lib\runpy.py", line 170, in _run_module_as_main
_main__", mod_spec)
 "c:\miniconda3\Lib\runpy.py", line 85, in _run_code
ec(code, run_globals)
 "c:\hello-world\venv\Scripts\pip.exe\__main__.py", line 5, in <module>
Error: cannot import name 'main'

Please let me know if more info is needed.

falsetru
  • 357,413
  • 63
  • 732
  • 636
  • I guess either your virtual environment is not properly activated or installed correctly. Try running python shell perform basic python operations, if they are working or not. – Jatin Bansal Nov 18 '15 at 04:46
  • Possible duplicate of [virtualenv: cannot import name 'main'](http://stackoverflow.com/questions/32853481/virtualenv-cannot-import-name-main) – Andrés Pérez-Albela H. Nov 18 '15 at 04:47
  • what happens if you use "conda" as per [the documentation](http://conda.pydata.org/docs/_downloads/conda-pip-virtualenv-translator.html) – John Mee Nov 18 '15 at 05:26
  • I removed miniconda and installed Python 2.7 , now it's working fine. – Abhishek Kulkarni Nov 20 '15 at 19:37

1 Answers1

0

I removed miniconda and installed Python 2.7 , now it's working fine