apgluxe 5.x not working in macOS Catalina

Has something gone haywire? Let us know about it!
Post Reply
User avatar
LaundryPizza03
Posts: 2326
Joined: December 15th, 2017, 12:05 am
Location: Unidentified location "https://en.wikipedia.org/wiki/Texas"

apgluxe 5.x not working in macOS Catalina

Post by LaundryPizza03 » November 5th, 2019, 5:43 pm

I am unable to run apgluxe v5.09 in macOS Catalina because the utility "python3" cannot be found. Specifically, this happens when configuring the search for a particular rule. How do I repair this manually?

Code: Select all

x = 4, y = 3, rule = B3-q4z5y/S234k5j
2b2o$b2o$2o!
LaundryPizza03 at Wikipedia

wildmyron
Posts: 1544
Joined: August 9th, 2013, 12:45 am
Location: Western Australia

Re: apgluxe 5.x not working in macOS Catalina

Post by wildmyron » November 5th, 2019, 11:11 pm

LaundryPizza03 wrote:
November 5th, 2019, 5:43 pm
I am unable to run apgluxe v5.09 in macOS Catalina because the utility "python3" cannot be found. Specifically, this happens when configuring the search for a particular rule. How do I repair this manually?
This seems very strange because the build process specifically checks to see if python3 is available and if it isn't, falls back to python (which could actually be either python2 or python3). Presumably this is somehow related to the changes in Catalina regarding scripting languages.

The output from your './recompile.sh' command should give something that looks like

Code: Select all

<snip>
Symmetry unspecified; assuming C1.
Configuring rule b3s23; symmetry C1
Using /usr/bin/python3 to configure lifelib...
Valid symmetry: C1
Success!
<snip>
Note the line "Using /usr/bin/python3 to configure lifelib...". Can you copy what output you get in place of that and post it here.

Also, run the following commands and copy the output here

Code: Select all

which python3
which python
python3 --version
python --version
And possibly it will be useful to see the output of this command too:

Code: Select all

xcrun python3
The 5S project (Smallest Spaceships Supporting Specific Speeds) is now maintained by AforAmpere. The latest collection is hosted on GitHub and contains well over 1,000,000 spaceships.

Semi-active here - recovering from a severe case of LWTDS.

User avatar
LaundryPizza03
Posts: 2326
Joined: December 15th, 2017, 12:05 am
Location: Unidentified location "https://en.wikipedia.org/wiki/Texas"

Re: apgluxe 5.x not working in macOS Catalina

Post by LaundryPizza03 » November 6th, 2019, 1:33 am

Status quo:

Code: Select all

Symmetry unspecified; assuming C1.
Configuring rule b3s23; symmetry C1
Using /usr/bin/python3 to configure lifelib...
python3: error: unable to find utility "python3", not a developer tool or in PATH
Non-apgmera commands:

Code: Select all

> which python3
/usr/bin/python3
> which python
/usr/bin/python
> python3 --version
python3: error: unable to find utility "python3", not a developer tool or in PATH
> python --version
Python 2.7.16
> xcrun python3
xcrun: error: unable to find utility "python3", not a developer tool or in PATH

Code: Select all

x = 4, y = 3, rule = B3-q4z5y/S234k5j
2b2o$b2o$2o!
LaundryPizza03 at Wikipedia

wildmyron
Posts: 1544
Joined: August 9th, 2013, 12:45 am
Location: Western Australia

Re: apgluxe 5.x not working in macOS Catalina

Post by wildmyron » November 6th, 2019, 3:57 am

Something is clearly broken with Python3 on your Mac. Unfortunately I don't have enough experience with MacOS to understand how it might have got into this state or advise you on how to fix it.

As a workaround you can edit this part of recompile.sh:

Code: Select all

if command -v "python3" &>/dev/null; then
    echo "Using $(which python3) to configure lifelib..."
    python3 mkparams.py $rulearg $symmarg $gpuarg2
else
    echo "Using $(which python) to configure lifelib..."
    python mkparams.py $rulearg $symmarg $gpuarg2
fi
to look like

Code: Select all

echo "Using $(which python) to configure lifelib..."
python mkparams.py $rulearg $symmarg $gpuarg2
Unfortunately this will be a bit messy when it comes to updating apgsearch if the file "recompile.sh" changes, but that hasn't happened for some time. Just remember that you've made this change if in the future you've get errors when trying to update apgsearch.

====

But definitely it would be preferable to fix Python on your system. The file /usr/bin/python3 may just be a dangling symlink (executing

Code: Select all

file /usr/bin/python3
would tell you if that is the case).
Probably you could just delete the file "/usr/bin/python3", and if desired reinstall Python3 (via Homebrew or manual installation method). But without knowing how your system came to be in this state I wouldn't advise that you take this course of action.
The 5S project (Smallest Spaceships Supporting Specific Speeds) is now maintained by AforAmpere. The latest collection is hosted on GitHub and contains well over 1,000,000 spaceships.

Semi-active here - recovering from a severe case of LWTDS.

User avatar
LaundryPizza03
Posts: 2326
Joined: December 15th, 2017, 12:05 am
Location: Unidentified location "https://en.wikipedia.org/wiki/Texas"

Re: apgluxe 5.x not working in macOS Catalina

Post by LaundryPizza03 » November 6th, 2019, 8:11 am

wildmyron wrote:
November 6th, 2019, 3:57 am
The file /usr/bin/python3 may just be a dangling symlink (executing

Code: Select all

file /usr/bin/python3
would tell you if that is the case).
What would the output look like? I got

Code: Select all

/usr/bin/python3: Mach-O 64-bit executable x86_64

Code: Select all

x = 4, y = 3, rule = B3-q4z5y/S234k5j
2b2o$b2o$2o!
LaundryPizza03 at Wikipedia

wildmyron
Posts: 1544
Joined: August 9th, 2013, 12:45 am
Location: Western Australia

Re: apgluxe 5.x not working in macOS Catalina

Post by wildmyron » November 6th, 2019, 11:29 am

LaundryPizza03 wrote:
November 6th, 2019, 8:11 am
wildmyron wrote:
November 6th, 2019, 3:57 am
The file /usr/bin/python3 may just be a dangling symlink (executing

Code: Select all

file /usr/bin/python3
would tell you if that is the case).
What would the output look like? I got

Code: Select all

/usr/bin/python3: Mach-O 64-bit executable x86_64
The output on Linux would look something like:

Code: Select all

/usr/bin/python3: broken symbolic link to `...`
This is clearly not the case. As i said before, i don't know enough about MacOS to understand what state your system is in. You might have some luck asking a question on stackoverflow.com, or on a dedicated MacOS forum.
The 5S project (Smallest Spaceships Supporting Specific Speeds) is now maintained by AforAmpere. The latest collection is hosted on GitHub and contains well over 1,000,000 spaceships.

Semi-active here - recovering from a severe case of LWTDS.

Post Reply