9

I am trying to install a specific version of python using termux (python 3.5) but it is downloading the latest version (Python 3.7.2-1) instead. Is there any way to specify what version to install?

The command I am using is very straightforward, but I haven't found any way to specify version anywhere

pkg install python
S.B
  • 13,077
  • 10
  • 22
  • 49
SaltyHelpVampire
  • 305
  • 2
  • 4
  • 15

2 Answers2

7

To do what you intend...you can use the following command..

  1. First Make Sure that the package version you need to install exists... Use:
apt-cache madison [packagename]
  1. If the package version you're trying to install exists, simply run:
apt-get install [packagename]=[DesiredVersion]
S.B
  • 13,077
  • 10
  • 22
  • 49
Jaynam Modi
  • 556
  • 3
  • 14
  • The python version I am looking for sadly doesn't exist, but since this method confirms it doesn't exist (for Termux at least) and it is also useful for the future I'll mark it as accepted – SaltyHelpVampire Feb 28 '19 at 10:22
1

Not an easy way, but you can download source of the specific version and build it yourself. This works for me.

Krutyi 4el
  • 98
  • 6
  • This does not provide an answer to the question. Once you have sufficient [reputation](https://stackoverflow.com/help/whats-reputation) you will be able to [comment on any post](https://stackoverflow.com/help/privileges/comment); instead, [provide answers that don't require clarification from the asker](https://meta.stackexchange.com/questions/214173/why-do-i-need-50-reputation-to-comment-what-can-i-do-instead). - [From Review](/review/late-answers/30937467) – tomerpacific Feb 05 '22 at 07:40
  • @tomerpacific wdym "this does not provide an answer"? – Krutyi 4el Feb 07 '22 at 11:30