pythonpython-3.xdjangopython-decouple

Django - cannot import name 'config' from 'decouple'


I'm trying to run this project locally but when i try manage.py makemigrations i keep getting the following error:

ImportError: cannot import name 'config' from 'decouple'

Here are my steps:

  1. Clone the repository from github
  2. Create a virtual environment
  3. Install the dependencies

I made some research but i found nothing about what could be generating that error. Can anyone help me out on this? Thanks in advance!I'm running Django 3.


Solution

  • You might have decouple installed in additional to python-decouple (two different packages).

    If that is the case simply uninstall decouple

    pip uninstall decouple
    

    And ensure you have python-decouple installed

    pip install python-decouple