why am i not able to import libraries in python? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 1

why am i not able to import libraries in python?

i am not able to use any library of python while coding on code playground. How can i solve this ?

31st Dec 2019, 9:39 AM
Gaurav Fatwani
Gaurav Fatwani - avatar
7 Answers
+ 2
You don't have all the generic libraries while using the code playground, it is also not recommemded to make any complex applications using it. You should use pycharm which actually has python installed and you're able to use an actual interpreter instead of the code playground.
31st Dec 2019, 11:45 AM
coddy
coddy - avatar
+ 3
HonFu ,I know that i say him to consider that
31st Dec 2019, 11:49 AM
Bharathkannan R
Bharathkannan R - avatar
+ 2
There are some you can't import here, especially graphical ones like tkinter, but the regular stuff like math, random, re, time etc. definitely works. What did you try to import?
31st Dec 2019, 9:43 AM
HonFu
HonFu - avatar
+ 2
TKinter 😅
31st Dec 2019, 10:23 AM
Gaurav Fatwani
Gaurav Fatwani - avatar
+ 2
Just using pycharm it can contain many preinstalled libraries
31st Dec 2019, 10:33 AM
Bharathkannan R
Bharathkannan R - avatar
+ 2
this is a problem with installing tkinter on pycharm. You don’t have a tkinter module like you use while using pip. To install tkinter in Pycharm, install the module “future” and restart pycharm. Tkinter will be imported.
31st Dec 2019, 10:38 AM
Bharathkannan R
Bharathkannan R - avatar
+ 2
bharathkanna, have you read the question? This is about Sololearn's Code Playground, not about Pycharm.
31st Dec 2019, 11:45 AM
HonFu
HonFu - avatar