Python Forum
django manage.py startserver - not working - Printable Version

+- Python Forum (https://python-forum.io)
+-- Forum: Python Coding (https://python-forum.io/Forum-Python-Coding)
+--- Forum: Web Scraping & Web Development (https://python-forum.io/Forum-Web-Scraping-Web-Development)
+--- Thread: django manage.py startserver - not working (/Thread-django-manage-py-startserver-not-working)



django manage.py startserver - not working - lewashby - Nov-24-2016

Error:
$ ./manage.py startserver Traceback (most recent call last):   File "./manage.py", line 17, in <module>     "Couldn't import Django. Are you sure it's installed and " ImportError: Couldn't import Django. Are you sure it's installed and available on your PYTHONPATH environment variable? Did you forget to activate a virtual environment?
dev@debian-512mb-nyc3-01:/var/www/html/learningpy$ 
dev@debian-512mb-nyc3-01:/var/www/html/learningpy$ # now check this out
dev@debian-512mb-nyc3-01:/var/www/html/learningpy$ 
dev@debian-512mb-nyc3-01:/var/www/html/learningpy$ python3
Python 3.4.2 (default, Oct  8 2014, 10:45:20) 
[GCC 4.9.1] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import django
>>>
Why am I getting that error? As you can see django imports without complaint. Note that I installed django from pip3 so that I would be getting the python3 version.

I'm giving django + python one last shot for web development. I tried this about a year ago and I ran into more problems than I care to think about. And even if I had gotten everything working it was more trouble to setup a single django project an entire LAMP stack. If I can't get python + django going good for web development this time I think I'll drop it and return to php, but I'm hoping you all can help me to not have to do that. Thanks.


RE: django manage.py startserver - not working - lewashby - Nov-24-2016

SOLVED


RE: django manage.py startserver - not working - Yoriz - Nov-24-2016

How was it solved? in case others have a similar problem.


RE: django manage.py startserver - not working - lewashby - Nov-24-2016

I have had many problems with django. This particular problem was solved by walking away from my computer for a while. I came back and ran the same command and it worked, I didn't change a thing. I have no idea, go figure.