Re: beginners guide to coding nodes?
Hello, Mac user in question reporting in. Thanks for your help, guys.
Last time we tried to crack this was Jan. 3rd. We tested fog on my OS X partition (10.6 if you're wondering, right now it's 10.6.6 to be perfectly specific), using ORPG 1.7.6 which had failed whenever fog came up before. We tried it, and Python quit.
Quote:
me: Wait.
Uh oh.
I think I know what's wrong. Link me again to the ORPG download page please?
I didn't update the versions of Python or wxPython I use.
Tempest: That'll do it!
me: Did those update? I dunno.
Tempest:
http://www.rpgobjects.com/index.php?c=orpg&m=getorpgthey only update if you use a file that bundles them. There isn't one for OSX.
The *nix/OSX instructions should work, though.
me: All right.
Brian: It will be important: Match the kernel types. If your OSX is 32bit (I think it is), use 32bit Python and wxPython.
me: It says to use one for OS X version 10.6 and later.
I downloaded that...
Brian: Also, there are big differences between version 2 and version 3 of Python. 2.7 should work. 3 should not.
I don't know how to check kernel type on OSX... or if 10.6 is natively 32 or 64-bit.
me: Didn't get 3. 2.7.1 is what I'm downloading.
We found out about the workaround Paul just mentioned
here. So I reinstalled Python with a new version, and before reinstalling wxPython, I navigated in Terminal to where I installed Python 2.7.1,
Quote:
Tempest: Just about everything will appear there. Hopefully it's /Applications and not /USER/Applications (with your name instead of USER).
(The former reflects a Mac login that has root access, the latter doesn't.)
me: I can drag and drop the file into terminal after the cd command, so I'm sure I'm there.
and I typed in this as Tempest told me:
Quote:
defaults write com.apple.versioner.python Prefer-32-Bit 1
Which I note is very similar to what you suggest in that link, Paul, but slightly different. We got it wrong I guess.
Anyways, I entered that exact command and got no response (including no error message), so next step was to install wxPython. I had not uninstalled anything prior to that point. I downloaded ORPG 1.8.0, IIRC, and gave it a whirl.
Quote:
me: WTF?
Tempest: ?
me: Terminal isn't cooperating.
Tempest: It shouldn't be a problem...
Wait, do you have a prompt, or is it locked up without a cursor?
me: It gives me an error message when I input "python2.7 start_client.py"
That message was:
Quote:
File "/usr/local/lib/wxPython-unicode-2.8.11.0/lib/python2.7/site-packages/wx-2.8-mac-unicode/wx/_core.py", line 4, in <module>
import core_
ImportError: dlopen(/usr/local/lib/wxPython-unicode-2.8.11.0/lib/python2.7/site-packages/wx-2.8-mac-unicode/wx/_core.so, 2): no suitable image found. Did find:
/usr/local/lib/wxPython-unicode-2.8.11.0/lib/python2.7/site-packages/wx-2.8-mac-unicode/wx/_core_.so: no matching architecture in universal wrapper
michel-fiallo-perezs-macbook-122:OpenRPG1.8.0 Mich$ python2.7 start_client.py
/Library/Frameworks/Python.framework/Versions/2.7/Resources/Python.app/Contents/MacOS/Python: can't open file 'start_client.py': [Errno 2] No such file or directory
This, to put it lightly, threw us off.
Quote:
Tempest: Simplest solution is that start_client.py isn't in your Python directory but is rather in your OpenRPG directory.
Hmm. That's weird.
me: That's where it is.
And where I am opening it.
Like the ORPG site tells me to.
So I did a full uninstall of everything MacPython and wxPython in my machine, including sudo rm deletions of the same, in usr/lib, usr/local/lib, usr/bin, and usr/local/bin. Then I logged out of terminal. Installed Python 2.7.1, used the "defaults" command as I had before, installed wxPython (newest version, don't recall which), and then ORPG 1.8.0 again. Entered "python2.7 start_client.py" in Terminal and crossed my fingers.
Quote:
import core_
ImportError: dlopen(/usr/local/lib/wxPython-unicode-2.8.11.0/lib/python2.7/site-packages/wx-2.8-mac-unicode/wx/_core.so, 2): no suitable image found. Did find:
/usr/local/lib/wxPython-unicode-2.8.11.0/lib/python2.7/site-packages/wx-2.8-mac-unicode/wx/_core_.so: no matching architecture in universal wrapper
This was getting irritating.
Quote:
me: So.
What do I do?
Tempest: I'm working on it.
It appears to be an architecture problem again. Logout of the terminal, open it back up, and from the root directory (the one you reach by typing "cd /" with noquotes), and try the "defaults" line again. Then launch OpenRPG.
Same error message, so Tempest figured it was a 64-32 bit problem.
Quote:
Tempest: The idea is that python will always report (and prefer to run in) 64-bit mode on OSX (and only on OSX), while wxPython is precompiled for a 32-bit system. I'm trying to figure out how to get Python to run in 32-bit mode.
I think I know how to do it, but it involves repeating the uninstall process from before.
me: Oyyyyyyyy.....>____<
Tempest: There are two OSX-compatible downloads here - one is labelled for 10.6 (which is 64-bit but can emulate 32-bit, this is what you tried) and the other is for 10.3 and later (which was 32-bit only but 10.6 can run it). Use that second download, which should be available at
http://www.python.org/ftp/python/2.7.1/ ... sx10.3.dmg.
That one will install the right version of Python, but won't need any jiggery-pokery to get it to work with the 32-bit wxPython.
So we did all that, right down to the sudo rms, but *without typing in the "default" line to reset everything to 32-bit* (as we reasoned it unnecessary) and I gave it a shot.
And the installation failed.
Quote:
The following installation step failed: run postflight script for Fix system python. Contact the software manufacturer for assistance.
Tempest: Oh crap. I don't have the foggiest notion how to bypass this one.
Which is where we are now.
I'm hoping that the key mistake we made was in that one line in Terminal about setting Python to 32-bit, and that the latest attempt didn't install because I couldn't install the old version meant for OSX 10.3 on my 10.6 machine. I'm hoping that's the case and that I haven't irrevocably screwed something up. >_< I have not done ANYTHING remotely Python related, in Terminal or otherwise, since then.
Thanks for your feedback and help!