aliyun-openapi-python-sdk icon indicating copy to clipboard operation
aliyun-openapi-python-sdk copied to clipboard

`aliyunsdkcore` depends on deprecated `pycrypto`

Open lzwjava opened this issue 7 months ago • 1 comments

Error Stack

$ pip install aliyunsdkcore

...
...
...

      configure: creating ./config.status
      config.status: creating src/config.h
      src/_fastmath.c:33:10: fatal error: longintrepr.h: No such file or directory
         33 | #include <longintrepr.h>                                /* for conversions */
            |          ^~~~~~~~~~~~~~~
      compilation terminated.
      error: command '/usr/bin/x86_64-linux-gnu-gcc' failed with exit code 1
      [end of output]
  
  note: This error originates from a subprocess, and is likely not a problem with pip.
  ERROR: Failed building wheel for pycrypto
  Running setup.py clean for pycrypto
Failed to build pycrypto
ERROR: Failed to build installable wheels for some pyproject.toml based projects (pycrypto)

Short Description

The aliyunsdkcore package depends on pycrypto>=2.6.1, which is deprecated, unmaintained, and fails to build on Python 3.13+ due to missing internal Python headers (longintrepr.h).

Impact:

  • Breaks installations on modern Python versions (3.13+).
  • Security risk due to unpatched vulnerabilities in pycrypto.

Suggested Fix:
Replace pycrypto with the maintained fork pycryptodome (API-compatible drop-in replacement).

Reproduction Steps:

  1. Install aliyunsdkcore on Python 3.13.
  2. Observe build failure due to pycrypto dependency.

Workaround:
Manually install pycryptodome and remove pycrypto, but this should be fixed upstream.


Additional Notes for the Report

  • Link to pycrypto deprecation: PyPI
  • pycryptodome is the recommended alternative (used by paramiko, google-auth, etc.).
  • Example error:
    src/_fastmath.c:33:10: fatal error: longintrepr.h: No such file or directory
    

This change would improve compatibility and security. Thanks for maintaining the SDK!


DeepSeek helps to generate issue descriptio.

lzwjava avatar Jun 08 '25 14:06 lzwjava

aliyunsdkcore is not our python sdk package, you can install our package by pip install aliyun-python-sdk-core; but We highly recommend using our V2 SDK, you can get the example in our API Workbench

peze avatar Jul 16 '25 02:07 peze