|
From: Tiger12506 <ke...@ja...> - 2007-07-26 15:00:04
|
Python 2.5.1 (r251:54863, Apr 18 2007, 08:51:08) [MSC v.1310 32 bit (Intel)]
on win32
Type "copyright", "credits" or "license()" for more information.
****************************************************************
Personal firewall software may warn about the connection IDLE
makes to its subprocess using this computer's internal loopback
interface. This connection is not visible on any external
interface and no data is sent to or received from the Internet.
****************************************************************
IDLE 1.2.1
>>> from visual import *
Traceback (most recent call last):
File "<pyshell#0>", line 1, in <module>
from visual import *
File "C:\Python25\lib\site-packages\visual\__init__.py", line 24, in
<module>
import crayola
ImportError: No module named crayola
>>>
What is happening? Changing this to import visual.crayola didn't help
either.
Adding this to the top of __init__.py caused this to happen.
sys.path.append("C:/python25/lib/site-packages/visual/")
>>> from visual import *
Traceback (most recent call last):
File "<pyshell#0>", line 1, in <module>
from visual import *
File "C:\Python25\lib\site-packages\visual\__init__.py", line 29, in
<module>
from visual.primitives import arrow, cylinder, cone, sphere, box, ring,
label
ImportError: No module named primitives
>>>
Previous installations of python and vpython have worked together.
This is the content of sys.path
C:\python25
C:\WINDOWS\system32\python25.zip
C:\Python25\DLLs
C:\Python25\lib
C:\Python25\lib\plat-win
C:\Python25\lib\lib-tk
C:\Python25\lib\site-packages
C:\Python25\lib\site-packages\win32
C:\Python25\lib\site-packages\win32\lib
C:\Python25\lib\site-packages\Pythonwin
However, adding
C:\Python25\lib\site-packages\visual
to sys.path causes ImportError on visual.primitives
(it recognizes crayola and cvisual)
I'm tired. Why is this not working? Why can't __init__.py find crayola? They
are in the same directory!
TIA,
JS
|