0

Followed by tutorial: https://www.digitalocean.com/community/tutorials/how-to-serve-django-applications-with-apache-and-mod_wsgi-on-debian-8

I have installed Django on virtualenv and when i want to startapp i have following error:

(myprojectenv) pi@raspberrypi:~/myproject $ ls
db.sqlite3  manage.py  myproject  myprojectenv  static
(myprojectenv) pi@raspberrypi:~/myproject $ python manage.py startapp blog
CommandError: [Errno 13] Permission denied: '/home/pi/myproject/blog'

When trying type "sudo" before the command i got error like this:

(myprojectenv) pi@raspberrypi:~/myproject $ sudo python manage.py startapp blog
  File "manage.py", line 14
) from exc
     ^
SyntaxError: invalid syntax

How to solve this problem?

Ivvan
  • 1
  • 1
  • is this problem occurs if you run the command without sudo? – Adiyat Mubarak Apr 16 '18 at 09:05
  • 1
    Your virtualenv uses Python 2. Newer Django versions only support Python 3. – Selcuk Apr 16 '18 at 09:05
  • (myprojectenv) pi@raspberrypi:~ $ python -V Python 3.5.3 – Ivvan Apr 16 '18 at 09:27
  • Maybe is problem with permission to create a folder "blog" on my '/home/pi/myproject/blog' directory, so how to get permission to this folder to create other folders inside? i have set chmod 755 on '/home/pi/myproject" directory. – Ivvan Apr 16 '18 at 09:30

0 Answers0