0

Why can't I import modules into my thonny ide. I downloaded the graphics.py module but it keeps returning "no module named...

I have performed some research and I am told to place the graphics module in the same folder as my current program. What would that mean.i just opened thonny and as a beginner am testing the things I learn.which is the folder of my current program. I also learned that I could use sys.path to check the directories my ide would fetch imports from and hw to add my custom imports to the path using environment settings. Why do I still get the same failure.

30th Aug 2020, 2:10 PM
Marvin Neba Newton Ngwa
Marvin Neba Newton Ngwa - avatar
6 Respuestas
+ 2
Marvin Newton to install module before using. 1 step: Open your virtual environment (in your project) 2 step: Check installed module. In terminal write: >>>pip list Find name of module 3 step: If module is absent, install module. Write to terminal: >>>pip install pygame (pygame it is a module name) 4 step: Repeat 2 step 5 step: Open your python's file and write: import pygame...
30th Aug 2020, 3:32 PM
Valerii Mamontov
Valerii Mamontov - avatar
+ 2
You have to include the file that is in the some folder of your current program.If you have created a file called graphics.py so it must be in the some folder.
30th Aug 2020, 6:01 PM
HBhZ_C
HBhZ_C - avatar
+ 1
Just make sure that you have installed package for right version of python on your system.
30th Aug 2020, 2:21 PM
Arsenic
Arsenic - avatar
+ 1
If you use windows check import module_name in the python ide console.For example >> import graphics If no errors occurs then check python in the environment variable.
30th Aug 2020, 2:25 PM
HBhZ_C
HBhZ_C - avatar
+ 1
Marvin Newton and graphics.py it is no module... It is a python file. File, which contains a some code. And this code contains some modules. Os, for example. Or, pygame...
30th Aug 2020, 3:36 PM
Valerii Mamontov
Valerii Mamontov - avatar
+ 1
Re study cant code wat yu aint gettin
30th Aug 2020, 6:00 PM
XYNCSTEP
XYNCSTEP - avatar