Splunk Dev

How to install PIP in BeautifulSoup 4?

blaku
Explorer

Hello

I want to use [BeautifulSoup 4] in Splunk environment, but how should I do [pip install]?
I tried [PIP], but it seems to have been linked to the python included with Linux,

$ SPLUNK_HOME / bin / splunk cmd python -m pip 
:/opt/splunk/bin/python: No module named pip

Please tell me from PIP install to the introduction of BeautifulSoup4.

Labels (2)
Tags (3)
0 Karma

badarsebard
Communicator

This is the exact use case for an app called PyDen. The app allows you to select alternate versions of Python, create virtual environments, and install modules available from PyPI through pip in search bar (or a nice dashboard).

The only caveat is it only works for Linux hosts who also have the needed packages to compile Python from source with pip.

0 Karma

harshpatel
Contributor

Hi @blaku,

Even if you are able to install it in the Splunk's environment it is not upgrade-friendly. You can instead do something explained here - Can I add python modules to the Splunk environment?.

Also, you can bundle your app including the library's source code itself in the APP's bin directory but be sure to look at the library's LICENCE.

Hope this helps.

0 Karma
Get Updates on the Splunk Community!

Announcing Scheduled Export GA for Dashboard Studio

We're excited to announce the general availability of Scheduled Export for Dashboard Studio. Starting in ...

Extending Observability Content to Splunk Cloud

Watch Now!   In this Extending Observability Content to Splunk Cloud Tech Talk, you'll see how to leverage ...

More Control Over Your Monitoring Costs with Archived Metrics GA in US-AWS!

What if there was a way you could keep all the metrics data you need while saving on storage costs?This is now ...