I have been working through the initial tutorial and ran into a load of issues with my anaconda install using python 2.7. In the end it wouldn't launch the server.
-- Anyway, I decided to change up on my machine to python3. That said, I am now getting strange results which are:
If I use the terminal command $python -m django --version I get the following:
"../Contents/MacOS/Python: No module named django"
If I change to "$python3 -m django --version" terminal gives me back: "1.11.4"
Now, when I am in the tutorial and starting again from the beginning I do the following: "$django-admin startproject mysite"
This seemed to work.
However, when I tried: "$python manage.py runserver" I get the following:
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?
If I change to include 3, so "$python3 manage.py runserver" all is well.
My question is do I need to always use python3 in every command now? I does not say that in the tutorial.
My Mac OSx has a native install of 2.7 which I believe is required by my machine for other apps dependency.
Any help would be really appreciated!
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscribe@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/00c61c2d-95ed-4022-840a-b997318e12ca%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
No comments:
Post a Comment