ImportError: No module named twitter on shell file

So i installed twitter with
easy_install twitter

my_file.py

import twitter
......
......

When I run my python file directly on the terminal it works fine

>python my_file.py

However, when I put the above into a shell file

run_script.sh

python my_file.py

I run this file using

>sh run_script.sh

I get an error

ImportError: No module named 'twitter'

Why does it not recognise the imported module post installation when I try it through the shell script?


Source: shell

Leave a Reply