ConwayLife.com - A community for Conway's Game of Life and related cellular automata
Home  •  LifeWiki  •  Forums  •  Download Golly

Trouble loading Python library

For scripts to aid with computation or simulation in cellular automata.

Trouble loading Python library

Postby Ethanagor » March 20th, 2017, 7:02 pm

Hello! I'm not sure if this is necessary to start a thread for (or if this even fits under this forum), but I am having trouble getting Python scripts to work. I have two versions of Python installed, one of which is the default. I have tried typing the names of both versions, and when that didn't work I tried typing the full paths to both DLL files. However, I still cannot get Golly to be able to access the python library. Does anyone know what the problem might be?

Thanks in advance, and I apologize for my ignorance.

~Ethan :D
"It's not easy having a good time. Even smiling makes my face ache." - Frank N. Furter
Ethanagor
 
Posts: 78
Joined: March 15th, 2017, 7:34 pm
Location: the Milky Way galaxy

Re: Trouble loading Python library

Postby dvgrn » March 20th, 2017, 7:33 pm

Ethanagor wrote:I have two versions of Python installed, one of which is the default.

More specifics, please!

1) What are the version numbers of the two Python versions?
2a) If possible, what are the names of the downloaded executables used to install those Python versions?
This is one easy way to see whether you have 32-bit or 64-bit versions of Python installed.
2b) If you don't have the installer executables handy, go to a Python command line and enter

import sys; print (sys.version)

3) What version of Golly did you download? There are 32-bit and 64-bit versions. If you try running 32-bit Golly with 64-bit Python or vice versa, it won't work (and unfortunately Golly will be kind of mysterious about it).
dvgrn
Moderator
 
Posts: 3927
Joined: May 17th, 2009, 11:00 pm
Location: Madison, WI

Re: Trouble loading Python library

Postby Ethanagor » April 1st, 2017, 9:25 pm

I have 32 bit golly and 64 bit python. Oops. Sorry about that.

Edit: Still not working. I am having trouble locating the python library still. Excuse my ignorance.
"It's not easy having a good time. Even smiling makes my face ache." - Frank N. Furter
Ethanagor
 
Posts: 78
Joined: March 15th, 2017, 7:34 pm
Location: the Milky Way galaxy

Re: Trouble loading Python library

Postby dvgrn » April 1st, 2017, 10:44 pm

dvgrn wrote:More specifics, please!

1) What are the version numbers of the ... Python versions?
2a) If possible, what are the names of the downloaded executables used to install those Python versions?
3) What version of Golly did you download?
dvgrn
Moderator
 
Posts: 3927
Joined: May 17th, 2009, 11:00 pm
Location: Madison, WI

Re: Trouble loading Python library

Postby Ethanagor » April 2nd, 2017, 4:18 pm

1)3.5.2
2)python-3.5.2
3)golly-2.8-win-32bit
"It's not easy having a good time. Even smiling makes my face ache." - Frank N. Furter
Ethanagor
 
Posts: 78
Joined: March 15th, 2017, 7:34 pm
Location: the Milky Way galaxy

Re: Trouble loading Python library

Postby Goldtiger997 » April 2nd, 2017, 7:06 pm

Ethanagor wrote:2)python-3.5.2


Aha, there's your problem. Golly requires python-2.x not python-3.x. However, not all versions of python-2.x work, so do get the latest version: python 2.7.13.
User avatar
Goldtiger997
 
Posts: 309
Joined: June 21st, 2016, 8:00 am
Location: 11.329903°N 142.199305°E

Re: Trouble loading Python library

Postby Ethanagor » April 2nd, 2017, 7:50 pm

Goldtiger997 wrote:get the latest version: python 2.7.13.


ALright, I have that installed now. One final problem: I still cannot figure out which file I have to give Golly the path to. I searched the directory for python27.dll and python2713.dll and neither brought up any results. Any advice?

For the final time (hopefully) please excuse my ineptitude. I am shame.
"It's not easy having a good time. Even smiling makes my face ache." - Frank N. Furter
Ethanagor
 
Posts: 78
Joined: March 15th, 2017, 7:34 pm
Location: the Milky Way galaxy

Re: Trouble loading Python library

Postby dvgrn » April 2nd, 2017, 11:36 pm

Ethanagor wrote:ALright, I have that installed now. One final problem: I still cannot figure out which file I have to give Golly the path to. I searched the directory for python27.dll and python2713.dll and neither brought up any results. Any advice?

Well, just keep being specific. Are you getting any error messages this time?

Also, what was the name of the Python executable you downloaded this time? It has to be the 32-bit version. (Just checking -- no point in looking for exotic problems when it's usually one of the simple ones.)

Are you finding and typing in a full path and filename, or just "python27.dll"? Search your C: drive for "python27.dll" and try entering the full path. A C:\Windows\ subdirectory is the usual place -- C:\Windows\System32\python27.dll is where Windows puts 64-bit DLLS -- don't ask me to explain why the "32"! -- but if you've installed the right Python for the Golly you say you're running, it would more likely be found at C:\Windows\SysWOW64\python27.dll where 32-bit DLLs are kept (thanks again, Microsoft, for the nice clear naming conventions).
dvgrn
Moderator
 
Posts: 3927
Joined: May 17th, 2009, 11:00 pm
Location: Madison, WI

Re: Trouble loading Python library

Postby Ethanagor » April 3rd, 2017, 7:16 pm

The only message I'm getting is the typical "library could not be located" dialogue box. The executable this time is called "python-2.7.13". Finally, I intentionally set the directory to C:\Python, which I did a search of to no avail. I used the search terms "python27.dll" and "python2713.dll". Neither brought up any results. I did a manual search of the "DLLs" file under C:\Python, but still saw nothing... I have a really terrible computer (I would rather use a Commodore 64, it would have more functionality), which might be part of the problem.
"It's not easy having a good time. Even smiling makes my face ache." - Frank N. Furter
Ethanagor
 
Posts: 78
Joined: March 15th, 2017, 7:34 pm
Location: the Milky Way galaxy

Re: Trouble loading Python library

Postby calcyman » April 3rd, 2017, 7:55 pm

Ethanagor wrote:I have a really terrible computer (I would rather use a Commodore 64, it would have more functionality), which might be part of the problem.


In that case, maybe try this?

  • Install the cc65 compiler.
  • Compile Python from source using cc65.
  • Copy the resulting 6502 machine code onto a 5¼-inch floppy disk.
  • Insert the aforementioned floppy and boot your machine.
  • Type LOAD "B*",8,1 into the command prompt.
  • Type RUN at the next command prompt.

Getting this to work with Golly might be impossible -- I'm not sure that wxWidgets (Golly's GUI library) is C64-compatible, although it does claim to be cross-platform.
What do you do with ill crystallographers? Take them to the mono-clinic!
User avatar
calcyman
 
Posts: 1330
Joined: June 1st, 2009, 4:32 pm

Re: Trouble loading Python library

Postby rowett » April 4th, 2017, 1:47 am

Code: Select all
x = 448, y = 288, rule = LifeHistory
448F$448F$448F$448F$448F$448F$448F$448F$448F$448F$448F$448F$448F$448F
$448F$448F$448F$448F$448F$448F$448F$448F$448F$448F$448F$448F$448F$
448F$448F$448F$448F$448F$448F$448F$448F$448F$448F$448F$448F$448F$64F
320.64F$64F320.64F$64F320.64F$64F320.64F$64F320.64F$64F320.64F$64F
320.64F$64F320.64F$64F74.4A4.4A3.2A3.2A.2A3.2A2.4A3.4A5.4A3.5A3.6A11.
4A6.2A11.5A5.2A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A3.2A2.2A10.2A2.2A
2.2A2.2A2.2A3.2A10.4A5.2A5.4A5.2A4.6A2.2A3.2A18.4A4.4A4.4A3.6A2.6A10.
5A3.2A2.2A3.4A4.4A4.4A11.5A5.2A6.2A4.6A3.4A11.2A6.2A2.2A2.6A2.6A9.64F
$64F320.64F$64F320.64F$64F320.64F$64F320.64F$64F320.64F$64F320.64F$
64F320.64F$64F320.64F$64F320.64F$64F.5A3.6A4.2A4.4A4.2A2.2A281.64F$
64F.2A2.2A2.2A7.4A3.2A.2A3.2A2.2A281.64F$64F.2A2.2A2.2A6.2A2.2A2.2A2.
2A2.2A2.2A281.64F$64F.5A3.4A4.6A2.2A2.2A3.4A282.64F$64F.4A4.2A6.2A2.
2A2.2A2.2A4.2A283.64F$64F.2A.2A3.2A6.2A2.2A2.2A.2A5.2A6.2A275.64F$64F
.2A2.2A2.6A2.2A2.2A2.4A6.2A6.2A275.64F$64F320.64F$64F.2A7.4A5.2A4.4A
4.2A2.2A2.2A7.4A3.6A2.6A2.2A2.2A3.4A3.6A2.2A3.2A.6A2.5A3.2A2.2A11.4A
13.2A163.64F$64F.2A6.2A2.2A3.4A3.2A.2A3.2A2.2A2.2A8.2A4.2A6.2A6.2A2.
2A4.2A4.2A6.2A3.2A.2A6.2A2.2A2.2A2.2A10.2A2.2A12.2A163.64F$64F.2A6.2A
2.2A2.2A2.2A2.2A2.2A2.2A2.2A2.2A8.2A4.2A6.2A6.2A2.2A4.2A4.2A6.2A3.2A.
2A6.2A2.2A2.2A2.2A10.2A2.2A11.3A163.64F$64F.2A6.2A2.2A2.6A2.2A2.2A10.
2A8.2A4.4A4.4A4.2A2.2A4.2A4.4A4.2A.A.2A.4A4.5A20.4A13.2A163.64F$64F.
2A6.2A2.2A2.2A2.2A2.2A2.2A10.2A8.2A4.2A6.2A6.2A2.2A4.2A4.2A6.7A.2A6.
4A15.2A3.2A2.2A5.2A5.2A163.64F$64F.2A6.2A2.2A2.2A2.2A2.2A.2A11.2A8.2A
4.2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2.2A10.6A3.4A3.2A6.6A4.2A5.4A3.6A2.2A3.2A.6A2.2A2.2A129.64F$64F320.
64F$64F.2A7.4A5.2A4.4A5.4A3.2A2.2A3.4A266.64F$64F.2A6.2A2.2A3.4A3.2A.
2A5.2A4.3A.2A2.2A2.2A265.64F$64F.2A6.2A2.2A2.2A2.2A2.2A2.2A4.2A4.6A2.
2A269.64F$64F.2A6.2A2.2A2.6A2.2A2.2A4.2A4.6A2.2A.3A265.64F$64F.2A6.2A
2.2A2.2A2.2A2.2A2.2A4.2A4.2A.3A2.2A2.2A265.64F$64F.2A6.2A2.2A2.2A2.2A
2.2A.2A5.2A4.2A2.2A2.2A2.2A265.64F$64F.6A3.4A3.2A2.2A2.4A5.4A3.2A2.2A
3.4A266.64F$64F320.64F$64F.5A3.6A4.2A4.4A4.2A2.2A281.64F$64F.2A2.2A2.
2A7.4A3.2A.2A3.2A2.2A281.64F$64F.2A2.2A2.2A6.2A2.2A2.2A2.2A2.2A2.2A
281.64F$64F.5A3.4A4.6A2.2A2.2A3.4A282.64F$64F.4A4.2A6.2A2.2A2.2A2.2A
4.2A283.64F$64F.2A.2A3.2A6.2A2.2A2.2A.2A5.2A6.2A275.64F$64F.2A2.2A2.
6A2.2A2.2A2.4A6.2A6.2A275.64F$64F320.64F$64F.5A3.2A2.2A2.2A2.2A297.
64F$64F.2A2.2A2.2A2.2A2.3A.2A297.64F$64F.2A2.2A2.2A2.2A2.6A297.64F$
64F.5A3.2A2.2A2.6A297.64F$64F.4A4.2A2.2A2.2A.3A297.64F$64F.2A.2A3.2A
2.2A2.2A2.2A297.64F$64F.2A2.2A3.4A3.2A2.2A297.64F$64F320.64F$64F8A
312.64F$64F8A312.64F$64F8A312.64F$64F8A312.64F$64F8A312.64F$64F8A312.
64F$64F8A312.64F$64F8A312.64F$64F320.64F$64F320.64F$64F320.64F$64F
320.64F$64F320.64F$64F320.64F$64F320.64F$64F320.64F$64F320.64F$64F
320.64F$64F320.64F$64F320.64F$64F320.64F$64F320.64F$64F320.64F$64F
320.64F$64F320.64F$64F320.64F$64F320.64F$64F320.64F$64F320.64F$64F
320.64F$64F320.64F$64F320.64F$64F320.64F$64F320.64F$64F320.64F$64F
320.64F$64F320.64F$64F320.64F$64F320.64F$64F320.64F$64F320.64F$64F
320.64F$64F320.64F$64F320.64F$64F320.64F$64F320.64F$64F320.64F$64F
320.64F$64F320.64F$64F320.64F$64F320.64F$64F320.64F$64F320.64F$64F
320.64F$64F320.64F$64F320.64F$64F320.64F$64F320.64F$64F320.64F$64F
320.64F$64F320.64F$64F320.64F$64F320.64F$64F320.64F$64F320.64F$64F
320.64F$64F320.64F$64F320.64F$64F320.64F$64F320.64F$64F320.64F$64F
320.64F$64F320.64F$64F320.64F$64F320.64F$64F320.64F$64F320.64F$64F
320.64F$64F320.64F$64F320.64F$64F320.64F$64F320.64F$64F320.64F$64F
320.64F$64F320.64F$64F320.64F$64F320.64F$64F320.64F$64F320.64F$64F
320.64F$64F320.64F$64F320.64F$64F320.64F$64F320.64F$64F320.64F$64F
320.64F$64F320.64F$64F320.64F$64F320.64F$64F320.64F$64F320.64F$64F
320.64F$64F320.64F$64F320.64F$64F320.64F$64F320.64F$64F320.64F$64F
320.64F$64F320.64F$64F320.64F$64F320.64F$64F320.64F$448F$448F$448F$
448F$448F$448F$448F$448F$448F$448F$448F$448F$448F$448F$448F$448F$448F
$448F$448F$448F$448F$448F$448F$448F$448F$448F$448F$448F$448F$448F$
448F$448F$448F$448F$448F$448F$448F$448F$448F$448F!
#C [[ COLOR ON 160 160 255 COLOR ALIVE 160 160 255 COLOR DEAD 64 64 224 COLOR KILL 160 160 255 ZOOM 2 GPS 2 THUMBSIZE 2 THUMBNAIL ]]
rowett
Moderator
 
Posts: 722
Joined: January 31st, 2013, 2:34 am
Location: UK

Re: Trouble loading Python library

Postby rowett » April 4th, 2017, 3:16 am

Ethanagor wrote:The only message I'm getting is the typical "library could not be located" dialogue box. The executable this time is called "python-2.7.13". Finally, I intentionally set the directory to C:\Python, which I did a search of to no avail. I used the search terms "python27.dll" and "python2713.dll". Neither brought up any results. I did a manual search of the "DLLs" file under C:\Python, but still saw nothing... I have a really terrible computer (I would rather use a Commodore 64, it would have more functionality), which might be part of the problem.

Assuming you ran the Python windows installer the python27.dll file will be in the C:\Windows\System32 or C:\Windows\SysWOW64 directory depending on 64bit or 32bit version. It will not be in the C:\Python folder.
rowett
Moderator
 
Posts: 722
Joined: January 31st, 2013, 2:34 am
Location: UK

Re: Trouble loading Python library

Postby Ethanagor » April 4th, 2017, 5:41 pm

First of all, just so we're clear, I'm not actually using a C64. It was just an analogy. I have a modern computer, it just sucks. It's like 5 years old, but it was kinda on the cheap end.

Second, if it's really gonna be a big process I'll just use LUA. No APG search, but I can survive as long as I have two or three neighbors.

Third, C:\Windows\System32 does not have a python directory. I checked. C:\Python is full of files, but I can't find anything relevant.
"It's not easy having a good time. Even smiling makes my face ache." - Frank N. Furter
Ethanagor
 
Posts: 78
Joined: March 15th, 2017, 7:34 pm
Location: the Milky Way galaxy

Re: Trouble loading Python library

Postby rowett » April 4th, 2017, 6:23 pm

Ethanagor wrote:C:\Windows\System32 does not have a python directory. I checked. C:\Python is full of files, but I can't find anything relevant.

If you're using 32bit Golly you need 32bit Python 2.7.

Get Python 2.7.13 by going to this page and downloading the Windows x86 MSI installer.

Once downloaded run the Windows x86 MSI installer and it will do two things:
1. Create a C:\Python27 directory and put a load of files in it (not including python27.dll)
2. Create the following file: C:\Windows\System32\python27.dll or C:\Windows\SysWOW64\python27.dll

If the file in step 2 is missing then try downloading and running the installer again. Golly needs the file in step 2 to run Python scripts.

Good luck!
rowett
Moderator
 
Posts: 722
Joined: January 31st, 2013, 2:34 am
Location: UK


Return to Scripts

Who is online

Users browsing this forum: No registered users and 1 guest