G
G
gowa662015-09-07 15:58:12
Django
gowa66, 2015-09-07 15:58:12

How to open python3 console in django?

How to open python3 console in django?
When:
>>> python manage.py shell
opens:

Python 2.7.6 (default, Jun 22 2015, 17:58:13) 
[GCC 4.8.2] on linux2
Type "help", "copyright", "credits" or "license" for more information.
(InteractiveConsole)

And you need Python3

Answer the question

In order to leave comments, you need to log in

3 answer(s)
I
iegor, 2015-09-07
@iegor

python3 manage.py shell

D
Daniil Kolesnichenko, 2015-09-07
@KolesnichenkoDS

On top of everything above: add 3 to the first line in manage.py, rename it to manage and write:
instead of
python3 manage.py shell

G
gowa66, 2015-09-07
@gowa66

You can install a Python 3 version of pip and call it like so:
You can use the following to start your django project shell in Python 3:
python3 manage.py shell

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question