Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I am trying to do a Physics problem in python. I need to install visual python because I get the error that it can't find the visual library when I type import visual from *

The documentation on the Visual Python site is totally useless.

I have gone into synaptic package manger and installed python-visual. But I still get the same error.

Can someone please help?

share|improve this question

migrated from May 5 '10 at 22:54

This question came from our site for professional and enthusiast programmers.

Installing falls more into the realm of and, you might try your question there. (Even though it is programming-related.) – JYelton May 5 '10 at 22:36

You have to use

from visual import *

instead of

import visual from *

If that doesn't work please post the literal error messages you get when trying to do so and the output of running

apt-cache policy python-visual

in a Terminal window.

share|improve this answer
I have: from visual import * I just made a typo when asking the question. The output of the cmd you suggested is: glen@glen-laptop:~$ apt-cache policy python-visual python-visual: Installed: 1:5.12-1.1 Candidate: 1:5.12-1.1 Version table: *** 1:5.12-1.1 0 500 lucid/universe Packages 100 /var/lib/dpkg/status glen@glen-laptop:~$ Thanks, Glen. – Glen May 6 '10 at 0:03
That looks good. What error do you get if you start python from a Terminal and type "from visual import *"? – Florian Diesch May 6 '10 at 0:39
Hmmm... this is strange. It works when I run it in a cmd line. I can even draw a sphere. But when I run it from a file in IDLE I get the following error:Traceback (most recent call last): File "/home/glen/Documents/Phys1101/Planet Orbit", line 1, in <module> from visual import * ImportError: No module named visual I suspect I have multiple versions of python or something??? Perhaps I have the vpython installed for the wrong one? Any idea how I can point the one IDLE uses to the right vpython module? Thanks for your help so far! – Glen May 6 '10 at 4:18
Okay so I installed IDLE (using Python 2.6) and now it works. I had previously installed Python 2.6 on ubuntu 9.10 and then when I found there was a bug I upgraded to 10.04. I un installed Python 2.6 and installed Python 3.1. I would prefer if I could get things working with the newest version of Python. But it is working in the old version so it is not that important. Thanks for your help. I presume I need to set the Path variable for python to the right directory or make sure the python-visual package is in the python 3 folder. Although I am not sure how to do this. – Glen May 6 '10 at 6:32
apt-get install python-visual
share|improve this answer
That's doesn't change anything after installing python-visual from Synaptics like Glen did. – Florian Diesch May 5 '10 at 23:09

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .