Forums

ImportError: No module named 'gcm'

I have installed python-gcm with pip3.4, which is same version as my flask. In bash, when I try

from gcm import GCM

it is working.

wile when I use it in flask, it gives an error

ImportError: No module named 'gcm'

What could be the problem?

Thanks!

If you are using a virtualenv, make sure you have gcm installed in your virtualenv as well.

$ source /home/SrinivasK/.virtualenvs/my-virtualenv/

$ pip install library-name

this worked for me. Thanks!