Attempting to import and use pycountry in python 2.7.
import pycountry
len(pycountry.countries)
However, module is not recognised.
Traceback (most recent call last):
File "countries_list.py", line 1, in <module>
import pycountry
ImportError: No module named pycountry
You have to install it using pip.
pip install pycountry
And then you can use it :)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With