-4

I attemped many times after decided to install python3.10. Asus ZOG GA401I. It first started with break down Keyboard and Mouse, then I use sudo ln -sf /usr/bin/python3.8 /usr/bin/python3, purpose to use python3.8 priority. Now I cannot run pip3.... enter image description here

I want to fix that be able to run pip3 command.

  • Thank you for answering, that is the same detial of my accident, terminal did not run also. But they did not write the solution about pip issue, did they? I have not found the solution about pip3 cannot run, – user1653545 Jan 27 '23 at 14:33
  • 1
    You need to restore default python to get all working. – Pilot6 Jan 27 '23 at 14:34
  • I run this command :: sudo update-alternatives --set python /usr/bin/python3.8 result: update-alternatives: warning: forcing reinstallation of alternative /usr/bin/python3.8 because link group python is broken – user1653545 Jan 27 '23 at 14:41
  • You need to re-install python3, I guess. – Pilot6 Jan 27 '23 at 14:45
  • So, this one works! https://askubuntu.com/a/1289765/1653545 – user1653545 Jan 27 '23 at 14:56

2 Answers2

0

I'm afraid that you messed up your system. Python 3.8 is the default Python Ubuntu and some system components rely on a specific version, respectively may not work with other / higher Python version correctly. The priority should be to undo all steps you made, ensure that Python 3.8 is the default and is started when running python3 in the terminal.

It is no problem to install manually multiple versions of Python parallel on the system. A step-by-step guide can be found e.g. at the Real Python website. Import: always use sudo make altinstall as the final step, to ensure your default system Python is not replaced! pip is typically included in the manual installation of Python.

In case you don't need another Python version installed system-wide, but a per-project installation is sufficient, you can also have a look at pyenv.

noisefloor
  • 1,086
0

with regard to pip / pip3:

$ python -m pip freeze

Will show a list of currently installed packages. Use:

$ python -m pip help

for more...

Hannu
  • 5,374
  • 1
  • 23
  • 40