Why I can't import modules in Python? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 2

Why I can't import modules in Python?

Modules can't work on the interpreter/compiler

29th Oct 2020, 12:00 PM
UNKNOWN
UNKNOWN - avatar
7 Answers
+ 6
You can import modules with: import <module name> If you get an error message, the desired module is not available or can not be used/supported.
29th Oct 2020, 12:16 PM
Alphin K Sajan
Alphin K Sajan - avatar
+ 3
Maybe you have to install them first, e.g. https://code.sololearn.com/c80BReGK9i1L What modules are you trying to import and what errors are you getting? Can you post a link to your code in the playground?
29th Oct 2020, 12:25 PM
David Ashton
David Ashton - avatar
+ 2
Sololearn doesn't supports gui modules,it works perfectly for other modules given you install them first
29th Oct 2020, 12:25 PM
Abhay
Abhay - avatar
+ 1
Did you install the packages for the module in the correct path , also using virtual environment may cause like these issues.
29th Oct 2020, 12:14 PM
**🇦🇪|🇦🇪**
**🇦🇪|🇦🇪** - avatar
0
I mean in the Sololearn Compiler
29th Oct 2020, 12:18 PM
UNKNOWN
UNKNOWN - avatar
0
In terminal and other compilers the scripts works perfectly
29th Oct 2020, 12:20 PM
UNKNOWN
UNKNOWN - avatar
0
Thank you, it worked, but as you said GUI modules are not supported.
29th Oct 2020, 12:40 PM
UNKNOWN
UNKNOWN - avatar