Author Topic: upgrading to Python 3 in ArcaOS  (Read 9629 times)

Edmund Wong

  • Newbie
  • *
  • Posts: 43
  • Karma: +0/-0
    • View Profile
upgrading to Python 3 in ArcaOS
« on: December 14, 2022, 01:53:39 am »
Hi,

I recently installed ArcaOS (coming from OS/2 Warp some time ago) and have read the wiki pages; but
I'm a confused with the setup.  Since it uses YUM (been using CentOS so I am somewhat familiar with this),
I figured "yum install python3 -y" would work; but it can't find python3.

So I go into the ANPM and try installing python3 but there is no package "python3" and none of the
python3-* packages look like the correct one.  Then I noticed python2.7.  Since installed on the
system is python 2.7.6 (old), I figured I'd install python 2.7.18; but ANPM comes up with an error
stating that there's a conflict with the existing 2.7.6 libraries.  I thought about removing
the old python version when I remembered that yum requires Python2.7.6 and removing it
would screw up YUM (at least from my old CentOS experience).

Can someone clarify how to get at least an updated python running on this system?

Any help appreciated.

Thanks


Edmund

Dave Yeo

  • Hero Member
  • *****
  • Posts: 5036
  • Karma: +114/-1
    • View Profile
Re: upgrading to Python 3 in ArcaOS
« Reply #1 on: December 14, 2022, 02:47:49 am »
Install the netlabs-exp package, in ANPM, go to Manage-->Repositories and enable netlabs-exp, close the window, wait for ANPM to update t5he package list, install Python 3.
At this point you can decide whether to live dangerously and install more exp packages or disable netlabs-exp. Currently I don't think there is much extra in netlabs-exp, it is where new packages get tested.
Note there is mostly a couple of volunteers doing the packaging so don't expect things like the latest Python

Edmund Wong

  • Newbie
  • *
  • Posts: 43
  • Karma: +0/-0
    • View Profile
Re: upgrading to Python 3 in ArcaOS
« Reply #2 on: December 14, 2022, 03:04:50 am »
Hi Dave,

Install the netlabs-exp package, in ANPM, go to Manage-->Repositories and enable netlabs-exp, close the window, wait for ANPM to update t5he package list, install Python 3.

Strange thing is, netlabs-exp is already enabled.


Dave Yeo

  • Hero Member
  • *****
  • Posts: 5036
  • Karma: +114/-1
    • View Profile
Re: upgrading to Python 3 in ArcaOS
« Reply #3 on: December 14, 2022, 04:43:42 am »
Hmm, here I see python3 in the list of uninstalled packages when I enable netlabs-exp in ANPM.
Try going to Manage-->Yum Tools-->Cleanup and clean all and if that doesn't work, Manage-->Yum Tools-->Maintenance and rebuild the RPM database, in ANPM.

Edmund Wong

  • Newbie
  • *
  • Posts: 43
  • Karma: +0/-0
    • View Profile
Re: upgrading to Python 3 in ArcaOS
« Reply #4 on: December 14, 2022, 05:10:26 am »
Hmm, here I see python3 in the list of uninstalled packages when I enable netlabs-exp in ANPM.
Try going to Manage-->Yum Tools-->Cleanup and clean all and if that doesn't work, Manage-->Yum Tools-->Maintenance and rebuild the RPM database, in ANPM.

I have done both options (Cleanup and Rebuild) and here are the following Python3 packages I see:

python3-appdirs
python3-dateutil
python3-packaging
python3-pyparsing
python3-rpm-macros
python3-setuptools
python3-setuptools_scm
python3-six

I also see: python2.7, python2.7-debuginfo, python2.7-unversioned-command.

I have all repos enabled.

I'm completely stumped.  I'm also considering blowing away this installation and reinstall.

Edmund

Dave Yeo

  • Hero Member
  • *****
  • Posts: 5036
  • Karma: +114/-1
    • View Profile
Re: upgrading to Python 3 in ArcaOS
« Reply #5 on: December 14, 2022, 05:55:53 am »
Strange, I have a much bigger list starting with plain python3, it is strange. You are using the pentium4 architecture? It's pretty well a requirement now due to the need for SSE2 and I think i686 has been mostly dropped.
IIRC, the last AOS release still used i686, the current betas have switched.
You can change the platform under Manage, it usually works with the occasional update giving problems or you can reinstall the YUM/RPM stuff.
Go to @unixroot\usr\lib, do "unlock *dll" then you should be able to move \etc \usr and \var out of the way and then start ANPM, it will install the bootstrap, get you to reboot and finish installing the bootstrap. ANPM can export your current packages, Export Package List under Yum Tools
Edit: Yep, no i686 python3 package so you have to change platform.
« Last Edit: December 14, 2022, 05:57:40 am by Dave Yeo »

Edmund Wong

  • Newbie
  • *
  • Posts: 43
  • Karma: +0/-0
    • View Profile
Re: upgrading to Python 3 in ArcaOS
« Reply #6 on: December 15, 2022, 02:31:56 am »
Strange, I have a much bigger list starting with plain python3, it is strange. You are using the pentium4 architecture? It's pretty well a requirement now due to the need for SSE2 and I think i686 has been mostly dropped.

Nope.  Apparently I'm using the i686 platform.   So just followed your instructions and now am changing platforms.

I don't quite recall the installation asking me about the platform, though.

Thanks for that helpful hint.  Didn't realize I was supposed to use pentium4. 

Edmund

Edmund Wong

  • Newbie
  • *
  • Posts: 43
  • Karma: +0/-0
    • View Profile
Re: upgrading to Python 3 in ArcaOS
« Reply #7 on: December 15, 2022, 03:39:18 am »
I finally got the platform changed and I can see python2.7 and python 3 packages; but I'm still encountering
that package conflict with python2.6.  I first tried to install python3 only; but it complained it required python2.7.dll.
So I tried installing python2.7; but came across that conflict with python2.6. 

Is there a way to tell the package manager to install python2.7 on an alternate path? 

On CentOS, I'd have to build a new package and install it in /opt.  via make altinstall   

Any help appreciated.

Edmund

Dave Yeo

  • Hero Member
  • *****
  • Posts: 5036
  • Karma: +114/-1
    • View Profile
Re: upgrading to Python 3 in ArcaOS
« Reply #8 on: December 15, 2022, 04:08:43 am »
Hi Edmund, IIRC, you have to first completely update to Python 2.7, especially one of the lib packages, then install Python 3, also make sure you have the latest ANPM https://www.arcanoae.com/wiki/anpm/ as changes were made at some point to support Python2.7, might also need the latest Warpin installer, I've lost track of what was on 5.07, it is on Hobbes and https://hobbes.nmsu.edu you should get a warning if it is needed.
Other then installing manually somewhere like @unixroot\usr\local there isn't really an established alternate path and have to be careful of DLL conflicts. Generally the first DLL found on LIBPATH (which often starts with a dot) is used. There are the pseudo environment variables BEGINLIBPATH (and ENDLIBPATH) and LIBPATHSTRICT to force using multiple DLLs (originally for xpcom.dll) with the same name.

As for now needing pentium4, that happened after the release of 5.07 as a requirement for QT5 so when 5.07 was released, i686 was the default and back earlier there were more people using non-SSE2 CPU's
The installer in 5.1 will give the choice of platforms and default to pentium4. 5.1 is in the release candidate stage with mostly documentation still needed I believe.

David McKenna

  • Hero Member
  • *****
  • Posts: 809
  • Karma: +25/-0
    • View Profile
Re: upgrading to Python 3 in ArcaOS
« Reply #9 on: December 15, 2022, 04:17:21 am »
 Hi Edmund,

  I also had trouble getting Python3 installed when it came out. What eventually worked for me was:

1. Set Platform to Pentium 4
2. Disable all repositories in ANPM EXCEPT netlabs-exp, close ANPM
3. Run 'Yum update python' from a command line ( no '3').

 Don't know if it will work for you, but worth a try at least.

Regards,

Edmund Wong

  • Newbie
  • *
  • Posts: 43
  • Karma: +0/-0
    • View Profile
Re: upgrading to Python 3 in ArcaOS
« Reply #10 on: December 15, 2022, 09:46:47 am »
Hi Edmund,

  I also had trouble getting Python3 installed when it came out. What eventually worked for me was:

1. Set Platform to Pentium 4
2. Disable all repositories in ANPM EXCEPT netlabs-exp, close ANPM
3. Run 'Yum update python' from a command line ( no '3').

 Don't know if it will work for you, but worth a try at least.

Regards,

Thanks for the help there; but it didn't work for me.  After doing "yum update python" I get the following:


c:\] python -V
A non-recoverable error occurred.  The process ended.

I'm wondering if I've gotten the installation of the whole system wrong.

Edmund


David McKenna

  • Hero Member
  • *****
  • Posts: 809
  • Karma: +25/-0
    • View Profile
Re: upgrading to Python 3 in ArcaOS
« Reply #11 on: December 18, 2022, 05:19:16 pm »
Edmund,

 Did 'yum update python' actually install anything? Is there a POPUPLOG file in the root of your boot drive? It might have a hint...

Regards,

Edmund Wong

  • Newbie
  • *
  • Posts: 43
  • Karma: +0/-0
    • View Profile
Re: upgrading to Python 3 in ArcaOS
« Reply #12 on: December 20, 2022, 04:37:01 am »
Edmund,

 Did 'yum update python' actually install anything? Is there a POPUPLOG file in the root of your boot drive? It might have a hint...

Regards,

Nope,  "yum update python" didn't install anything. 

There were a bunch of messages stating:

   Package python is obsoleted by python-unversioned-command, but obsleting package does not provide for requirements.

as well as:

Package python-libs is obsoleted by python3-libs, but obsoleting package does not provide for requirements.

Then I get finally:

"You could try using --skip-broken to work around the problem
  You could try running: rpm -Va --nofiles --nodigest"

Of course, I'm not going to do either of those as I've screwed up before doing that on CentOS. 

Earlier, someone mentioned that I should upgrade python27.dll fully.   I'm not sure how to do that.  I can't
do a "yum install python3" as it complains it requires python27.dll.   I can't "yum install python27" as it
spews a few pages of errors along the same lines as:

  file /@unixroot/usr/lib/python2.7/xmlrpclib.pyc from install of python2.7-2.7.18-3.0c00.pentium4 conflicts with file from package python-2.7.6-25.0c00.pentium4

And I obviously cannot uninstall python as yum/anpm requires it. 

I think I'm missing some brain cells and or facts; though right now, I think "upgrade python27.dll fully" is the closest hint I'm
feeling that might solve my issue.   Just having some trouble understanding what that means. 

My apologies for being so darn dense.

Edmund

Edmund Wong

  • Newbie
  • *
  • Posts: 43
  • Karma: +0/-0
    • View Profile
Re: upgrading to Python 3 in ArcaOS
« Reply #13 on: December 20, 2022, 04:44:40 am »
Never mind.  I'm just an idiot.   I missed the "disable all except netlabs-exp" before doing yum update python.

Now I have python3.8 installed. 

Thanks everyone!

Edmund

David McKenna

  • Hero Member
  • *****
  • Posts: 809
  • Karma: +25/-0
    • View Profile
Re: upgrading to Python 3 in ArcaOS
« Reply #14 on: December 21, 2022, 01:27:51 pm »
Edmund,

  Glad you got it working! Make sure to re-enable the repositories in ANPM...

Regards,