Installing python with idle & pygame. Discussion in 'Mac Programming' started by raylang, Jan 4, 2014. Hi In installing pygame on Mac OS 10.9.5, on the install instructions page here Is that correct? There are new commands. Install pygame on Mac OS X- Why are there new current instructions? Hi In installing pygame on Mac OS 10.9.5. Where must it install to? The Python 3.3.3 root folder? Must I forget the install zip and rely on the.
I'm not following a guide, but I have followed about 20 - No exaggeration. Here's the error I am getting: ERROR 1: Terminal - COMMAND: import pygame File ', line 1, in File '/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/pygame/init.py', line 95, in from pygame.base import. ImportError: dlopen(/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/pygame/base.so, 2): no suitable image found.
Did find: /Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/pygame/base.so: no matching architecture in universal wrapper ERROR 2: IDLE (all versions) - COMMAND: import pygame Traceback (most recent call last): File ', line 1, in import pygame ImportError: No module named 'pygame' Any idea as to what is going on? Terminal is V2.7.3 of Python. [email protected] 8/6/2013, 10:58 น. Eam onn: ImportError: dlopen(/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/pygame/base.so, 2): no suitable image found.
Did find: /Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/pygame/base.so: no matching architecture in universal wrapper This is saying that the version of Python you are using is a different architecture to the installed pygame library. This could be because you are using a 64-bit version of Python with a 32-bit library or vice-versa.
Or you have a PowerPC library and Python is compiled for Intel processors. In Terminal, you can find the architecture of files with 'otool -vh' followed by the file name. So try (on one line) otool -vh /Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/pygame/base.so And the same with Python, first finding where Python is with whereis python Then post all of the output text, not just your interpretation. Neil [email protected] 24/4/2014, 8:32 น. On Saturday, June 8, 2013 9:37:44 PM UTC+5:30, Eam onn wrote: Perhaps this isn't the right place to post this, but it's the only place I could find. I asked yesterday or the day before about Python Game Development, and have found a few tutorials on PyGame.
Now I have a bigger problem: HOW THE HECK DO I INSTALL PYGAME!?!?! System Details:. Mac OS X 10.8.4 Mountain Lion.
4GB DDR3 RAM I do have Window's installed, as well as Ubuntu 11.04 but I would like to use Mac OS X if possible. I've tried using MacPorts, Fink, the Mac DMG, source installing, installing NumPY, just about every way possible. I can't seem to get it working, I keep getting an error in all my versions of IDLE.
I've tried:. IDLE 2.5. IDLE 2.7.2.
IDLE 2.7.3. IDLE 3.1. IDLE 3.3.1 Terry Reedy 24/4/2014, 12:15 น. On 4/24/2014 11:32 AM, wrote: When you post, please do more than just quote.
![]()
If you are relaying a private email, please say so. On Saturday, June 8, 2013 9:37:44 PM UTC+5:30, Eam onn wrote: I did not see the original post, if indeed there was a public one.
snip pygame/numpy problems. I do have Window's installed, as well as Ubuntu 11.04 but I would like to use Mac OS X if possible.
I've tried using MacPorts, Finkthe Mac DMG, source installing, installing NumPY, just about every way possible. I can't seem to get it working, I keep getting an error in all my versions of IDLE. I've tried:. IDLE 2.5. IDLE 2.7.2. IDLE 2.7.3. IDLE 3.1.
IDLE 3.3.1 Idle depends on tkinter. Tkinter depends on having a tcl/tk that works, at least for tkinter. The following page has essential info about getting the right tcl/tk installed. Terry Jan Reedy Steven D'Aprano 24/4/2014, 18:17 น. Wrote: On Saturday, June 8, 2013 9:37:44 PM UTC+5:30, Eam onn wrote: Now I have a bigger problem: HOW THE HECK DO I INSTALL PYGAME!?!?! System Details: I've tried using MacPorts, Fink, the Mac DMGsource installing, installing NumPY, just about every way possible. My advice would be to steer clear of things like Fink and MacPorts and do things the native MacOSX way wherever possible.
That means using a framework installation of Python and framework versions of the various libraries that PyGame uses. There are a number of steps to getting pygame working: 1) Make sure you have a working framework installation of an appropriate version of Python. I installed mine from source, but a binary installation should work too.
Depending on your MacOSX version, the system python might be sufficient. 2) Install framework versions of the SDL library and other libraries that pygame uses. You may need to hunt around a bit, but you should be able to find DMG installers for all of these.
In my /Library/Frameworks I have: SDL.framework SDL-QD.framework SDLimage.framework SDLmixer.framework SDLnet.framework SDLttf.framework 3) Install pygame itself with the usual 'python setup.py install'. If you have all the relevant libraries, the installer will auto detect them and use them. At the end, it will tell you which ones it couldn't find. Pygame will work without some of them, but those features won't be available. You can add more libraries and run setup.py again if you need to. 4) Specific games may require other Python libraries such as Numpy etc.
Greg Gregory Ewing 24/4/2014, 18:47 น. In article, Gregory Ewing wrote: My advice would be to steer clear of things like Fink and MacPorts and do things the native MacOSX way wherever possible. That means using a framework installation of Python and framework versions of the various libraries that PyGame uses. FYI, MacPorts Pythons are framework installations. And I disagree that installing a bunch of disparate software from various sources via binary installers and/or source is to be preferred to a modern third-party package manager on OS X like MacPorts or Homebrew.
That's just setting yourself up for a long-term maintenance headache. What could be easier than: sudo port install py27-game - Ned Deily, Ryan Hiebert 24/4/2014, 20:59 น. I'd love to hear more about Greg's take on MacPorts. I've chosen to use MacPorts because it keeps things separate, because when things get hosed using the system libraries, I don't have to erase my whole system to get back to a 'vanilla' OS X install. Unfortunately, it seems like the differences in which libraries are used, what options are enabled at library build time, etc, make it difficult to ensure that things always work when you try to use the stuff built-in to the system, and untangling the Homebrew mess can be painful. Gregory Ewing 25/4/2014, 16:42 น.
Ned Deily wrote: I disagree that installing a bunch of disparate software from various sources via binary installers and/or source is to be preferred to a modern third-party package manager on OS X like MacPorts or Homebrew. That's just setting yourself up for a long-term maintenance headache. What could be easier than: sudo port install py27-game That's fine if it works, but the OP said he'd already tried various things like that and they.didn't. work for him. And I've had trouble in the past with MacPorts and/or Fink (can't remember exactly which one it was) installing libraries that were incompatible with other things I use and messing them up, so I've learned to be wary of them. Those problems were probably due to some unusual features of my setup, and wouldn't occur for most other people. But because I don't use those tools, I can't give any recommendations about how to troubleshoot them.
All I can do is explain what works for me. Greg Gregory Ewing 25/4/2014, 16:57 น. Ryan Hiebert wrote: I've chosen to use MacPorts because it keeps things separate, because when things get hosed using the system libraries, I don't have to erase my whole system to get back to a 'vanilla' OS X install.
I don't know what you're doing to hose your system that badly. I've never had a problem that couldn't be fixed by deleting whatever the last thing was I added that caused it.
Also the problems I had with one of the third-party package managers was because it.didn't. keep its own stuff properly separated. It installed libraries on my regular library path so that they got picked up by things that they weren't appropriate for. I'm not saying that MacPorts is a bad thing. If it's the.only. thing you use, it's probably fine.
But I use a wide variety of libraries, not all of them available that way, and many of them installed from source, and I find it's less hassle overall to do everything the native MacOSX way wherever possible. Greg Andrea D'Amore 25/4/2014, 23:57 น.
On 2014-04-25 23:57:21 +0000, Gregory Ewing said: I don't know what you're doing to hose your system that badly. I've never had a problem that couldn't be fixed by deleting whatever the last thing was I added that caused it. The actual problem with the 'native MacOSX way' is that there's no official way to uninstall a package once it's installed.
Also the problems I had with one of the third-party package managers was because it.didn't. keep its own stuff properly separated. It installed libraries on my regular library path so that they got picked up by things that they weren't appropriate for. This most likely was not MacPorts, its default install path is not checked by dyld by default.
But I use a wide variety of libraries, not all of them available that wayand many of them installed from source, and I find it's less hassle overall to do everything the native MacOSX way wherever possible. Well, the 'native' MacOSX way would probably be registering a package via installer(8) not compiling from source. As long as you're comfortable with your system then it's good for you.
In my experience the more libraries/software I install the more useful a package manager becomes in terms of stray files left when upgrading or uninstalling. I use a mix of MacPorts to provide the base tools and virtualenv for project-specific pypi libraries. Andrea Andrea D'Amore 26/4/2014, 0:07 น.
![]()
On 2014-04-25 23:42:33 +0000, Gregory Ewing said: That's fine if it works, but the OP said he'd already tried various things like that and they.didn't. work for him. By reading the 'original' message (the empty reply with full quote of a ten months earlier message) I couldn't figure what the OP actually did, he says 'just about every way possible', or what his 'an error' actually is. Most likely all those methods are good, I'd rather fix any of those by providing further info than switch to another one looking for a magical solution.
Comments are closed.
|
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |