ImportError: Не удалось импортировать Django. с "поэзией"

Я сконфигурировал проект django с помощью poetry. Я создал pyproject.toml и установил django.

[tool.poetry]
name = "graphene"
version = "0.1.0"
description = ""
authors = ["yilmaz <yilmaz@gmail.com>"]
license = "MIT"

[tool.poetry.dependencies]
python = "^3.9"
#Django installed
Django = "^4.0"
psycopg2-binary = "^2.9.2"

[tool.poetry.dev-dependencies]

[build-system]
requires = ["poetry-core>=1.0.0"]
build-backend = "poetry.core.masonry.api"

Если я попробую добавить django снова:

# venv is activated
(base) ┌──(venv)─(t㉿kali)-[~/Documents/projects/graphql/graphene]
└─$ poetry add django                                                                                                                                                                                                                  1 ⨯
The following packages are already present in the pyproject.toml and will be skipped:

  • django

If you want to update it to the latest compatible version, you can use `poetry update package`.
If you prefer to upgrade it to the latest available version, you can use `poetry add package@latest`.

Nothing to add.

Я создал папку apps и хочу добавить приложение

p manage.py startapp users apps/users

это дает мне эту ошибку:

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?
Вернуться на верх