Forums

Skip to content

Advanced search
  • Quick links
    • Unanswered topics
    • Active topics
    • Search
  • FAQ
  • Login
  • Register
  • Board index Assistance Portage & Programming
  • Search

I'm stucked on python3.7. How to upgrade?

Problems with emerge or ebuilds? Have a basic programming question about C, PHP, Perl, BASH or something else?
Post Reply
Advanced search
10 posts • Page 1 of 1
Author
Message
cyberbat
n00b
n00b
Posts: 13
Joined: Mon Jan 31, 2011 10:23 am

I'm stucked on python3.7. How to upgrade?

  • Quote

Post by cyberbat » Tue Jun 22, 2021 2:24 pm

Now I have several systems with
PYTHON_SINGLE_TARGET="python3_7"
PYTHON_TARGETS="python3_7"

What it the safest way to upgrade them to python3.9? portage-3.0.18 is currently installed.
Top
cyberbat
n00b
n00b
Posts: 13
Joined: Mon Jan 31, 2011 10:23 am

  • Quote

Post by cyberbat » Tue Jun 22, 2021 2:29 pm

My first idea is to set
PYTHON_SINGLE_TARGET="python3_9"
PYTHON_TARGETS="python3_7 python3_9"

and run emerge -va1 portage
but I'm getting a lot of errors like this:

Code: Select all

Calculating dependencies  . ..... done!
[ebuild  NS    ] dev-lang/python-3.9.5_p2:3.9::gentoo [3.7.10_p1:3.7/3.7m::gentoo] USE="hardened ipv6 ncurses readline sqlite ssl xml -bluetooth -
build -examples -gdbm -test -tk -verify-sig -wininst (-libressl%)" 0 KiB
[ebuild   R    ] dev-python/certifi-10001-r1::gentoo  USE="-test" PYTHON_TARGETS="python3_9* (-pypy3) (-python3_10) -python3_8 (-python3_7%*)" 0 K
iB
[ebuild     U  ] dev-python/setuptools-56.0.0::gentoo [54.1.1::gentoo] USE="-test" PYTHON_TARGETS="python3_9* (-pypy3) -python3_8 (-python3_7%*)" 
0 KiB
[ebuild  N     ] dev-python/toml-0.10.2::gentoo  USE="-test" PYTHON_TARGETS="python3_9 (-pypy3) (-python3_10) -python3_8" 0 KiB
[ebuild     U  ] dev-python/setuptools_scm-6.0.1-r1::gentoo [6.0.1::gentoo] USE="-test" PYTHON_TARGETS="python3_9* (-pypy3) (-python3_10) -python3
_8 (-python3_7%*)" 0 KiB
[ebuild   R    ] dev-python/PySocks-1.7.1-r1::gentoo  PYTHON_TARGETS="python3_9* (-pypy3) (-python3_10) -python3_8 (-python3_7%*)" 0 KiB
[ebuild   R    ] dev-python/chardet-4.0.0::gentoo  USE="-test" PYTHON_TARGETS="python3_9* (-pypy3) (-python3_10) -python3_8 (-python3_7%*)" 0 KiB
[ebuild     U  ] dev-python/idna-3.1::gentoo [2.10-r1::gentoo] PYTHON_TARGETS="python3_9* (-pypy3) (-python3_10) -python3_8 (-python3_7%*)" 0 KiB
[ebuild   R    ] dev-python/urllib3-1.26.4::gentoo  USE="-brotli -test" PYTHON_TARGETS="python3_9* (-pypy3) (-python3_10) -python3_8 (-python3_7%*)" 0 KiB
[ebuild     U  ] dev-python/requests-2.25.1-r2::gentoo [2.25.1-r1::gentoo] USE="-socks5 -test" PYTHON_TARGETS="python3_9* (-pypy3) (-python3_10) -python3_8 (-python3_7%*)" 0 KiB
[ebuild   R    ] app-portage/gemato-16.2::gentoo  USE="gpg -test -tools" PYTHON_TARGETS="python3_9* (-pypy3) (-python3_10) -python3_8 (-python3_7%*)" 0 KiB
[ebuild     U  ] sys-apps/portage-3.0.20-r6::gentoo [3.0.18::gentoo] USE="(ipc) native-extensions rsync-verify (xattr) -apidoc -build -doc -gentoo-dev (-selinux) -test" PYTHON_TARGETS="python3_9* (-pypy3) (-python3_10) -python3_8 (-python3_7%*)" 0 KiB

Total: 12 packages (5 upgrades, 1 new, 1 in new slot, 5 reinstalls), Size of downloads: 0 KiB

!!! Multiple package instances within a single package slot have been pulled
!!! into the dependency graph, resulting in a slot conflict:

dev-python/setuptools:0

  (dev-python/setuptools-56.0.0:0/0::gentoo, ebuild scheduled for merge) USE="-test" PYTHON_TARGETS="python3_9 (-pypy3) -python3_8" pulled in by
    >=dev-python/setuptools-42.0.2[python_targets_pypy3(-)?,python_targets_python3_8(-)?,python_targets_python3_9(-)?,python_targets_python3_10(-)?,-python_single_target_pypy3(-),-python_single_target_python3_8(-),-python_single_target_python3_9(-),-python_single_target_python3_10(-)] required by (dev-python/toml-0.10.2:0/0::gentoo, ebuild scheduled for merge) USE="-test" PYTHON_TARGETS="python3_9 (-pypy3) (-python3_10) -python3_8"
                                                                                                                                                                                                                                                                                                                                                                                                                                                    
    >=dev-python/setuptools-42.0.2[python_targets_pypy3(-)?,python_targets_python3_8(-)?,python_targets_python3_9(-)?,python_targets_python3_10(-)?,-python_single_target_pypy3(-),-python_single_target_python3_8(-),-python_single_target_python3_9(-),-python_single_target_python3_10(-)] required by (dev-python/PySocks-1.7.1-r1:0/0::gentoo, ebuild scheduled for merge) USE="" PYTHON_TARGETS="python3_9 (-pypy3) (-python3_10) -python3_8"
                                                                                                                                                                                                                                                                  
Top
fedeliallalinea
Administrator
Administrator
User avatar
Posts: 31985
Joined: Sat Mar 08, 2003 11:15 pm
Location: here
Contact:
Contact fedeliallalinea
Website

  • Quote

Post by fedeliallalinea » Tue Jun 22, 2021 2:31 pm

Usually for have less conflicts as possible you should use this schema (from news 2021-05-05-python3-9)

Code: Select all

Safer upgrade procedure
=======================
A safer approach is to add Python 3.9 support to your system first,
and only then remove Python 3.8.  However, note that involves two
rebuilds of all the affected packages, so it will take noticeably
longer.

First, enable both Python 3.8 and Python 3.9, and then run the upgrade
commands:

    */* PYTHON_TARGETS: -* python3_8 python3_9
    */* PYTHON_SINGLE_TARGET: -* python3_8

Then switch PYTHON_SINGLE_TARGET and run a second batch of upgrades:

    */* PYTHON_TARGETS: -* python3_8 python3_9
    */* PYTHON_SINGLE_TARGET: -* python3_9

Finally, switch to the final version and upgrade:

    */* PYTHON_TARGETS: -* python3_9
    */* PYTHON_SINGLE_TARGET: -* python3_9
Your problem is that python3_7 target is removed from almost all python packages.
So the only way is force target to python3_9 and try to resolve conflicts.
Questions are guaranteed in life; Answers aren't.

"Those who would give up essential liberty to purchase a little temporary safety,
deserve neither liberty nor safety."
- Ben Franklin
https://www.news.admin.ch/it/nsb?id=103968
Top
cyberbat
n00b
n00b
Posts: 13
Joined: Mon Jan 31, 2011 10:23 am

  • Quote

Post by cyberbat » Tue Jun 22, 2021 2:52 pm

Am I right that I can't reemerge only portage to make it support python 3.9? Do I have only to run emerge -1vUDa @world after switching to python 3.9?
Top
fedeliallalinea
Administrator
Administrator
User avatar
Posts: 31985
Joined: Sat Mar 08, 2003 11:15 pm
Location: here
Contact:
Contact fedeliallalinea
Website

  • Quote

Post by fedeliallalinea » Tue Jun 22, 2021 3:37 pm

cyberbat wrote:Am I right that I can't reemerge only portage to make it support python 3.9? Do I have only to run emerge -1vUDa @world after switching to python 3.9?
Yes you right, maybe you can also add -u (--update) depending on the situation.
Questions are guaranteed in life; Answers aren't.

"Those who would give up essential liberty to purchase a little temporary safety,
deserve neither liberty nor safety."
- Ben Franklin
https://www.news.admin.ch/it/nsb?id=103968
Top
NeddySeagoon
Administrator
Administrator
User avatar
Posts: 56088
Joined: Sat Jul 05, 2003 9:37 am
Location: 56N 3W

  • Quote

Post by NeddySeagoon » Tue Jun 22, 2021 4:05 pm

cyberbat,

You can do one or two steps that you missed by getting the git portage tree and do a checkout mid way between today and your last update.
If that won't build, go back a bit further.

The gory detail is at HOWTO Update Old Gentoo
That process works for any age of last update.
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Top
asturm
Developer
Developer
Posts: 9496
Joined: Thu Apr 05, 2007 4:07 pm

  • Quote

Post by asturm » Tue Jun 22, 2021 4:21 pm

Neddy, that's overkill for a system that is only behind in python targets, not otherwise outdated. News item should be enough to follow.
Top
NeddySeagoon
Administrator
Administrator
User avatar
Posts: 56088
Joined: Sat Jul 05, 2003 9:37 am
Location: 56N 3W

  • Quote

Post by NeddySeagoon » Tue Jun 22, 2021 7:31 pm

asturm,

Agreed. It's more an indication of it doesn't matter haw bad things look, there is a way.
Doing the intermediate steps will be more CPU time too as more packagen will be built.

Is the system really up to date except PYTHON_TARGETS?
I suspect not but we bill be hearing more.
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Top
ff11
l33t
l33t
User avatar
Posts: 665
Joined: Mon Mar 10, 2014 10:24 pm

  • Quote

Post by ff11 » Tue Jun 22, 2021 8:38 pm

I did my update as follows, and it worked for me:

0- Keeping the old configuration similar to yours (with python3_7)...

1- I installed the dev-lang/python:3.9, there was no conflict.

2- Changed the configuration to:

Code: Select all

PYTHON_TARGETS="python3_9"
PYTHON_SINGLE_TARGET="python3_9"
3- I only updated portage and dependencies with (it was also without conflicts):

Code: Select all

# emerge -1av sys-apps/portage
4- I used the new portage to update the system:

Code: Select all

# emerge -DUuavt --with-bdeps=y @world
And everything is working normally. I always had in mind that if I needed to I would use a stage3 to fix something if it went wrong, but the whole operation was calm as calm waters.
| Proverbs 26:12 |
| There is more hope for a fool than for a wise man that are wise in his own eyes. |
* AlphaGo - The Movie - Full Documentary "I want to apologize for being so powerless" - Lee
Top
cyberbat
n00b
n00b
Posts: 13
Joined: Mon Jan 31, 2011 10:23 am

  • Quote

Post by cyberbat » Wed Jun 23, 2021 4:39 pm

I succeeded to update portage in my situation by removing some packages that blocked portage from upgrading.
Details:

Code: Select all

#output with list of conflicts went to file
emerge -v1 --backtrack=99 =sys-apps/portage-3.0.20-r6 > /tmp/portage-out.txt 2>&1
#making list of that stuff that prevent portage from upgrading
cat /tmp/portage-out.txt | grep -Eo 'required by \([a-z]*-[a-z]*\/[a-z\-]*-[0-9]' | sed -e 's/required by (//' | sed -e 's/-[0-9]$//' | sort -u >> ~/temp-remove.txt

#HERE you must manually edit ~/temp-remove.txt to remove packages needed by portage itself. They were portage, toml and setuptools for me.

#remove packages from the list
/usr/lib/python-exec/python3.7/emerge -aC `cat ~/temp-remove.txt`

#install latest portage
emerge -va1 --backtrack=99 sys-apps/portage
You can reinstall all needed packages from ~/temp-remove.txt after updating system.

By the way if you face the problem "emerge: no python-exec wrapped executable found in /usr/lib/python-exec.", just use '/usr/lib/python-exec/python3.7/emerge' instead of 'emerge'. Thanks for the thread viewtopic-t-1109544-start-0.html
Top
Post Reply

10 posts • Page 1 of 1

Return to “Portage & Programming”

Jump to
  • Assistance
  • ↳   News & Announcements
  • ↳   Frequently Asked Questions
  • ↳   Installing Gentoo
  • ↳   Multimedia
  • ↳   Desktop Environments
  • ↳   Networking & Security
  • ↳   Kernel & Hardware
  • ↳   Portage & Programming
  • ↳   Gamers & Players
  • ↳   Other Things Gentoo
  • ↳   Unsupported Software
  • Discussion & Documentation
  • ↳   Documentation, Tips & Tricks
  • ↳   Gentoo Chat
  • ↳   Gentoo Forums Feedback
  • ↳   Duplicate Threads
  • International Gentoo Users
  • ↳   中文 (Chinese)
  • ↳   Dutch
  • ↳   Finnish
  • ↳   French
  • ↳   Deutsches Forum (German)
  • ↳   Diskussionsforum
  • ↳   Deutsche Dokumentation
  • ↳   Greek
  • ↳   Forum italiano (Italian)
  • ↳   Forum di discussione italiano
  • ↳   Risorse italiane (documentazione e tools)
  • ↳   Polskie forum (Polish)
  • ↳   Instalacja i sprzęt
  • ↳   Polish OTW
  • ↳   Portuguese
  • ↳   Documentação, Ferramentas e Dicas
  • ↳   Russian
  • ↳   Scandinavian
  • ↳   Spanish
  • ↳   Other Languages
  • Architectures & Platforms
  • ↳   Gentoo on ARM
  • ↳   Gentoo on PPC
  • ↳   Gentoo on Sparc
  • ↳   Gentoo on Alternative Architectures
  • ↳   Gentoo on AMD64
  • ↳   Gentoo for Mac OS X (Portage for Mac OS X)
  • Board index
  • All times are UTC
  • Delete cookies

© 2001–2026 Gentoo Foundation, Inc.

Powered by phpBB® Forum Software © phpBB Limited

Privacy Policy

 

 

magic