Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update manual installation instructions for Python 3.10.10 #347

Merged
merged 5 commits into from
Jun 23, 2023

Conversation

kdmukai
Copy link
Contributor

@kdmukai kdmukai commented Mar 12, 2023

SeedSigner OS is currently pulling 3.10.8. But the existing manual installation instructions were leaving python at the Raspi OS's built-in 3.7.x.

Updating instructions here for the most up-to-date 3.10.x and leaving it as a follow-up TODO to make the matching upgrade to the minor version in SeedSigner OS.

Notes:

  • I have tested this on my existing dev device but have not tried a rebuild from scratch yet. Keeping this PR in DRAFT status until full end-to-end manual build is confirmed.
  • I had to add libjpeg-dev and zlib1g-dev for Pillow support. I suspect that libopenjp2-7 is not needed but need testing to be sure. Overall, I'm not sure why the Pillow install had new/different dependencies on a device that had previously been running the same manual installation steps prior to this PR. Due to trying to install in python 3.10 vs 3.7?

Misc

Minor cleanup now that the fork of pyzbar is controlled by SeedSigner and not me.

@newtonick
Copy link
Collaborator

newtonick commented Apr 14, 2023

numpy 1.21.1 does not officially support python 10. https://numpy.org/doc/stable/release/1.21.1-notes.html

My recommendation is to update to 1.21.6 in the requirements.txt file. numpy 1.21.3 added official python 3.10 support. Versions numpy after 1.21.6 has deprecations I did not investigate if they would impact our project.

@jdlcdl
Copy link

jdlcdl commented Apr 25, 2023

TL;DR: ACK TESTED

I'm going to run thru step-by-step instructions for manual installation based on this pr on my development rpi2. Will leave my notes here later.

re: Grab the python 3.10 source -- and verify it???:

sha256sum Python-3.10.10.tgz
fba64559dde21ebdc953e4565e731573bb61159de8e4d4cedee70fb1196f610d  Python-3.10.10.tgz

re: configure step -- ran faster for me on rpi2, maybe even faster on rpi4/rpi3/rpi0v2:

# configure takes ~4-6 minutes to check what is available

re: compile step -- ran faster for me on rpi2, maybe even faster on rpi4/rpi3/rpi0v2:

# compiling takes ~80 minutes(!!) on the Pi Zero 1.3
# compiling takes ~36 minutes(!!) on the Pi 2

re: cleanup step -- complained about perms because I used sudo make altinstall:

sudo rm -rf Python-3.10.10*

re: Install dependencies step -- ran faster for me on rpi2:

Copy this entire box and run it as one command (will take ~9-20 minutes to complete):

re: download zbar -- and verify it???:

sha256sum libzbar0_0.23.90-1_armhf.deb
ce40bca5612ae4c74f9292d1c6f9a2eaaa88e8020e6a15a78697f9d93fbd4045  libzbar0_0.23.90-1_armhf.deb

re: installing zbar, this caught my eye but maybe it's ok:

Get:1 /home/pi/libzbar0_0.23.90-1_armhf.deb libzbar0 armhf 0.23.90-1 [117 kB]
Traceback (most recent call last):
  File "/usr/bin/apt-listchanges", line 30, in <module>
    import apt_pkg
ModuleNotFoundError: No module named 'apt_pkg'

re: download C library for Broadcom BCM 2835 -- and verify it???

sha256sum bcm2835-1.60.tar.gz
333e7ceee895e910c29098074773ee86bcab4a82c2af0cf083c4533767e52d27  bcm2835-1.60.tar.gz

re: installing seedsigner requirements with pip:
I recall Nick mentioning something like "installed numpy 1.21.6 instead of 1.21.1 after a long wheel-build failure" but I did not have a problem myself so 1.21.1 is what Im sticking with for now.
...also, this step took my rpi2 ~35 minutes for it's first-time run.

re: further os modifications cleanup, this caught my eye (see above):

Traceback (most recent call last):
  File "/usr/bin/apt-listchanges", line 30, in <module>
    import apt_pkg
ModuleNotFoundError: No module named 'apt_pkg'

ACK tested

Nothing critical failed during my slow step-by-step walkthrough this morning... however the notes above might be interesting for small updates to this pr... up to others to decide that.

My seedsigner pi2 board running the manual-installation this morning seems to run fine. All tests passed as well.

@DesobedienteTecnologico
Copy link
Contributor

Python 3.10.10 can be possible in SeedSignerOS for sure. Actually SeedSigner OS uses 3.10.4 (https://github.com/buildroot/buildroot/blob/b634d504cb5a0b621f115f36c50a712e85fc8027/package/python3/python3.hash).

As soon I get hands on reproducible builds, Python version can be pump at the version you would like to.
Just ping me here or in Telegram to keep track of this.

Keeping in mind other packages support for that Python version as @newtonick commented. (+1)

@jdlcdl
Copy link

jdlcdl commented May 12, 2023

In my previous response above, I'd noted "ACK tested" running through an entire "manual installation" based off this pr (see notes if they're useful).

In hopes to see this pr merged, so that current users of 0.6.0 who want to recreate a similar environment via "manual installation", I hereby add another "ACK tested" to the same process with the only change being that I did so with python 3.10.4 instead of 3.10.10... so they're both working to me. Good asap with 3.10.4 for current users reading this document. Good for 0.6.1 whenever this dependency gets bumped to 3.10.10 for next release too.

@newtonick
Copy link
Collaborator

ACK Tested (ran through entire manual install process)

@kdmukai any reason this remains a draft?

Also this PR in the seedsigner-os repo includes the python 3.10.10

@kdmukai
Copy link
Contributor Author

kdmukai commented Jun 1, 2023

I will finally do a complete build from scratch in the coming days and flip this out of DRAFT if all goes well.

@kdmukai kdmukai marked this pull request as ready for review June 4, 2023 15:42
@@ -316,12 +406,13 @@ sudo systemctl disable networking.service
sudo systemctl disable dphys-swapfile.service
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this might no longer be needed, service "is masked, ignored" after previously removing it in the "Further OS Modifications" section.

@jdlcdl
Copy link

jdlcdl commented Jun 4, 2023

ACK tested, as of commit e64c2dc

35 tests passed, coverage: 59%

@newtonick
Copy link
Collaborator

ACK and tested

@newtonick newtonick added the documentation Improvements or additions to documentation label Jun 6, 2023
@newtonick newtonick merged commit 2bba31e into SeedSigner:dev Jun 23, 2023
@kdmukai kdmukai deleted the python3_10_update branch September 2, 2024 13:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation
Projects
Development

Successfully merging this pull request may close these issues.

4 participants