Python Forum
pip doesn't work after Python upgrade
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
pip doesn't work after Python upgrade
#11
(May-30-2022, 07:40 AM)Pavel_47 Wrote:
Quote:Never change the system python.
What do you mean by "system python" ?

Whatever /usr/bin/python or /usr/bin/python3 points to. It's likely that system components refer to that path and may not be able to cope with changes.

You should be able to add a new python without modifying /usr/bin/python*.

Quote:It's installed alongside: I can point python3 either to 3.6.9 either to 3.10.
When python3 points to 3.10, I can't use gnome-terminal which I got used to.

Okay. Don't point /usr/bin/python to a different version.

Quote:
Quote:... put it first in your PATH
Can you elaborate, please.

Either create a venv that points at the new python and activate it, or modify your login script (sometimes .bashrc, sometimes .profile or .bash_login) and modify the PATH so that the new python bin is in it. Maybe something like PATH=/usr/local/python-3.10/bin:${PATH} (but with whatever path is appropriate to the install.)

That lets the system components use /usr/bin/python3 to hit the original version, but you can just do python or /usr/local/python-3.10/bin/python3 (again, with the correct path) to get to the new version.
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Why doesn't calling a parent constructor work with arbitrary keyword arguments? PurposefulCoder 4 912 Jun-24-2023, 02:14 PM
Last Post: deanhystad
  Python Version upgrade nitinkukreja 1 892 Feb-04-2023, 10:27 PM
Last Post: Larz60+
  Why doesn't this code work? What is wrong with path? Melcu54 7 1,767 Jan-29-2023, 06:24 PM
Last Post: Melcu54
  color code doesn't work harryvl 1 880 Dec-29-2022, 08:59 PM
Last Post: deanhystad
  Upgrade makes Code Error kucingkembar 6 3,079 Jul-28-2022, 06:44 PM
Last Post: kucingkembar
  client.get_all_tickers() Doesn't work gerald 2 1,703 Jun-16-2022, 07:59 AM
Last Post: gerald
  For Loop Works Fine But Append For Pandas Doesn't Work knight2000 2 1,996 Dec-18-2021, 02:38 AM
Last Post: knight2000
  Class Method to Calculate Age Doesn't Work gdbengo 1 1,694 Oct-30-2021, 11:20 PM
Last Post: Yoriz
  Process doesn't work but Thread work ! mr_byte31 4 2,602 Oct-18-2021, 06:29 PM
Last Post: mr_byte31
  Upgrade from 3.7.9 to 3.7.11 quazirfan 4 5,445 Sep-08-2021, 01:02 AM
Last Post: quazirfan

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020