在函数计算FC中python的依赖层在线构建会爆这个问题,怎么解决?
error: subprocess-exited-with-error
× python setup.py egg_info did not run successfully.
│ exit code: 1
╰─> [34 lines of output]
WARNING: The repository located at mirrors.cloud.aliyuncs.com is not a trusted or secure host and is being ignored. If this repository is available via HTTPS we recommend you use HTTPS instead, otherwise you may silence this warning and allow it anyway with '--trusted-host mirrors.cloud.aliyuncs.com'.
ERROR: Could not find a version that satisfies the requirement setuptools_scm (from versions: none)
ERROR: No matching distribution found for setuptools_scm
Traceback (most recent call last):
File "/opt/python3.10/lib/python3.10/site-packages/setuptools/installer.py", line 75, in fetch_build_egg
subprocess.check_call(cmd)
File "/opt/python3.10/lib/python3.10/subprocess.py", line 369, in check_call
raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['/opt/python3.10/bin/python3', '-m', 'pip', '--disable-pip-version-check', 'wheel', '--no-deps', '-w', '/tmp/tmprs3hwf4g', '--quiet', 'setuptools_scm']' returned non-zero exit status 1.
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "<string>", line 2, in <module>
File "<pip-setuptools-caller>", line 34, in <module>
File "/tmp/pip-install-_in3pq3r/seqeval_e3fb1e2478af4fa293408a87e26c6100/setup.py", line 27, in <module>
setup(
File "/opt/python3.10/lib/python3.10/site-packages/setuptools/__init__.py", line 152, in setup
_install_setup_requires(attrs)
File "/opt/python3.10/lib/python3.10/site-packages/setuptools/__init__.py", line 147, in _install_setup_requires
dist.fetch_build_eggs(dist.setup_requires)
File "/opt/python3.10/lib/python3.10/site-packages/setuptools/dist.py", line 806, in fetch_build_eggs
resolved_dists = pkg_resources.working_set.resolve(
File "/opt/python3.10/lib/python3.10/site-packages/pkg_resources/__init__.py", line 766, in resolve
dist = best[req.key] = env.best_match(
File "/opt/python3.10/lib/python3.10/site-packages/pkg_resources/__init__.py", line 1051, in best_match
return self.obtain(req, installer)
File "/opt/python3.10/lib/python3.10/site-packages/pkg_resources/__init__.py", line 1063, in obtain
return installer(requirement)
File "/opt/python3.10/lib/python3.10/site-packages/setuptools/dist.py", line 877, in fetch_build_egg
return fetch_build_egg(self, req)
File "/opt/python3.10/lib/python3.10/site-packages/setuptools/installer.py", line 77, in fetch_build_egg
raise DistutilsError(str(e)) from e
distutils.errors.DistutilsError: Command '['/opt/python3.10/bin/python3', '-m', 'pip', '--disable-pip-version-check', 'wheel', '--no-deps', '-w', '/tmp/tmprs3hwf4g', '--quiet', 'setuptools_scm']' returned non-zero exit status 1.
[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.
这个问题是由于在构建Python依赖层时,找不到setuptools_scm包导致的。你可以尝试以下方法解决这个问题:
pip install --upgrade pip setuptools
git clone https://github.com/pypa/setuptools_scm.git
然后,进入仓库目录并安装setuptools_scm:
cd setuptools_scm
python setup.py install
版权声明:本文内容由阿里云实名注册用户自发贡献,版权归原作者所有,阿里云开发者社区不拥有其著作权,亦不承担相应法律责任。具体规则请查看《阿里云开发者社区用户服务协议》和《阿里云开发者社区知识产权保护指引》。如果您发现本社区中有涉嫌抄袭的内容,填写侵权投诉表单进行举报,一经查实,本社区将立刻删除涉嫌侵权内容。