Reputation: 91
I have just installed the latest Termux on my Android device and Python 3.9 is the default Python installation. I need to run Python 3.8.x due to some package incompatibilities.
My searching tells me there is no way to downgrade Python within Termux - is this correct?
If I install a previous version of Termux, will this in turn install an earlier version of Python or will it just collect the same default version?
Is there another way for me to make this change?
Upvotes: 4
Views: 26235
Reputation: 77
install pypy3 using apt
# apt search python
.
.
.
pypy/stable 7.3.9-1 aarch64
A fast, compliant alternative implementation of Python
.
.
.
# pypy3 --version
Python 3.8.13 (4b1398fe9d76ad762155d03684c2a153d230b2ef, Apr 25 2022, 09:26:53)
[PyPy 7.3.9 with GCC Clang 14.0.1]
Upvotes: 0
Reputation: 391
git clone the termux-packages repo
then cd to the packages/python folder git log build.sh to find the commit with the version you want checkout that commit (for the entire repo, to be sure)
then follow the standard instructions at https://wiki.termux.com/wiki/Building_packages
Otherwise you don't know what kind of binary you are installing. Build it yourself to be sure. I'd wanna be sure.
Upvotes: 3
Reputation: 189
I've encountered something similar over the past few days!
Here is a summary of the solution given by @kcubeterm on Reddit, who has very kindly provided a way to install python 3.8X on Termux.
pkg uninstall python
uname -m
Go to https://github.com/Termux-pod/termux-pod and find the file corresponding to your device's CPU. According to @kcubeterm, you should try python_3.8.6_.deb first and then the static
version if there is any error.
Download the raw .deb file in termux using web-get.
make sure you add ?raw=true
to the end of the url, or else you'll end up downloading the html file!
wget https://github.com/Termux-pod/termux-pod/blob/main/arm/python/python_3.8.6_<CPU_ARCH.>.deb?raw=true
dpkg -i ./python_3.8.6_<CPU_ARCH.>.deb
Once again, replacing <CPU_ARCH.> with your cpu's architecture (for me it was arm).
Hope this answer helped you to install Python 3.8! I love termux but find it frustrating that they provide no way to install non-bleeding edge versions of packages!
Thanks again to @kcubeterm who provided this solution.
Upvotes: 11
Reputation: 40
It doesn't depends upon the Version of termux. It depends upon the repository. And it always update it's packages . So i think there is no way
Upvotes: 2