Support Questions
Find answers, ask questions, and share your expertise

deploy a pycharm python project with tweepy

Explorer

Hello i am new to sandbox and just started using it, i have to develop a streaming application that is taking streaming data from twitter so in my python application i wrote

from tweepy import Stream

i installed the tweepy in sandbox with this link

https://community.hortonworks.com/questions/176867/installing-tweepy-in-hortonworks-sandbox-hdp-263....

now i need to deploy the application on the sandbox i followed the tutorial and use the instruction

/usr/hdp/current/spark2-client/bin/spark-submit ~/TwitterTest.py

but it giving me error that No module named tweepy

how to resolve this issue, any help is highly appreciated, TIA

1 REPLY 1

@Sana Faraz If i understand it correctly you have installed tweepy in sandbox and running the spark submit command in the sandbox? if yes, the problem could be with the wrong python version. Check if you have multiple versions of python and use the correct version where tweepy is installed.

[root@1 ~]# ll /usr/bin/pyt*
-rwxr-xr-x. 2 root root 4864 Jan 22  2014 /usr/bin/python
lrwxrwxrwx. 1 root root    6 Dec  1  2014 /usr/bin/python2 -> python
-rwxr-xr-x. 2 root root 4864 Jan 22  2014 /usr/bin/python2.6

python2.6
>> import tweepy
; ;