[PythonCAD] newbie install can't find Generic.globals
Art Haas
ahaas at airmail.net
Tue Feb 24 19:08:59 EST 2004
On Tue, Feb 24, 2004 at 05:17:53PM -0600, Bud Rogers wrote:
> Greetings,
>
> Just saw the release announcement on c.l.p, thought I would have a look
> at pythoncad. I followed the installation instructions on the web
> page. If I run gtkpycad.py from the source directory, it seems to work
> OK. If I run it from its installed location in /usr/local/bin, I get
> this error:
>
> budr at twocups:~$ which gtkpycad.py
> /usr/local/bin/gtkpycad.py
> budr at twocups:~$ gtkpycad.py
> Traceback (most recent call last):
> File "/usr/local/bin/gtkpycad.py", line 31, in ?
> import Generic.globals
> ImportError: No module named Generic.globals
>
> I know just enough about python to whet my appetite. What have I
> overlooked?
>
It sounds like Python can't find the code in it's built-in search path.
What do you see when you do the following ...
$ python
>>> import sys
>>> sys.path
You should see a list of directories. These are the directories that
Python will search when a bit of code uses an 'import' statement.
On my machine I get the following ...
>>> import sys
>>> sys.path
['', '/usr/lib/python23.zip', '/usr/lib/python2.3',
'/usr/lib/python2.3/plat-linux2', '/usr/lib/python2.3/lib-tk',
'/usr/lib/python2.3/lib-dynload', '/usr/lib/python2.3/site-packages',
'/usr/lib/python2.3/site-packages/PythonCAD',
'/usr/lib/python2.3/site-packages/gtk-2.0']
Notice that '/usr/lib/python2.3/site-packages/PythonCAD' is in the list.
That directory is where the 'install.py' script put the files when I run
the install command 'python setup.py install'.
Art
--
Man once surrendering his reason, has no remaining guard against absurdities
the most monstrous, and like a ship without rudder, is the sport of every wind.
-Thomas Jefferson to James Smith, 1822
More information about the PythonCAD
mailing list