How to solve SyntaxError on autogenerated manage.py?

前端 未结 30 2124
囚心锁ツ
囚心锁ツ 2020-11-28 08:24

I\'m following the Django tutorial https://docs.djangoproject.com/es/1.10/intro/tutorial01/

I\'ve created a \"mysite\" dummy project (my very first one) and try to

30条回答
  •  独厮守ぢ
    2020-11-28 09:09

    You should start your Virtual Environment,

    how to do it?

    first with terminal cd into the directory containing manage.py

    then type $source /bin/activate replace with you Virtual Environment name, without angular brackets.

    Another issue can that your root directory and venv mis-match. The structure should be something like this:

    |-website
         ..facebook
         ..manage.py
         ..myvenv
         ..some other files
    

    That is your virtual environment and manage.py should be in the same folder. Solution to that is to restart the project. If you are facing this error you must haven't coded anything yet, so restart.

提交回复
热议问题