munki / macadmin-scripts

Scripts of possible interest to macOS admins

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Python xattr module error

borgo1971 opened this issue · comments

Seems I unable to troubleshoot the following issue, that appeared after I upgraded MacPorts (on my MacPro with Monterey):

studio@macpro::~ % curl -O -L https://raw.githubusercontent.com/munki/macadmin-scripts/main/installinstallmacos.py && sudo python installinstallmacos.py
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 26241 100 26241 0 0 198k 0 --:--:-- --:--:-- --:--:-- 208k
This tool requires the Python xattr module. Perhaps run pip install xattr to install it.
studio@macpro::~ % pip install xattr
Requirement already satisfied: xattr in /Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/site-packages (1.1.0)
Requirement already satisfied: cffi>=1.16.0 in /Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/site-packages (from xattr) (1.16.0)
Requirement already satisfied: pycparser in /Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/site-packages (from cffi>=1.16.0->xattr) (2.22)
studio@macpro::~ % python ./installinstallmacos.py --help
This tool requires the Python xattr module. Perhaps run pip install xattr to install it.
studio@macpro::~ %

Another question: why can we have only the latest version of BigSur and instead of Catalina, as many as 5 or 6 versions are listed?

Maybe I solved the issue above removing all entities of python, installing latest python from homebrew (3.12.3) and from GUI (3.12.4) and last, linking python3 in /usr/local/bin as python. Not sure If I needed all this, and which was the step that solved the issue, but now your script works again.
But but I still can't get a version of BigSur other than the last one, while there are as many as 8 of Catalina!

   ProductID    Version    Build   Post Date  Title

1 061-26578 10.14.5 18F2059 2019-10-14 macOS Mojave
2 061-26589 10.14.6 18G103 2019-10-14 macOS Mojave
3 041-91758 10.13.6 17G66 2019-10-19 macOS High Sierra
4 041-88800 10.14.4 18E2034 2019-10-23 macOS Mojave
5 041-90855 10.13.5 17F66a 2019-10-23 Install macOS High Sierra Beta
6 061-86291 10.15.3 19D2064 2020-03-23 macOS Catalina
7 001-04366 10.15.4 19E2269 2020-05-04 macOS Catalina
8 001-15219 10.15.5 19F2200 2020-06-15 macOS Catalina
9 001-36735 10.15.6 19G2006 2020-08-06 macOS Catalina
10 001-36801 10.15.6 19G2021 2020-08-12 macOS Catalina
11 001-51042 10.15.7 19H2 2020-09-24 macOS Catalina
12 001-57224 10.15.7 19H4 2020-10-27 macOS Catalina
13 001-68446 10.15.7 19H15 2020-11-11 macOS Catalina
14 042-45246 11.7.10 20G1427 2023-09-11 macOS Big Sur
15 052-62010 14.4 23E214 2024-03-07 macOS Sonoma
16 052-60128 13.6.5 22G621 2024-03-07 macOS Ventura
17 052-60131 12.7.4 21H1123 2024-03-18 macOS Monterey
18 052-77516 14.4.1 23E224 2024-04-01 macOS Sonoma
19 052-64249 13.6.6 22G630 2024-04-01 macOS Ventura
20 062-01946 14.5 23F79 2024-05-20 macOS Sonoma
21 052-96238 12.7.5 21H1222 2024-05-20 macOS Monterey
22 052-96247 13.6.7 22G720 2024-05-20 macOS Ventura

Choose a product to download (1-22):

The script parses Apple's softwareupdate catalog. What is advertised there is under Apple's control. I agree that what's there doesn't make a lot of sense or show a lot of consistency, but that's on Apple. I personally only use the tool to download new macOS releases, so what's in the catalog works OK for me.