Home > Mobile >  pipenv modules not seen by Django manage.py
pipenv modules not seen by Django manage.py

Time:08-19

I just started working on a Django project. For virtual environment I am trying to use pipenv.

Inside my working directory;

First I created a virtualenv with

$ pipenv install django
$ pipenv install autoslug

then activated it with

$ pipenv shell

After that, I started a Django project with

$ django-admin startproject x

Then I started an app within the project with

$ django-admin startapp y

Inside app y, I imported module "autoslug".

I installed autoslug with

$pipenv install django-autoslug

When I try to make migrations with

$ python manage.py makemigrations

It gives an error

no module named autoslug

My virtualenv is activated and the module is installed inside it.

Any help would be appreciated. Thanks!

CodePudding user response:

You need to be running the python executable of your virtual environment.
Using pipenv, the command should be pipenv run python manage.py makemigrations

  • Related