Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do I install Splunklib for Python 3.7 on Windows?

Splunklib for Python 3.7 fails to install on my Windows machine. Since pycrypto was not ported to Python 3, I've uninstalled it and installed pycrypodome as replacement. Unfortunately, when trying to install splunklib, pip still tries to install pycrypto.

*Installing collected packages: pycrypto, splunklib
Running setup.py install for pycrypto ... *

Is there a way to force Python or pip to use pycryptodome instead of pycrypto?

like image 417
Chris Chris Avatar asked Oct 19 '25 03:10

Chris Chris


1 Answers

I finally found the way to install it:

  1. Uninstall pycrypto
    pip uninstall pycrypto
  2. Install pycryptodome as replacement of pycypto
    pip install pycryptodome
  3. Install splunklib without dependencies
    pip install splunklib --no-deps
  4. Edit "pythonlib"\splunklib-1.0.0.dist-info\METADATA and replace "Requires-Dist: pycrypto" with "Requires-Dist: pycryptodome"

  5. install splunk-sdk
    pip install splunk-sdk

  6. check that everything is ok
    pip install splunklib
like image 99
Chris Chris Avatar answered Oct 21 '25 16:10

Chris Chris