+ 3

(Solved) Python: pip install and import does not work in Sololearn anymore

I want to install a library with my Python code on Sololearn and import it. Here is the code: https://sololearn.com/compiler-playground/cd5f7K5ocPQx/?ref=app The pip installation works but the following import doesn't work. Obviously there is a path issue. This approach has worked some month ago as you can see in David's Python code, but now it does not work anymore: https://sololearn.com/compiler-playground/cQfvlhWZxg35/?ref=app What do I have to change in my code to make it work?

9th Apr 2024, 4:47 AM
Niels F 🇩🇪 <html challenger>
Niels F 🇩🇪 <html challenger> - avatar
5 Respuestas
+ 4
They changed something about the playground. Louis and BroFar found a work around. https://www.sololearn.com/post/1757390/?ref=app
9th Apr 2024, 7:31 AM
Lisa
Lisa - avatar
+ 4
Lisa Thank you very much! The pip installation and the import of the gdown library works perfectly now without any error messages. https://sololearn.com/compiler-playground/cNY0e7bfYCXC/?ref=app
9th Apr 2024, 7:50 AM
Niels F 🇩🇪 <html challenger>
Niels F 🇩🇪 <html challenger> - avatar
+ 3
Ausgrindtube The -qq part only oppresses the messages that are displayed during the installation of the module. So I removed this part intentionally, so that the messages are visible. It has also nothing to do with the specific library. The code from David and dozens of other codes that are published on Sololearn that use pip install also do not work anymore. If you remove the -qq part of David's code you see the issue better.
9th Apr 2024, 7:08 AM
Niels F 🇩🇪 <html challenger>
Niels F 🇩🇪 <html challenger> - avatar
+ 3
Ausgrindtube Here is a reference code from mentor Lisa that also doesn't work anymore: https://sololearn.com/compiler-playground/ckBJoTlEYWxj/?ref=app Lisa Maybe you can check your own code and post a comment about this topic. Obviously this topic has a high relevance for many users.
9th Apr 2024, 7:27 AM
Niels F 🇩🇪 <html challenger>
Niels F 🇩🇪 <html challenger> - avatar
+ 1
Looking at the 2 codes, you're missing the -qq part that David's code has. However, it might be that the library you are attempting to import is not a supported one by the Sololearn compiler. You can email info@sololearn.com to ask for a better, more detailed answer.
9th Apr 2024, 6:55 AM
Ausgrindtube
Ausgrindtube - avatar