splunk / splunk-sdk-python

Splunk Software Development Kit for Python
http://dev.splunk.com
Apache License 2.0
698 stars 370 forks source link

Failed installing with `pip install splunk-sdk` for Python 3.12 #548

Closed jfcherng closed 7 months ago

jfcherng commented 1 year ago

Describe the bug

Install this with Python 3.12.0 via pip failed.

To Reproduce Steps to reproduce the behavior:

  1. Execute python -m pip install splunk-sdk, where python is Python 3.12.0

Expected behavior

It installs successfully.

Logs or Screenshots

(.venv) [jfcherng@3bc-f19 test]$ pip install splunk-sdk
Collecting splunk-sdk
  Using cached splunk-sdk-1.7.4.tar.gz (108 kB)
  Installing build dependencies ... done
  Getting requirements to build wheel ... error
  error: subprocess-exited-with-error

  × Getting requirements to build wheel did not run successfully.
  │ exit code: 1
  ╰─> [22 lines of output]
      Traceback (most recent call last):
        File "D:\jfcherng\Desktop\test\.venv\Lib\site-packages\pip\_vendor\pyproject_hooks\_in_process\_in_process.py", line 353, in <module>
          main()
        File "D:\jfcherng\Desktop\test\.venv\Lib\site-packages\pip\_vendor\pyproject_hooks\_in_process\_in_process.py", line 335, in main
          json_out['return_val'] = hook(**hook_input['kwargs'])
                                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
        File "D:\jfcherng\Desktop\test\.venv\Lib\site-packages\pip\_vendor\pyproject_hooks\_in_process\_in_process.py", line 118, in get_requires_for_build_wheel
          return hook(config_settings)
                 ^^^^^^^^^^^^^^^^^^^^^
        File "C:\Users\jfcherng\AppData\Local\Temp\pip-build-env-cu0raqgr\overlay\Lib\site-packages\setuptools\build_meta.py", line 355, in get_requires_for_build_wheel
          return self._get_build_requires(config_settings, requirements=['wheel'])
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
        File "C:\Users\jfcherng\AppData\Local\Temp\pip-build-env-cu0raqgr\overlay\Lib\site-packages\setuptools\build_meta.py", line 325, in _get_build_requires
          self.run_setup()
        File "C:\Users\jfcherng\AppData\Local\Temp\pip-build-env-cu0raqgr\overlay\Lib\site-packages\setuptools\build_meta.py", line 507, in run_setup
          super(_BuildMetaLegacyBackend, self).run_setup(setup_script=setup_script)
        File "C:\Users\jfcherng\AppData\Local\Temp\pip-build-env-cu0raqgr\overlay\Lib\site-packages\setuptools\build_meta.py", line 341, in run_setup
          exec(code, locals())
        File "<string>", line 22, in <module>
        File "C:\Users\jfcherng\AppData\Local\Temp\pip-install-lhx3336b\splunk-sdk_51a09a02018f4642aae48e2c7342d0c6\splunklib\__init__.py", line 18, in <module>
          from splunklib.six.moves import map
      ModuleNotFoundError: No module named 'splunklib.six.moves'
      [end of output]

  note: This error originates from a subprocess, and is likely not a problem with pip.
error: subprocess-exited-with-error

× Getting requirements to build wheel did not run successfully.
│ exit code: 1
╰─> See above for output.

note: This error originates from a subprocess, and is likely not a problem with pip.

SDK (please complete the following information):

jfcherng commented 1 year ago

May also related to https://github.com/splunk/splunk-sdk-python/issues/529

artemrys commented 1 year ago

We are hitting the same issue in UCC framework, link from our pipeline (https://github.com/splunk/addonfactory-ucc-generator/actions/runs/6455317283/job/17522597650?pr=896#step:5:79).

ncanumalla-splunk commented 1 year ago

Hi all, the library currently supports Python 2 and Python 3 runtimes and contains certain dependencies which are not working well with Python 3.9+ versions. This quarter, we are planning on a new beta release for the Python SDK with updated support for Python 3.9 and hope to resolve these issues. Please watch for updates here.

jankadel commented 12 months ago

Is this still active? Still facing this issue.

Hermke commented 10 months ago

I can confirm this is still an issue

MWEJ commented 10 months ago

Hi all, the library currently supports Python 2 and Python 3 runtimes and contains certain dependencies which are not working well with Python 3.9+ versions. This quarter, we are planning on a new beta release for the Python SDK with updated support for Python 3.9 and hope to resolve these issues. Please watch for updates here.

Q4 2023 is over. Is the support for 3.9+ version support still on the roadmap?

teleter commented 10 months ago

Is there a update on this?

hpapazov commented 10 months ago

Any updates on releasing the fix for this issue?

fabian-nunes commented 9 months ago

Are all version 3.9+ not supported or only 3.12? I have dependencies that only work on 3.10 and above, so a downgrade of python will cause other issues.

jfcherng commented 9 months ago

Are all version 3.9+ not supported or only 3.12? I have dependencies that only work on 3.10 and above, so a downgrade of python will cause other issues.

only 3.12 suffers.

sonawanesarvesh commented 9 months ago

Hello

I can confirm - issue is still present for python 3.12

rodhpadilla commented 8 months ago

issue is still present on python 3.12.2

❯ pip install splunk-sdk Collecting splunk-sdk Using cached splunk-sdk-1.7.4.tar.gz (108 kB) Installing build dependencies ... done Getting requirements to build wheel ... error error: subprocess-exited-with-error

× Getting requirements to build wheel did not run successfully. │ exit code: 1 ╰─> [22 lines of output] Traceback (most recent call last): File "/Users/P3186458/Documents/dev/CHARTER/SCP/out-of-home/.venv/lib/python3.12/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 353, in main() File "/Users/P3186458/Documents/dev/CHARTER/SCP/out-of-home/.venv/lib/python3.12/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 335, in main json_out['return_val'] = hook(**hook_input['kwargs']) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/Users/P3186458/Documents/dev/CHARTER/SCP/out-of-home/.venv/lib/python3.12/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 118, in get_requires_for_build_wheel return hook(config_settings) ^^^^^^^^^^^^^^^^^^^^^ File "/private/var/folders/2r/_wwdbccn4pb3ckftlqfrx22r0000gp/T/pip-build-env-eu8a96eo/overlay/lib/python3.12/site-packages/setuptools/build_meta.py", line 325, in get_requires_for_build_wheel return self._get_build_requires(config_settings, requirements=['wheel']) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/private/var/folders/2r/_wwdbccn4pb3ckftlqfrx22r0000gp/T/pip-build-env-eu8a96eo/overlay/lib/python3.12/site-packages/setuptools/build_meta.py", line 295, in _get_build_requires self.run_setup() File "/private/var/folders/2r/_wwdbccn4pb3ckftlqfrx22r0000gp/T/pip-build-env-eu8a96eo/overlay/lib/python3.12/site-packages/setuptools/build_meta.py", line 487, in run_setup super().run_setup(setup_script=setup_script) File "/private/var/folders/2r/_wwdbccn4pb3ckftlqfrx22r0000gp/T/pip-build-env-eu8a96eo/overlay/lib/python3.12/site-packages/setuptools/build_meta.py", line 311, in run_setup exec(code, locals()) File "", line 22, in File "/private/var/folders/2r/_wwdbccn4pb3ckftlqfrx22r0000gp/T/pip-install-pfzeej4l/splunk-sdk_598c2b7d09bc40ffa272451a074aa307/splunklib/init.py", line 18, in from splunklib.six.moves import map ModuleNotFoundError: No module named 'splunklib.six.moves' [end of output]

note: This error originates from a subprocess, and is likely not a problem with pip. error: subprocess-exited-with-error

× Getting requirements to build wheel did not run successfully. │ exit code: 1 ╰─> See above for output.

note: This error originates from a subprocess, and is likely not a problem with pip.

esusha commented 8 months ago

Issue is still observed with python3.12.2

ashah-splunk commented 8 months ago

Hi all, Sorry for the delay, we have published a new version of Splunk Python SDK v2.0.0 with Python v3.7+ support . Request you to use the latest SDK and let us know if the issue is resolved. Thanks

jfcherng commented 8 months ago

Hi all, Sorry for the delay, we have published a new version of Splunk Python SDK v2.0.0 with Python v3.7+ support . Request you to use the latest SDK and let us know if the issue is resolved. Thanks

Installation is okay. I will test our production codes to run with it tomorrow.

jfcherng commented 8 months ago

hi @ashah-splunk, I got an error when running with v2.0.0.

  File ".venv\Lib\site-packages\splunklib\results.py", line 49, in <module>
    import deprecation
ModuleNotFoundError: No module named 'deprecation'

After manually install deprecation from pypi, it works on my side. But I guess you want to add it as a dependency https://python-packaging.readthedocs.io/en/latest/dependencies.html

ashah-splunk commented 8 months ago

Thanks @jfcherng for the fix PR. We will make sure to include the missing dependency in the next release.

ashah-splunk commented 7 months ago

Hi @jfcherng We have published a patch release of Python SDK v2.0.1 with the missing 'deprecation' dependency. Request you to upgrade to the latest version and let us know if any other issue pops up. Thanks!

jfcherng commented 7 months ago

hi @ashah-splunk , v2.0.1 works well for me. Thanks.

jfcherng commented 7 months ago

Closed as my issue has been resolve.