Pointed Golly to incorrect location for Python dll

Has something gone haywire? Let us know about it!
Post Reply
twinb7
Posts: 190
Joined: February 11th, 2014, 8:08 pm
Location: Ames, Iowa

Pointed Golly to incorrect location for Python dll

Post by twinb7 » November 29th, 2023, 11:33 pm

Hey, been a long time since I was last here.

I got a fresh install of Golly on my computer and it requested the location of my Python 3 dll for scripts to run. I pointed it to the exe in the same directory and, understandably, scripts can't run. But I can't see in the preferences where to fix this. Any help?

User avatar
confocaloid
Posts: 3059
Joined: February 8th, 2022, 3:15 pm

Re: Pointed Golly to incorrect location for Python dll

Post by confocaloid » November 29th, 2023, 11:50 pm

twinb7 wrote:
November 29th, 2023, 11:33 pm
Hey, been a long time since I was last here.

I got a fresh install of Golly on my computer and it requested the location of my Python 3 dll for scripts to run. I pointed it to the exe in the same directory and, understandably, scripts can't run. But I can't see in the preferences where to fix this. Any help?
I believe the place to fix this is the GollyPrefs file, where there should be a line that begins with "python3_lib=", for example:

Code: Select all

python3_lib=libpython3.10.so
127:1 B3/S234c User:Confocal/R (isotropic CA, incomplete)
Unlikely events happen.
My silence does not imply agreement, nor indifference. If I disagreed with something in the past, then please do not construe my silence as something that could change that.

twinb7
Posts: 190
Joined: February 11th, 2014, 8:08 pm
Location: Ames, Iowa

Re: Pointed Golly to incorrect location for Python dll

Post by twinb7 » December 22nd, 2023, 11:11 pm

confocaloid wrote:
November 29th, 2023, 11:50 pm

Code: Select all

a totally straightforward fix
It's so weird, but I don't know why - every time I run Golly, it replaces the contents of GollyPrefs to make that line say python.exe again.

User avatar
dvgrn
Moderator
Posts: 10694
Joined: May 17th, 2009, 11:00 pm
Location: Madison, WI
Contact:

Re: Pointed Golly to incorrect location for Python dll

Post by dvgrn » December 22nd, 2023, 11:34 pm

twinb7 wrote:
December 22nd, 2023, 11:11 pm
confocaloid wrote:
November 29th, 2023, 11:50 pm

Code: Select all

a totally straightforward fix
It's so weird, but I don't know why - every time I run Golly, it replaces the contents of GollyPrefs to make that line say python.exe again.
Just to double-check: do you close Golly, and only then edit the GollyPrefs file, and only then run Golly again?

Golly writes out its current settings to GollyPrefs whenever it closes. You can't edit GollyPrefs while Golly is running ... or rather, you can, but it doesn't do any good.

User avatar
confocaloid
Posts: 3059
Joined: February 8th, 2022, 3:15 pm

Re: Pointed Golly to incorrect location for Python dll

Post by confocaloid » December 22nd, 2023, 11:39 pm

Maybe creating LifeWiki:FAQ/GollyPrefs would help

User avatar
johamwit
Posts: 59
Joined: September 12th, 2021, 6:58 am

Re: Pointed Golly to incorrect location for Python dll

Post by johamwit » January 14th, 2024, 8:07 pm

I'm trying to use the identifier script I just dowload from viewtopic.php?p=18907, but I get the "Could not load the Python library" errorBox, highlighting "libpython3.8".

I am on ubuntu 20.04.6 LTS,
python3 starts with:
"Python 3.8.10 (default, Nov 22 2023, 10:22:35)
[GCC 9.4.0] on linux"
and GollyPrefs reads
"python3_lib=libpython3.8.so"

There are python2.7, python3, python3.8 and python3.9 folders in /usr/lib

I don't speak python. Any advice ?

EDIT: Golly 4.1
Last edited by johamwit on January 16th, 2024, 8:04 am, edited 1 time in total.
Oh my God! -- it's full of search space!

get_Snacked
Posts: 153
Joined: August 20th, 2022, 10:51 pm
Location: Earth

Re: Pointed Golly to incorrect location for Python dll

Post by get_Snacked » January 15th, 2024, 2:40 pm

slightly similar things happened here. i'm on Windows 11, and i tried to use Python 3.12 and put in the path for the dll, but it just requested me the library's location again, which means that it didn't work. then i proceeded to cancel and then try to run searchRules-matchPatt2.py, but it said that it couldn't find the command py_initialize. i then tried to use Python 3.11, but the same thing happened where i would plug the path in and it wouldn't work.

EDIT: my version of Golly is 4.2.
Last edited by get_Snacked on January 15th, 2024, 4:40 pm, edited 1 time in total.
1983263225470666662666647618

User avatar
dvgrn
Moderator
Posts: 10694
Joined: May 17th, 2009, 11:00 pm
Location: Madison, WI
Contact:

Re: Pointed Golly to incorrect location for Python dll

Post by dvgrn » January 15th, 2024, 3:38 pm

Just for completeness, please mention the version of Golly you're working with, as well as the version of Python.

Otherwise, everyone tends to assume that it's Golly 4.2, and then is completely mystified as to why things aren't working ... but then sometimes it turns out that somebody is trying to get an old Golly 3.x package from some Linux distro to work with Python 3.x.

Post Reply