0

I am trying to build a twitter client written in python using tweepy and make it run on sl4a (using py4a) on Android. But i seem to fail to import tweepy module in my main script. The script does not run. Please tell me the correct way to use tweepy in sl4a because copy-pasting the tweepy directory in sl4a's scripts directory does not work.

Dev Uberoi
  • 139
  • 1
  • 2
  • 10

2 Answers2

0

The Python for Android app allows you to import module zips, and there are instructions around the web and on the SL4A FAQ about where to copy modules to on the SD card to try and install them as well as installing Python Eggs [link]. You could also try running tweepy's setup.py (found in the download) on the phone.

However, it may also be possible that tweepy has other requirements not present on your phone, such as other modules that would normally be installed by easy_install or the like. While I don't think this is the case it would certainly make installing it very difficult.

At the end of the day, as per the FAQ, I think your best bet is to try copying the tweepy module directory into /sdcard/com.googlecode.pythonforandroid/extras/python.

Good luck!

Grace B
  • 1,386
  • 11
  • 30
0

Download the tweepy .egg for Python 2.6 here : https://pypi.python.org/pypi/tweepy/1.7.1 Make sure it is in the Downloads folder in your SD card. Launch the Python for Android app and select the "import module" option. Select the tweepy .egg file you just downloaded. It should work fine.

psryn
  • 16
  • 1