I want to change the Python version to 3.7 in Google Collaboration.

Asked 1 years ago, Updated 1 years ago, 397 views

The library you want to install supports Python 3.7.However, it seems that the Python version of Google Collaboration is 3.8.5, so I am having trouble installing it.
I would appreciate it if you could teach me.Thank you for your cooperation.

python google-columnatory

2022-12-02 09:23

1 Answers

/usr/bin/ Since Python 3.7 was not included under /usr/bin/, install the python 3.7 package first and add it to the version switching candidates with the update-alternatives command.

! sudo apt install python 3.7
! sudo update-alternates -- install/usr/bin/python3 python3/usr/bin/python3.71

The following command will then bring you to the Python version selection screen.
3.8 with * is the current default, so enter 2 to select the 3.7 you just added.

!sudo update-alternates --config python3

There are 3 choices for the alternative python 3 (providing/usr/bin/python 3).

  Selection Path Priority Status
------------------------------------------------------------
* 0/usr/bin/python 3.8 2 auto mode
  1/usr/bin/python 3.6 1 manual mode
  2/usr/bin/python 3.7 1 manual mode
  3/usr/bin/python 3.8 2 manual mode

Press <enter> to keep the current choice [*], or type selection number:2

After configuring it, make sure that the Python version is switched.

!python --version
Python 3.7.15

reference:
How to Change Python Version in Google Colab:3 Steps Only


2022-12-02 09:40

If you have any answers or tips


© 2024 OneMinuteCode. All rights reserved.