M4rtinK / modrana-android-project

A pydroid project used for building modRana packages for Android. (2014: Deprecated in favor of the Qt5+Python 3+PyOtherSide based modrana-android project repository)
0 stars 1 forks source link

How can we install pydroid library from pip? #1

Closed edips closed 10 years ago

edips commented 10 years ago

I tryed "pydroid pip install numpy" on Lubuntu 13.10, output was "successfully installed" without downloading library. It doesnt for me now. How can i install libraries to PyDroid? If I copy-paste libraries to site-packages side of PySide, libraries can work? Thanks

M4rtinK commented 10 years ago

I'll have to check out how/if it still works, but there is one thing to note that is probably not sufficiently documented - pydroid pip install does not really work on Python modules that depend on C extensions.

Pydroid basically just copies the content of the module to the project and includes it in the Android package once the project is deployed. It does not do any cross-/compilation for the Android target. So if the module depends on the C code being compiled, the module won't work on Android.

edips commented 10 years ago

I installed your ModRana app on android, it looks very good, and it worked fast :) I realized it includes Mapnik renderer in map viewing options. Then I though you may import Mapnik 2 to your project. I tryed to import GDAL, Mapnik in my project with "pydroid pip install" but I couldnt do it. So I lost hope to import GIS libraries in my project using PySide-Pydroid. Now It seems better to focus on PyQT5 - QtQuick 2.0 - Python 3.3 integration.

edips commented 10 years ago

Hi, Is it possible to run PySide-QML apps with QML MeeGo libraries on Ubuntu like android? I installed QtMobility but I couldnt import com.nokia.meego. Thanks

M4rtinK commented 10 years ago

Mapnik - yeah, it has some crazy dependencies, would probably not be easy to port to Android unfortunately

focus on PyQT5 - QtQuick 2.0 - Python 3.3 - yeah, I have been also thinking about this While the current solution (example project, example packages, pydroid) do work and are in a usable state, they are based on Qt4 and therefore unfortunately already outdated as Android support for Qt4 is no longer being developed.

Qt5 officially supports Android and fixes many issues of the current Qt4 based combination, so rebasing against Qt5 should be a priority. PySide does not support Qt5, so as you mention PyQt5 would have to be used - or the PyOtherSide project from Thomas Perl. I've been lately using PyOtherSide with Python 3 for a Qt5 modRana GUI for Sailfish OS and it works very well. I've already tried to make PyOtherSide work on Android back in October after getting back from PyConPL, and while I did not succeed back then I think it was very close. PyOtherSide is much simpler than PySide/PyQt so it should be easier to get working than full bindings.

So yep, Qt5 & Python 3 is definitely the future of Python application programming on Android. On the other hand, I'm kinda overcommitted at the moment so I have no idea when I might get back to substantially work on it. So maybe try to give it a go yourself ? I might be able to at least provide some pointers. :)

com.nokia.meego @ Ubuntu Do you mean "normal" desktop Ubuntu or the mobile Ubuntu-Touch ?

edips commented 10 years ago

I checked PyOtherSide project, This looks fine. I could not find any documentation of PyOtherSide on Android . It seems hard to adapt on Android. I would like to try to give it go. As I see it requires deep c++ experience. However I am not enough for that at the moment. I study on Python for 1 year, and dont know anythink about c/c++. But I learnt to run PySide on Android from great documentations and conference videos by you and Thomas Perl. :) I am thankful to you for your answers, documentations and opensource applications. I offered BogDan to create a Ministro version for PySide librarieswhich is including Python 2.7. He said that no need to creat a new version of Ministro. There is no easy way to do it, but he would try to create some easy to use tools for that.

Also I believe that PyInstaller and Qt Project will develop to distribute Python applications using installed Python and its modules for Android in the future. I mean normal Ubuntu desktop. I asked the question because it will be easy to test QML UI+ PySide using Meego components on desktop. Meego components are useful like QML 2.0 components. Also I can edit your PySide example project's main.qml and python file in android, there is no need to build app from Qt creator. So example app is kind of QML creator with android :)

edips commented 10 years ago

I installed QT 4.7 for Harmattan by Nokia. Now I can run meego components on QtSimulator :)