0

I have a project I worked on with another machine, which had python 3.5 up to python 3.8.

I got a new computer so when I installed python it was to version 3.8

my project is running python 3.6.

my question is, how can update the project interpreter to support python 3.8 or how can change my python version to 3.6

When trying to install python 3.6:

$ sudo apt install python3.6
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Note, selecting 'python3.6-2to3' for regex 'python3.6'
Note, selecting 'libpython3.6-stdlib' for regex 'python3.6'
0 upgraded, 0 newly installed, 0 to remove and 207 not upgraded.
$ python3.6

Command 'python3.6' not found, did you mean:
....
  • You can try python36 – rolf82 Mar 12 '20 at 16:29
  • Your not trying to update your project, your trying to update your python version on your OS. What OS? – jordanm Mar 12 '20 at 16:29
  • You asked for one of two solutions: 1) Update project interpreter to support 3.8 or 2) Change to Python 3.6. Option #1 is clearly superior (newer Python with more features, better performance, longer support window), but you haven't given us enough information to answer that part of the question. Why does the project not work with 3.8? What do you mean by "the project interpreter"? A [MCVE] of "the project" (the broken on 3.8 parts at least) would help. If it's just "I named some variables `async`" the solution is to change them all to `async_`, but you haven't said how 3.8 is broken. – ShadowRanger Mar 12 '20 at 16:42
  • Does this answer your question? [Use different Python version with virtualenv](https://stackoverflow.com/questions/1534210/use-different-python-version-with-virtualenv) – Kapil Jul 14 '20 at 14:27

2 Answers2

0

It maybe the case that python 3.6 is not available for your distribution. If you have installed aptitude, run

aptitude search python3

Also update your apt by doing the following:

sudo apt-get update
sudo apt-get install python3.6 # If it doesn't work, try sudo apt-get install python36
AzyCrw4282
  • 7,222
  • 5
  • 19
  • 35
0

Please use virtualenv package.


It can be used to create virtual environment, which therefore can be used to install respective python versions and libraries.

For more details you can see this.

For better understanding of virtualenv and its uses, mozilla docs can be referred.

Kapil
  • 362
  • 6
  • 7