Closed Sarumyan closed 9 months ago
decouple
and python-decouple
are 2 different libraries. I don't have much experience with pipenv, but python-decouple works well with pip and poetry. I am not sure how to workaround this without changing the package name, which does not seem a good option right now.
decouple
andpython-decouple
are 2 different libraries.
That is the problem: when python-decouple is installed with pipenv on a clean environment, decouple is installed automatically, not just python-decouple.
There is a problem with installing python-decouple using pipenv.
When I run
pipenv install python-decouple
and then tryfrom decouple import config
, I get an error:ImportError: cannot import name 'config' from 'decouple' (/home/dmor/.local/share/virtualenvs/decouple_tests-fWNCkI-j/lib/python3.10/site-packages/decouple/__init__.py)
Andpip freeze
shows me:And if I run instead
pip install python-decouple
everything works fine. Andpip freeze
shows:So basically pipenv also installs decouple itself which breaks the python-decouple. As pipenv is a quite popular tool, I think this is the issue worth addressing.