Splunk Dev

How to install python pip on Windows?

bnorthway
Path Finder

I need to install pip for python on a Windows server that is a full forwarder. This server also have python installed in the normal location (C:\python27). When I install pip ($SPLUNK_HOME\bin\python.exe get-pip.py), it says pip is already installed in C:\python27.

How can I install pip for Splunk's python installation? Thank you.

Tags (2)
0 Karma
1 Solution

bnorthway
Path Finder
0 Karma

bnorthway
Path Finder
0 Karma

MuS
SplunkTrust
SplunkTrust

Hi bnorthway,

I would not recommend doing so, but dr. google has quiet a long list providing guides who to install pip on windows like this one http://docs.python-guide.org/en/latest/starting/install/win/ or this one https://pip.pypa.io/en/latest/installing.html

Have fun and remember, if you break stuff you have to fix it ....

cheers, MuS

0 Karma

bnorthway
Path Finder

Well it really requires one to get the other - but I think I found an even better solution here, so I'm trying to get that set up now.

0 Karma

bnorthway
Path Finder

I've tried both of those instructions already - but I am left with the same error. What is the accepted 'best practice' for managing Python dependencies in Splunk scripts?

0 Karma

MuS
SplunkTrust
SplunkTrust

Okay, but this is a different requirement 😉 Installing or using your own python modules for a custom script is very easy...basically 🙂 Can be tricky sometimes, depends on the module you're using.

Take a look here http://stackoverflow.com/questions/279237/import-a-module-from-a-relative-path to get some ideas how it cloud be done in the script, afterwards create an app and place everything into the app's bin folder - the script and the python module that is.

0 Karma
Get Updates on the Splunk Community!

Index This | I am a number, but when you add ‘G’ to me, I go away. What number am I?

March 2024 Edition Hayyy Splunk Education Enthusiasts and the Eternally Curious!  We’re back with another ...

What’s New in Splunk App for PCI Compliance 5.3.1?

The Splunk App for PCI Compliance allows customers to extend the power of their existing Splunk solution with ...

Extending Observability Content to Splunk Cloud

Register to join us !   In this Extending Observability Content to Splunk Cloud Tech Talk, you'll see how to ...