I am trying to run a python script, but I get this error:
from iso639 import languages
ImportError: cannot import name 'languages'
I have installed iso639, but I still get this error.
Any ideas how to fix this?
Was there something else I had to install?
There are 2 similarly named packages:
iso639(pip install from PyPi, source code at Github)iso-639(pip install from PyPi, source code at Github)You can check each package's PyPi and Github page to confirm which one you need.
But it seems what you are looking for is the
iso-639package (with the hyphen). Because its__init.py__file has an importablelanguagesmodule:So make sure to install
iso-639(Make sure to uninstall the other one, because both are imported as
from iso639).