安装项目依赖。 pip3 install opencv-python-headless gfpgan open-clip-torch xformers pyngrok clip-anytorch pip3 install -r requirements_versions.txt
报错 Collecting basicsr==1.4.2 (from -r requirements_versions.txt (line 4)) Using cached http://mirrors.cloud.aliyuncs.com/pypi/packages/86/41/00a6b000f222f0fa4c6d9e1d6dcc9811a374cabb8abb9d408b77de39648c/basicsr-1.4.2.tar.gz (172 kB) Preparing metadata (setup.py) ... error error: subprocess-exited-with-error
× python setup.py egg_info did not run successfully. │ exit code: 1 ╰─> [63 lines of output] /root/.conda/envs/aigc/lib/python3.10/site-packages/setuptools/dist.py:755: SetuptoolsDeprecationWarning: Invalid dash-separated options !!
********************************************************************************
Usage of dash-separated 'index-url' will not be supported in future
versions. Please use the underscore name 'index_url' instead.
By 2023-Sep-26, you need to update your project and remove deprecated calls
or your builds will no longer be supported.
See https://setuptools.pypa.io/en/latest/userguide/declarative_config.html for details.
********************************************************************************
!!
opt = self.warn_dash_deprecation(opt, section)
/root/.conda/envs/aigc/lib/python3.10/site-packages/setuptools/__init__.py:84: _DeprecatedInstaller: setuptools.installer and fetch_build_eggs are deprecated.
!!
********************************************************************************
Requirements should be satisfied by a PEP 517 installer.
If you are using pip, you can try `pip install --use-pep517`.
********************************************************************************
!!
dist.fetch_build_eggs(dist.setup_requires)
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 cython (from versions: none)
ERROR: No matching distribution found for cython
Traceback (most recent call last):
File "/root/.conda/envs/aigc/lib/python3.10/site-packages/setuptools/installer.py", line 96, in _fetch_build_egg_no_warn
subprocess.check_call(cmd)
File "/root/.conda/envs/aigc/lib/python3.10/subprocess.py", line 369, in check_call
raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['/root/.conda/envs/aigc/bin/python', '-m', 'pip', '--disable-pip-version-check', 'wheel', '--no-deps', '-w', '/tmp/tmprk_dvbwn', '--quiet', '--index-url', 'http://mirrors.cloud.aliyuncs.com/pypi/simple/', 'cython']' 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-98712lzx/basicsr_94c9e76654ea49bbb0c574ae2226491b/setup.py", line 147, in <module>
setup(
File "/root/.conda/envs/aigc/lib/python3.10/site-packages/setuptools/__init__.py", line 106, in setup
_install_setup_requires(attrs)
File "/root/.conda/envs/aigc/lib/python3.10/site-packages/setuptools/__init__.py", line 79, in _install_setup_requires
_fetch_build_eggs(dist)
File "/root/.conda/envs/aigc/lib/python3.10/site-packages/setuptools/__init__.py", line 84, in _fetch_build_eggs
dist.fetch_build_eggs(dist.setup_requires)
File "/root/.conda/envs/aigc/lib/python3.10/site-packages/setuptools/dist.py", line 917, in fetch_build_eggs
return _fetch_build_eggs(self, requires)
File "/root/.conda/envs/aigc/lib/python3.10/site-packages/setuptools/installer.py", line 38, in _fetch_build_eggs
resolved_dists = pkg_resources.working_set.resolve(
File "/root/.conda/envs/aigc/lib/python3.10/site-packages/pkg_resources/__init__.py", line 827, in resolve
dist = self._resolve_dist(
File "/root/.conda/envs/aigc/lib/python3.10/site-packages/pkg_resources/__init__.py", line 863, in _resolve_dist
dist = best[req.key] = env.best_match(
File "/root/.conda/envs/aigc/lib/python3.10/site-packages/pkg_resources/__init__.py", line 1133, in best_match
return self.obtain(req, installer)
File "/root/.conda/envs/aigc/lib/python3.10/site-packages/pkg_resources/__init__.py", line 1145, in obtain
return installer(requirement)
File "/root/.conda/envs/aigc/lib/python3.10/site-packages/setuptools/installer.py", line 98, in _fetch_build_egg_no_warn
raise DistutilsError(str(e)) from e
distutils.errors.DistutilsError: Command '['/root/.conda/envs/aigc/bin/python', '-m', 'pip', '--disable-pip-version-check', 'wheel', '--no-deps', '-w', '/tmp/tmprk_dvbwn', '--quiet', '--index-url', 'http://mirrors.cloud.aliyuncs.com/pypi/simple/', 'cython']' 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.
这个错误可能是由于 pip 安装基础库时出现了问题。您可以尝试以下方法来解决问题:
确保您的 pip 版本是最新的,可以通过运行以下命令升级 pip: Copy pip3 install --upgrade pip 检查您的网络连接是否正常。有时候网络不稳定可能会导致 pip 安装失败。您可以尝试更换 pip 的源,例如使用清华大学的 pip 源: basic Copy pip3 install -i https://pypi.tuna.tsinghua.edu.cn/simple opencv-python-headless gfpgan open-clip-torch xformers pyngrok clip-anytorch -r requirements_versions.txt 如果上述方法仍然无法解决问题,可以尝试手动下载并安装 basicsr 库。您可以在 PyPI 上找到 basicsr 库的源文件,下载后使用以下命令进行安装: Copy pip3 install path/to/basicsr-1.4.2.tar.gz 希望这些方法能够帮助您解决问题
感谢您对阿里云机器学习PAI的关注。
根据您提供的错误信息,第二行报错提示中提到了 basicsr
的安装,并且在第三行提到了安装进行了 metadata 预处理。这种情况可能出现在具有依赖项,并且其中一个依赖项无法解析或无法正确安装时。
建议您使用以下方式解决问题:
具体来说,您可以先尝试以下方法:
pip3 install -r requirements_types.txt
pip3 install --no-deps -r requirements_versions.txt
根据报错信息,这个问题可能是由于缺少依赖库或者版本不匹配导致的。
您可以尝试以下步骤来解决该问题:
检查您的Python环境是否正确配置,并确认您的Python版本是否符合项目要求。
检查您的pip是否已经升级到最新版本,可以使用以下命令升级pip:
pip3 install --upgrade pip
确认您的网络连接是否正常,如果您处于防火墙或代理网络中,请尝试更改网络设置或者使用代理。
尝试使用国内镜像源安装依赖库,例如使用清华大学的镜像源:
pip3 install -i https://pypi.tuna.tsinghua.edu.cn/simple opencv-python-headless gfpgan open-clip-torch xformers pyngrok clip-anytorch -r requirements_versions.txt
或者使用阿里云的镜像源:
pip3 install -i http://mirrors.aliyun.com/pypi/simple/ opencv-python-headless gfpgan open-clip-torch xformers pyngrok clip-anytorch -r requirements_versions.txt
这个错误可能是由于 pip 安装基础库时出现了问题。您可以尝试以下方法来解决问题:
确保您的 pip 版本是最新的,可以通过运行以下命令升级 pip: Copy pip3 install --upgrade pip 检查您的网络连接是否正常。有时候网络不稳定可能会导致 pip 安装失败。您可以尝试更换 pip 的源,例如使用清华大学的 pip 源: basic Copy pip3 install -i https://pypi.tuna.tsinghua.edu.cn/simple opencv-python-headless gfpgan open-clip-torch xformers pyngrok clip-anytorch -r requirements_versions.txt 如果上述方法仍然无法解决问题,可以尝试手动下载并安装 basicsr 库。您可以在 PyPI 上找到 basicsr 库的源文件,下载后使用以下命令进行安装: Copy pip3 install path/to/basicsr-1.4.2.tar.gz 希望这些方法能够帮助您解决问题
可以尝试使用以下命令来安装 basicsr==1.4.2 依赖项:
pip3 install -i https://pypi.io/archive/basicsr/1.4.2/files basicsr==1.4.2
或者使用以下命令来下载 basicsr==1.4.2 依赖项的预览文件:
pip3 install -i https://pypi.io/archive/basicsr/1.4.2/files/ BasicsR-1.4.2-cp38-cp38-win32.whl
请注意,由于安装 basicsr==1.4.2 时可能会出现兼容性问题,因此建议先检查您的 Python 版本和 basicsr==1.4.2 的兼容性,然后再安装。
版权声明:本文内容由阿里云实名注册用户自发贡献,版权归原作者所有,阿里云开发者社区不拥有其著作权,亦不承担相应法律责任。具体规则请查看《阿里云开发者社区用户服务协议》和《阿里云开发者社区知识产权保护指引》。如果您发现本社区中有涉嫌抄袭的内容,填写侵权投诉表单进行举报,一经查实,本社区将立刻删除涉嫌侵权内容。
人工智能平台 PAI(Platform for AI,原机器学习平台PAI)是面向开发者和企业的机器学习/深度学习工程平台,提供包含数据标注、模型构建、模型训练、模型部署、推理优化在内的AI开发全链路服务,内置140+种优化算法,具备丰富的行业场景插件,为用户提供低门槛、高性能的云原生AI工程化能力。