1

I am using Wing IDE and I have installed VIDLE with Vpython. VIDLE works fine, but if I want to use it on Wing IDE, somehow it can't import the visual module. It always gives an error "No module named visual". How can I import the visual module into the IDE?

I thought maybe the problem lies in the version of the Vpython or the Python itself. The installed Vpython is for Python 2.7 (I've tried another one for 3.4, but the VIDLE wouldn't work with it). Both Python 2.7 and 3.4 are installed on the PC, but I don't even know which one is taken as default on the IDE. So if this really has something to do with the version, how can I change the Python path on Wing IDE?

Sorry, I am quite new in Python and I've looked everywhere but didn't come to any helpful answer. Thank you in advance.

ndha
  • 11
  • 1
  • Did you already set Python Executable in Project Properties from the Project menu? In Wing 101, this is under Configure Python in the Edit menu instead. You'll set this to the full path printed by sys.executable in the Python you want to use (do 'import sys' followed by 'sys.executable' to get the value). – Wingware Jul 14 '15 at 14:20
  • Woow, sorry for having asked such a simple question, it works now! Thank you! – ndha Jul 14 '15 at 19:21

1 Answers1

0

Instead of

import visual

use

import vpython
He3lixxx
  • 3,263
  • 1
  • 12
  • 31
  • Welcome to StackOverflow! It would be nice if you could add some context to your answer: _Why_ is this necessary? Why does it work? – He3lixxx May 29 '21 at 18:46