How to import libraries in sololearn? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

How to import libraries in sololearn?

When I'm trying to import library, sololearn writes an error, like "no such file in directory". Please help me to fix it.

17th Jul 2021, 10:38 AM
Timofey Stovolosov
Timofey Stovolosov - avatar
7 Answers
+ 4
You can import them by installing them first using pip. Here are a couple of examples https://code.sololearn.com/c80BReGK9i1L https://code.sololearn.com/cP3AHSy74JWV
17th Jul 2021, 3:57 PM
David Ashton
David Ashton - avatar
+ 1
Yes you can import python libraries in Sololearn but only the python v3.8.6 in-built libraries. eg :- import this
18th Jul 2021, 6:15 AM
Anurag Saikia
0
You can't import something that isn't built in the language itself or isn't installed before . Use tags for language name .
17th Jul 2021, 10:45 AM
Abhay
Abhay - avatar
0
1. Python 2. It has some basic libraries in itself, but sololearn can't find them
17th Jul 2021, 10:48 AM
Timofey Stovolosov
Timofey Stovolosov - avatar
0
3. I'm playing "Bad Pigges"
17th Jul 2021, 10:49 AM
Timofey Stovolosov
Timofey Stovolosov - avatar
0
You can't import libraries that aren't built-in because your code gets ran in a sandboxed environment and they haven't yet added an option to install libraries. Run your code on a computer or download an app called Pydroid 3.
17th Jul 2021, 11:48 AM
inxanedev!
inxanedev! - avatar
0
Okay, how to build in libraries?
17th Jul 2021, 12:59 PM
Timofey Stovolosov
Timofey Stovolosov - avatar