安装anaconda后django的问题

Problem with django after installing anaconda

我正在开发一个 Django 项目,这就是我尝试 运行 服务器时得到的结果。它曾经工作得很好,但我认为 virtualenv 缺少路径。我昨天安装了anaconda,在高级系统设置中更改了路径变量。我怎样才能将它们恢复到原始设置?这里共有 python 个新手。请帮忙。

C:\Users157\django_project>python manage.py runserver
Traceback (most recent call last):
  File "manage.py", line 9, in main
    from django.core.management import execute_from_command_line
ModuleNotFoundError: No module named 'django'

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "manage.py", line 20, in <module>
    main()
  File "manage.py", line 11, in main
    raise ImportError(
ImportError: Couldn't import Django. Are you sure it's installed and available on your PYTHONPATH environment variable? Did you forget to activate a virtual environment?

C:\Users157\django_project>

如果您已经创建了安装了 django 的虚拟环境,请执行:path_to_environment_folder\Scripts\activate

如果您没有现成的环境,请使用 python3 -m venv environment 创建一个,然后使用 environment\Scripts\activate 激活它。之后,使用 pip3 install django.

安装 django