Nieuws:

Welkom, Gast. Alsjeblieft inloggen of registreren.
Heb je de activerings-mail niet ontvangen?

Auteur Topic: import vpython in Thonny  (gelezen 1246 keer)

import vpython in Thonny
« Gepost op: 2021/07/05, 16:49:53 »
Ik probeer vpython te importeren in python 3.7.9
zie afbeelding lijn 2



Maar krijg foutmelding:
from vpython import *
ModuleNotFoundError: No mudule named 'vpython'
    :'(


Heb al geprobeerd met
pip install vpythonen met pip3 install vpython
Dit geeft geen foutmelding(en)
Toch lukt het niet in het script.

Hoe doe ik ik wel goed?   ^-^

𝕸𝖎𝖘𝖈𝖊𝖗𝖊 𝖚𝖙𝖎𝖑𝖊 𝖉𝖚𝖑𝖈𝖎. (Ter leering ende vermaeck)
𝕹𝖎𝖑 𝖛𝖔𝖑𝖊𝖓𝖙𝖎𝖇𝖚𝖘 𝖆𝖗𝖉𝖚𝖚𝖒. (Niets is moeilijk voor hen die willen)
https://henk.oegema.com  (Op RaspberryPi2)
Registered linux user 520520.  In gebruik: Ubuntu  24.04 Hobby's: Radio Amateur callsign: PA2HO.  Interesses: Raspberry Pi & Arduino & TELLO drone (voor AI)

Re: import vpython in Thonny
« Reactie #1 Gepost op: 2021/07/08, 16:32:23 »
In Thonny wil het niet lukken.   :|
Maar........in IDLE lukt het wel     :D

Ik beschouw dit topic dus maar als 'Opgelost'
𝕸𝖎𝖘𝖈𝖊𝖗𝖊 𝖚𝖙𝖎𝖑𝖊 𝖉𝖚𝖑𝖈𝖎. (Ter leering ende vermaeck)
𝕹𝖎𝖑 𝖛𝖔𝖑𝖊𝖓𝖙𝖎𝖇𝖚𝖘 𝖆𝖗𝖉𝖚𝖚𝖒. (Niets is moeilijk voor hen die willen)
https://henk.oegema.com  (Op RaspberryPi2)
Registered linux user 520520.  In gebruik: Ubuntu  24.04 Hobby's: Radio Amateur callsign: PA2HO.  Interesses: Raspberry Pi & Arduino & TELLO drone (voor AI)

Offline bart85

  • Lid
Re: import vpython in Thonny
« Reactie #2 Gepost op: 2021/07/08, 17:00:46 »
De modules die je gebruikt moet de directory ervan in PYTHONPATH staan. Of toevoegen aan sys.path
Je leert maar mooi over weg gaan met de commandline.
Linus: "I'm happy with the people who are wandering around looking at the stars but I am looking at the ground and I want to fix the pothole before I fall in."
I look to the clouds behind me and see the thunder coming.

Re: import vpython in Thonny
« Reactie #3 Gepost op: 2021/07/12, 15:33:14 »
De modules die je gebruikt moet de directory ervan in PYTHONPATH staan. Of toevoegen aan sys.path

Heb even moeten zoeken hoe ik iets aan sys.path moet toevoegen, maar heb het uiteindelijk gevonden.   ^-^
𝕸𝖎𝖘𝖈𝖊𝖗𝖊 𝖚𝖙𝖎𝖑𝖊 𝖉𝖚𝖑𝖈𝖎. (Ter leering ende vermaeck)
𝕹𝖎𝖑 𝖛𝖔𝖑𝖊𝖓𝖙𝖎𝖇𝖚𝖘 𝖆𝖗𝖉𝖚𝖚𝖒. (Niets is moeilijk voor hen die willen)
https://henk.oegema.com  (Op RaspberryPi2)
Registered linux user 520520.  In gebruik: Ubuntu  24.04 Hobby's: Radio Amateur callsign: PA2HO.  Interesses: Raspberry Pi & Arduino & TELLO drone (voor AI)