Hi, everyone! I'm new to python, and I'm having a few issues getting started with writing useful code on mac OSX.

I'm wanting to import a module, either wx or pygtk for GUI, but in either case I get the error that there is no such module. As far as I know, I have installed them correctly.

However, typing in help('modules') into IDLE shows no module for wx or anything else.

How can I go about finding where these modules are installed, and how can I let python know? Also, how can I set the current version of python for my machine?

Any help would be greatly appreciated; I have been at it for hours. :-/


Recommended Answers

All 3 Replies

you can search for the modules in the file search. It seems like a path problem.

Ok, so I search pygtk and a number of folders come up. Could you be a little more specific as to what a "path" problem is? How do I modify the path, and in what way so that it includes the desired module?

You should revisit your install and see what went wrong there, I never work on Mac, but this will make a fix.

A slightly less convenient way is to edit the site.py file in Python’s standard library, and modify sys.path. site.py is automatically imported when the Python interpreter is executed, unless the -S switch is supplied to suppress this behaviour. So you could simply edit site.py and add two lines to it:

import sys


Not the doc I was searching but it serves your needs.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, learning, and sharing knowledge.