no module named pycountry

Viewed 10636

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
2 Answers

I had the same problem and looked thru several articles and youtube videos but none got my pycharm fixed to recognize the pycountry module until I tried executing the program in the pycharm IDE terminal and then the pycharm EDE started to recognize it.

Related