0

I have the following:

joesan@joesan-InfinityBook-S-14-v5:~/Projects/Private/ml-projects/ml-data-preparation-sandbox$ sudo update-alternatives --config python
update-alternatives: warning: alternative /usr/bin/python2.7 (part of link group python) doesn't exist; removing from list of alternatives
There are 3 choices for the alternative python (providing /usr/bin/python).

  Selection    Path                Priority   Status
------------------------------------------------------------
  0            /usr/bin/python3.7   4         auto mode
* 1            /usr/bin/python3.7   4         manual mode
  2            /usr/bin/python3.8   2         manual mode
  3            /usr/bin/python3.9   3         manual mode

Press <enter> to keep the current choice[*], or type selection number: 
update-alternatives: warning: forcing reinstallation of alternative /usr/bin/python3.7 because link group python is broken
joesan@joesan-InfinityBook-S-14-v5:~/Projects/Private/ml-projects/ml-data-preparation-sandbox$ python3 --version
Python 3.8.10

How can I set Python3.7 as the default? Should I change the priority? To use Zeppelin 0.10.0 I guess I need Python 3.7.

EDIT: I installed pyenv and I have the following now:

joesan@joesan-InfinityBook-S-14-v5:~$ which python
/home/joesan/.pyenv/shims/python
joesan@joesan-InfinityBook-S-14-v5:~$ python --version
Python 3.7.8
joesan@joesan-InfinityBook-S-14-v5:~$ pyenv versions
  system
* 3.7.8 (set by /home/joesan/.pyenv/version)
joesan@joesan-InfinityBook-S-14-v5:~$ 
11
  • 1
    The star says 3.7 already is the current one... Use python --version Commented Nov 4, 2021 at 19:00
  • Also, looking at your previous question, zeppelin.python is using a hard-coded /usr/bin/python, not the value python itself. Only in the later case, does the PATH actual matter Commented Nov 4, 2021 at 19:03
  • You can see that python3 --version gives Python 3.8.10 which is actually my problem! Commented Nov 4, 2021 at 19:03
  • 1
    That's not really a problem with Zeppelin, though, but you should be doing sudo update-alternatives --config python3 Commented Nov 4, 2021 at 19:05
  • 1
    Why not using an environment manager like conda or miniconda? Commented Nov 4, 2021 at 19:06

1 Answer 1

1

O, boy. Please consider using pyenv. You will be able to use as many python versions as you need.

Sign up to request clarification or add additional context in comments.

2 Comments

I played around with it, but did not solve my problem. Have a look at my original post above!
Finally I managed to get this solved. Thanks a ton for recommending pyenv!

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.