{"id":614,"date":"2024-06-27T19:50:16","date_gmt":"2024-06-27T18:50:16","guid":{"rendered":"https:\/\/www.farcorfe.org.uk\/?p=614"},"modified":"2024-06-27T19:50:16","modified_gmt":"2024-06-27T18:50:16","slug":"python-updated-to-3-11","status":"publish","type":"post","link":"https:\/\/www.farcorfe.org.uk\/?p=614","title":{"rendered":"Python updated to 3.11"},"content":{"rendered":"\n<p>Might have found my Rust 1.78\/1.79 is not building, as checking the dependencies, it wants Python 3.11, but my make.conf file holds python at 3.9.   Not sure why Postmaster  was not complaining at build time with a more helpful error message, but this seems a good place to start, so now off to rebuild Python.<\/p>\n\n\n\n<p>20240529:<\/p>\n\n\n\n<p>&nbsp; AFFECTS: users of python<\/p>\n\n\n\n<p>&nbsp; AUTHOR: rm@FreeBSD.org<\/p>\n\n\n\n<p>&nbsp; The default version of python3 and python was switched to 3.11.<\/p>\n\n\n\n<p>&nbsp; For ports users wanting to keep version 3.9 as default,<\/p>\n\n\n\n<p>&nbsp; add DEFAULT_VERSIONS+= python=3.9 python3=3.9 to make.conf<\/p>\n\n\n\n<p>&nbsp; Following procedures may ease the upgrade:<\/p>\n\n\n\n<p>&nbsp; For users of pre-build packages:<\/p>\n\n\n\n<p>&nbsp; # sh<\/p>\n\n\n\n<p>&nbsp; # for i in $(pkg query -g %n &#8216;py39-*&#8217;); do pkg set -yn ${i}:py311-${i#py39-}; done<\/p>\n\n\n\n<p>&nbsp; # pkg upgrade<\/p>\n\n\n\n<p>&nbsp; For portmaster users:<\/p>\n\n\n\n<p>&nbsp; # sh<\/p>\n\n\n\n<p>&nbsp; # portmaster -o lang\/python311 python39<\/p>\n\n\n\n<p>&nbsp; # REINSTALL=&#8221;$(pkg info -oq &#8216;*py39*&#8217;)&#8221;<\/p>\n\n\n\n<p>&nbsp; # pkg delete -f &#8220;*py39*&#8221;<\/p>\n\n\n\n<p>&nbsp; # portmaster $REINSTALL<\/p>\n\n\n\n<p>&nbsp; # REBUILD=$(pkg query -g &#8220;%n:%dn&#8221; &#8216;*&#8217; | grep py3 | grep -v py311 | cut -d : -f 1 | sort -u)<\/p>\n\n\n\n<p>&nbsp; # portmaster $REBUILD<\/p>\n\n\n\n<p>&nbsp; # REBUILD2=$(pkg list | grep python-39 | xargs pkg which | awk &#8216;{print $6}&#8217; | sort -u)<\/p>\n\n\n\n<p>&nbsp; # portmaster $REBUILD2<\/p>\n\n\n\n<p>&nbsp; Final steps (for pre-built packages &amp; portmaster):<\/p>\n\n\n\n<p>&nbsp; If no longer required, Python 3.9 can be removed via<\/p>\n\n\n\n<p>&nbsp; &#8220;pkg remove python39&#8221; and the directory \/usr\/local\/lib\/python3.9 can<\/p>\n\n\n\n<p>&nbsp; then be deleted afterwards, if not empty.<\/p>\n\n\n\n<p><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Might have found my Rust 1.78\/1.79 is not building, as checking the dependencies, it wants Python 3.11, but my make.conf file holds python at 3.9. Not sure why Postmaster was not complaining at build time with a more helpful error message, but this seems a good place to start, so now off to rebuild Python. &hellip; <\/p>\n<p class=\"link-more\"><a href=\"https:\/\/www.farcorfe.org.uk\/?p=614\" class=\"more-link\">Continue reading<span class=\"screen-reader-text\"> &#8220;Python updated to 3.11&#8221;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[5,7],"tags":[],"class_list":["post-614","post","type-post","status-publish","format-standard","hentry","category-free","category-house"],"_links":{"self":[{"href":"https:\/\/www.farcorfe.org.uk\/index.php?rest_route=\/wp\/v2\/posts\/614","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.farcorfe.org.uk\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.farcorfe.org.uk\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.farcorfe.org.uk\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.farcorfe.org.uk\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=614"}],"version-history":[{"count":0,"href":"https:\/\/www.farcorfe.org.uk\/index.php?rest_route=\/wp\/v2\/posts\/614\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.farcorfe.org.uk\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=614"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.farcorfe.org.uk\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=614"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.farcorfe.org.uk\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=614"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}