|
From: Bruce S. <Bru...@nc...> - 2007-07-26 18:30:03
|
This is very odd, though I think I've heard of it happening before. I
don't know what causes it. The first thing to try is to uninstall Visual
and then reinstall it. If that doesn't work, uninstall Visual, uninstall
Python itself, then reinstall Python, and finally reinstall Visual.
Though it's probably irrelevant, you need to have site-packages on the
Python module search path, not site-packages/visual, and it seems to be
there.
Bruce Sherwood
Tiger12506 wrote:
> 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
>
>
>
> -------------------------------------------------------------------------
> This SF.net email is sponsored by: Splunk Inc.
> Still grepping through log files to find problems? Stop.
> Now Search log events and configuration files using AJAX and a browser.
> Download your FREE copy of Splunk now >> http://get.splunk.com/
> _______________________________________________
> Visualpython-users mailing list
> Vis...@li...
> https://lists.sourceforge.net/lists/listinfo/visualpython-users
|