In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-18 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >
Share
Shulou(Shulou.com)06/01 Report--
This article mainly shows you "how to install third-party libraries in Kernel environment", which is easy to understand and well-organized. I hope it can help you solve your doubts. Let me lead you to study and learn this article "how to install third-party libraries in Kernel environment".
With the improvement of the Kernel environment on the Kaggle platform, more and more competitions are submitted using Kernel. Kernel is a runtime environment that can be used to train models or to submit code.
However, the Kernel environment has many operational restrictions, as shown in the following figure:
The most important thing is that Kernel cannot connect to the Internet and install third-party libraries when it is submitted. So how do we use some of the necessary libraries in Kernel? This article will give you three ways to help you solve this problem.
01 copy the code to Kernel
If you only use a small part of the third-party library, and this part of the code is not very complex, then it is recommended that you can copy this part of the code directly into Notebook, and then you can remove the reference.
02 pip from Dataset
The dataset can be customized in the Kernel race, so we can upload the whl installation package of the library to Dataset, and then pip from the Dataset path. It is important to note that the dependency package needs to be ignored at this time: pip XX.whl-- no-deps
03 import from Dataset
Another way is to upload the source code of the library that needs to be installed in Dataset, and then import it from the path of Dataset. The practice is as follows: import ossys.path.insert (0, ".. / input/YourDataset")
Import XX above is all the content of this article "how to install third-party libraries in Kernel environment". Thank you for reading! I believe we all have a certain understanding, hope to share the content to help you, if you want to learn more knowledge, welcome to follow the industry information channel!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.