close

[Solved] Django – cannot import name ‘config’ from ‘decouple’

Hello Guys, How are you all? Hope You all Are Fine. Today I get the following error Django – cannot import name ‘config’ from ‘decouple’ in Python. So Here I am Explain to you all the possible solutions here.

Without wasting your time, Let’s start This Article to Solve This Error.

How Django – cannot import name ‘config’ from ‘decouple’ Error Occurs?

Today I get the following error Django – cannot import name ‘config’ from ‘decouple’ in Python.

How To Solve Django – cannot import name ‘config’ from ‘decouple’ Error ?

  1. How To Solve Django – cannot import name 'config' from 'decouple' Error ?

    To Solve Django – cannot import name 'config' from 'decouple' Error I struggled with this for a good hour, the fix was to close the current bash/terminal window and opening a new one.

  2. Django – cannot import name 'config' from 'decouple'

    To Solve Django – cannot import name 'config' from 'decouple' Error I struggled with this for a good hour, the fix was to close the current bash/terminal window and opening a new one.

Solution 1

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

Solution 2

I struggled with this for a good hour, the fix was to close the current bash/terminal window and opening a new one.

Summery

It’s all About this issue. Hope all solution helped you a lot. Comment below Your thoughts and your queries. Also, Comment below which solution worked for you? Thank You.

Also Read

Leave a Comment