0

I'm a beginner in django..

I am trying to build an application using django 1.11.2 and python 3.5.2, both are installed. I have python 2.7 installed too.

I have executed this command: django-admin startproject Application1 to create a new application.

The application runs, but the project is versioned Django 1.8, however when I run python -c "import django; print(django.get_version())" to find django version, it shows 1.11.2

The command django-admin --version shows me 1.8.7

What's wrong?

Do I have two django installed versions?

Should I upgrade django-admin? How?

Please, help me.. I'm stuck.

4

1 回答 1

0

据我了解,您的系统上安装了两个 django:在您的 python2 环境和 python3 环境中。因此,您要做的就是卸载其中一个,以免它们发生冲突。由于您想使用 python3 作为您的环境,您应该使用以下命令在您的 python2 环境中卸载 django:

pip uninstall django

如果卸载后显示“找不到命令”,请尝试使用以下命令重新安装 django

pip3 install django
于 2017-06-18T02:00:01.437 回答