All Products
Search
Document Center

:Resolve the aliyunsdkcore.vendored.six.moves error in Python SDK

Last Updated:Aug 20, 2025

Problem description

After installing the aliyun-python-sdk-core-v3 library in a Python 3.12 environment, the following error occurs at runtime:

File "D:\Projects\hnsaas.venv\Lib\site-packages\aliyunsdkcore\client.py", line 31, in from aliyunsdkcore.vendored.six.moves.urllib.parse import urlencode ModuleNotFoundError: No module named 'aliyunsdkcore.vendored.six.moves'

Possible causes

  1. Incomplete SDK installation: The aliyun-python-sdk-core-v3 package dependencies might not have been correctly installed.

  2. Package version conflict: The version of the six package installed in your system might not be compatible with the version required by the Alibaba Cloud SDK.

  3. Virtual environment issues: Dependency parsing errors might have occurred during installation in a virtual environment.

Solution

Install or update the six module.

  1. Force upgrade the six module:

    pip install --upgrade --force-reinstall six
  2. Verify the six module version:

    1. Method 1: Use pip show to view detailed information about six.

      pip show six

      If it is installed, you will see the following information:

      Name: six
      Version: 1.17.0
      Summary: Python 2 and 3 compatibility utilities
      Location: /path/to/site-packages
    2. Method 2: Use pip list to view the installed six package.

      # Linux/Mac
      pip list | grep six
      
      # Windows  
      pip list | findstr six  

      If six is installed, you will see the following information:

      six      1.17.0
Important

You should check for multiple version conflicts in your Python environment.