Skip to content

Conversation

@H-Sofie
Copy link

@H-Sofie H-Sofie commented Aug 22, 2025

当我在执行

pip install alibabacloud_credentials -U

时,会提示构建失败的错误消息:

Collecting alibabacloud-credentials
  Using cached https://pypi.tuna.tsinghua.edu.cn/packages/b7/0c/1b0c5f4c2170165719b336616ac0a88f1666fd8690fda41e2e8ae3139fd9/alibabacloud-credentials-1.0.2.tar.gz (30 kB)
  Preparing metadata (setup.py) ... error
  error: subprocess-exited-with-error

  × python setup.py egg_info did not run successfully.
  │ exit code: 1
  ╰─> [7 lines of output]
      Traceback (most recent call last):
        File "<string>", line 2, in <module>
        File "<pip-setuptools-caller>", line 35, in <module>
        File "D:\xxx\System\Temp\pip-install-fjnrk_89\alibabacloud-credentials_8d1bc2f0b418402a9128f01e8f12ef51\setup.py", line 34, in <module>
          VERSION = __import__(PACKAGE).__version__
                    ^^^^^^^^^^^^^^^^^^^
      ModuleNotFoundError: No module named 'alibabacloud_credentials'
      [end of output]

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

× Encountered error while generating package metadata.
╰─> See above for output.

note: This is an issue with the package mentioned above, not pip.
hint: See above for details.

我想可能是因为它在生成元数据阶段就去 import 自己的模块拿版本号,但当前环境里还没有这个模块,于是构建错误。
此 PR 调整构建脚本,直接读取源文件中的 __version__ 字面值,防止缺少依赖问题。

@CLAassistant
Copy link

CLAassistant commented Aug 22, 2025

CLA assistant check
All committers have signed the CLA.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants