Page 1 of 1

apgluxe 5.x not working in macOS Catalina

Posted: November 5th, 2019, 5:43 pm
by LaundryPizza03
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?

Re: apgluxe 5.x not working in macOS Catalina

Posted: November 5th, 2019, 11:11 pm
by wildmyron
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

Re: apgluxe 5.x not working in macOS Catalina

Posted: November 6th, 2019, 1:33 am
by LaundryPizza03
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

Re: apgluxe 5.x not working in macOS Catalina

Posted: November 6th, 2019, 3:57 am
by wildmyron
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.

Re: apgluxe 5.x not working in macOS Catalina

Posted: November 6th, 2019, 8:11 am
by LaundryPizza03
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

Re: apgluxe 5.x not working in macOS Catalina

Posted: November 6th, 2019, 11:29 am
by wildmyron
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.