i work on pc's started work on projects on mac. run python 3 , when started new project did following:
1) in main project folder, installed virtualenv , activated it.
2) install django , gunicorn
3) did startproject
when try python3 manage.py startapp www error django not imported. below in terminal:
(venv) ab:directory ab$ pip freeze django==1.10 gunicorn==19.6.0 (venv) ab:directory ab$ ls directory manage.py (venv) ab:directory ab$ python3 manage.py startpap www traceback (most recent call last): file "manage.py", line 8, in <module> django.core.management import execute_from_command_line importerror: no module named 'django' during handling of above exception, exception occurred: traceback (most recent call last): file "manage.py", line 14, in <module> import django importerror: no module named 'django' during handling of above exception, exception occurred: traceback (most recent call last): file "manage.py", line 17, in <module> "couldn't import django. sure it's installed , " importerror: couldn't import django. sure it's installed , available on pythonpath environment variable? did forget activate virtual environment?
try using
python -m pip install django
this safest way far know
Comments
Post a Comment