python3-android | Python 3 cross-compilation tools for Android | Wrapper library
kandi X-RAY | python3-android Summary
kandi X-RAY | python3-android Summary
This is an experimental set of build scripts that will crosscompile Python 3 for an ARM Android device.
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of python3-android
python3-android Key Features
python3-android Examples and Code Snippets
Community Discussions
Trending Discussions on python3-android
QUESTION
NOTE: There have been several EDITs to the question, as per comments. They are indicated below, and separated by lines. As of now, the only remaining issue seems to be that numpy cannot load, possibly (but not certainly) due to two alternative python 3.8 systems present.
I have updated my msys2 system a couple of months ago.
That apparently included an update from python 3.7 to 3.8, but which left me with two broken pythons: I can start python
when it is 3.7, but there are no associated packages, and I cannot start python
when it is 3.8, which is the version holding packages.
I do not know what went wrong with that, or what did I do wrong.
I just noticed this now with the first time I mean to use python again after the upgrade.
I will describe here a sequence of steps I followed and what I found. I will post supporting code below for clarity.
I can start python, but
pandas
(e.g.) and many other packages are not found in python. Checking further,/mingw64/lib/python3.7/site-packages
is essentially empty (surely emptied when upgrading to 3.8).Looking for the
pandas
package, I found I have one version installed.The
pandas
version is for python 3.8, surely upgraded from 3.7.I redirected
PYTHONPATH
from 3.7 to 3.8Now I cannot even start python. EDIT Now I can start python, with some misconfiguration issues (i.e., partially fixed).
Now the question is
How can I fix python3.8, which gives the error below?
ImportError: cannot import name 'open_code' from 'io' (unknown location)
How can I fix python3.8, which gives the problems below?
New problems:
5.1. I should have python pointing to 3.8, and also fix packages.
5.2. Some modules are not found, some other are.
Note: I don't know if Msys2 upgrade breaks python2-pyqt5 has anything to do with this.
Related:
https://github.com/tox-dev/tox/issues/1334
https://github.com/yan12125/python3-android/issues/19
TL;DR: Supporting code
...pandas
not found
ANSWER
Answered 2020-Apr-24 at 10:40The ImportError: cannot import name 'open_code' from 'io' (unknown location)
comes from the fact that there are two different versions of Python conflicting with each other. python
still points to the old version 3.7 but PYTHONPATH
got updated to point to the new 3.8 version. As the documentation of PYTHONPATH
states, it becomes prepended to the module search path and hence shadows any builtin modules:
The default search path is installation dependent, but generally begins with
prefix/lib/pythonversion
(seePYTHONHOME
above). It is always appended toPYTHONPATH
.
You can reproduce that behavior by creating two different virtual environments and then start one while having PYTHONPATH
point to the other. In the following I used Miniconda to create two different environments, py37
and py38
, containing a 3.7 and 3.8 installation respectively.
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install python3-android
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page