O
O
onenomad2019-04-09 17:22:38
Django
onenomad, 2019-04-09 17:22:38

When you try to execute the command - django-admin.py startproject mysite, it swears. What am I doing wrong?

Hello. I am new to the world of Python and Django. Installed Django, then tried to execute the command - django-admin.py startproject mysite, swears.
Traceback (most recent call last):
File "/home/nomad/.local/bin/django-admin", line 11, in
sys.exit(execute_from_command_line())
File "/home/nomad/.local/lib/python2 .7/site-packages/django/core/management/__init__.py", line 364, in execute_from_command_line
utility.execute()
File "/home/nomad/.local/lib/python2.7/site-packages/django/ core/management/__init__.py", line 356, in execute
self.fetch_command(subcommand).run_from_argv(self.argv)
File "/home/nomad/.local/lib/python2.7/site-packages/django/core /management/base.py", line 292,
self.stderr.write('%s: %s' % (e.__class__.__name__, e))
UnicodeDecodeError: 'ascii' codec can't decode byte 0xd0 in position 13: ordinal not in range(128)
System - Ubuntu 18.04
Python - 2.7 and 3.6
My assumption is that it swears on Python 2.7, but I don't know how to fix it. Help solve the problem.

Answer the question

In order to leave comments, you need to log in

3 answer(s)
A
Alexander, 2019-04-09
@onenomad

Python - 2.7 and 3.6

1. Python 2.7 - didn't like UTF-8 very much
2. Cyrillic. Somewhere a Russian letter in the path or ....
3. Type python django-admin.py startproject mysite
PS
And what everyone writes in the comments)))

V
Vadim Shatalov, 2019-04-09
@netpastor

https://docs.djangoproject.com/en/2.2/releases/2.2/

Python compatibility¶
Django 2.2 supports Python 3.5, 3.6, and 3.7. We highly recommend and only officially support the latest release of each series.

D
Dmitry, 2019-04-18
@pyHammer

The bin folder already contains the django-admin executable file, so it's correct like this, without .py
django-admin startproject mysite

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question