I am working on the Django ninja rest framework. the project is working fine on my machine, but when I try to run it in a virtual environment (venv) and install all requirements.txt including django-ninja
it raise an error (ImportError: cannot import name 'NinjaAPI' from 'ninja').
The line that causes the error
from ninja import NinjaAPI
When I install the ninja, it gives me feedback the package is already installed
Requirement already satisfied: django-ninja
I use this command to create a virtual env.
python3 -m venv venv
These are my requirements.txt
asgiref==3.4.1
cffi==1.14.6
cryptography==3.4.7
dj-database-url==0.5.0
Django==3.2.6
django-heroku==0.3.1
django-ninja==0.13.2
gunicorn==20.1.0
jwt==1.2.0
ninja==1.10.2
psycopg2==2.9.1
psycopg2-binary==2.9.1
pycparser==2.20
pydantic==1.8.2
PyJWT==2.1.0
pytz==2021.1
sqlparse==0.4.1
typing-extensions==3.10.0.0
whitenoise==5.3.0
Python version
Python 3.9.0
pip version:
pip 21.2.3