Hi All,
I need to execute a Python app in Android 5.1.1 with a GUI interface via kivy.
In my app I need to include the "watson_developer_cloud" module but I have some problem.
Inserisci qui il codice...
In my source code (file main.py) I have included:
from kivy.app import App
from kivy.uix.label import Label
from kivy.uix.gridlayout import GridLayout
from kivy.uix.textinput import TextInput
from kivy.uix.button import Button
1) First scenario
I have installe QPython and QPyton3 and I can run my app with kivy but without the watson module.
In QPython I have printed the local execution directory and the Python version and I have this information:
- path: /storage/emulated/0/qpython/projects3/kivy_prj
- version: 2.7.12
If I add
import watson_developer_cloud
I receive this error message in the log "last.log"
import watson_developer_cloud
ImportError: No module named watson_developer_cloud
I have tried to install this module in QPython to complete the develop of the app but without success.
2) Second scenario
In Android 5.1.1 with Termux I have istalled Python v.2 and 3 and also the watson module for both Python versions.
When I open the Termux, the local path is /data/data/com.termux/files/home
under the path /data/data/com.termux/files/usr I see:
./usr/lib/python3.6/site-packages/watson_developer_cloud
./usr/lib/python3.6/site-packages/watson_developer_cloud/watson_service.py
./usr/lib/python3.6/site-packages/watson_developer_cloud/__pycache__/watson_service.cpython-36.pyc
./usr/lib/python3.6/site-packages/watson_developer_cloud/watson_developer_cloud-1.2.0-py3.6.egg-info
When I execute the command
$ python2 main.py
I receive this error message
File "main.py", line 5, in <module>
or
$ python3 main.py
I receive this error message
File "main.py", line 5, in <module>
ModuleNoFoundError: No module named 'kivy'
I have tried to install viky module in Termux but without success. At the end, my idea is to launch a shell with the Python command python <app_name>.py by pressing an incon on the homescreen of Android, if this is possible and if this is the best way to execute an app.
3) Third scenario
In Ubuntu 17.10 I have installed Python v.3.6.3, kivy and the watson module. The app work correcly by executing this command
$ python3 main.py
At this point to have the possibility to execute my app in Android environment I have found the use of buildozer that I suppose should resolve my problem including the watson module.
At this link the command to install buildozer doesn't include the Ubuntu version 17.10.
Any suggestion will be greatly appreciated. Thanks in advance for your kind support.
Regards,
Giovanni