微信公众号搜"智元新知"关注
微信扫一扫可直接关注哦!

错误:命令出错,退出状态为 1:python setup.py egg_info 检查日志以获取完整的命令输出安装 django-haystack 时

如何解决错误:命令出错,退出状态为 1:python setup.py egg_info 检查日志以获取完整的命令输出安装 django-haystack 时

fun serverReachable(): Boolean {
    return try {
        GlobalScope.async {
            // call whatever api function here
        }
        true
    } catch (e: Exception) {
        false
    }
}

[root@izj6c4tgce8abugvzaupm7z project_name]# pipenv install django-haystack Installing django-haystack... Error: An error occurred while installing django-haystack! Error text: Looking in indexes: https://pypi.python.org/simple Collecting django-haystack Using cached django-haystack-3.0.tar.gz (450 kB) ERROR: Command errored out with exit status 1: command: /root/.local/share/virtualenvs/stdworkflow-yjFasZlk/bin/python -c 'import sys,setuptools,tokenize; sys.argv[0] = '"'"'/tmp/pip-install-ac13_sr7/django-haystack/setup.py'"'"'; __file__='"'"'/tmp/pip-install-ac13_sr7/django-haystack/setup.py'"'"';f=getattr(tokenize,'"'"'open'"'"',open)(__file__);code=f.read().replace('"'"'\r\n'"'"','"'"'\n'"'"');f.close();exec(compile(code,__file__,'"'"'exec'"'"'))' egg_info --egg-base /tmp/pip-pip-egg-info-_1nzjnvl cwd: /tmp/pip-install-ac13_sr7/django-haystack/ Complete output (33 lines): WARNING: The repository located at mirrors.aliyun.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.aliyun.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 "/root/.local/share/virtualenvs/stdworkflow-yjFasZlk/lib/python3.7/site-packages/setuptools/installer.py",line 126,in fetch_build_egg subprocess.check_call(cmd) File "/usr/local/python3/lib/python3.7/subprocess.py",line 347,in check_call raise CalledProcessError(retcode,cmd) subprocess.CalledProcessError: Command '['/root/.local/share/virtualenvs/stdworkflow-yjFasZlk/bin/python','-m','pip','--disable-pip-version-check','wheel','--no-deps','-w','/tmp/tmptx16e019','--quiet','--index-url','http://mirrors.aliyun.com/pypi/simple/','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 1,in <module> File "/tmp/pip-install-ac13_sr7/django-haystack/setup.py",line 65,in <module> test_suite="test_haystack.run_tests.run_all",File "/root/.local/share/virtualenvs/stdworkflow-yjFasZlk/lib/python3.7/site-packages/setuptools/__init__.py",line 152,in setup _install_setup_requires(attrs) File "/root/.local/share/virtualenvs/stdworkflow-yjFasZlk/lib/python3.7/site-packages/setuptools/__init__.py",line 147,in _install_setup_requires dist.fetch_build_eggs(dist.setup_requires) File "/root/.local/share/virtualenvs/stdworkflow-yjFasZlk/lib/python3.7/site-packages/setuptools/dist.py",line 676,in fetch_build_eggs replace_conflicting=True,File "/root/.local/share/virtualenvs/stdworkflow-yjFasZlk/lib/python3.7/site-packages/pkg_resources/__init__.py",line 766,in resolve replace_conflicting=replace_conflicting File "/root/.local/share/virtualenvs/stdworkflow-yjFasZlk/lib/python3.7/site-packages/pkg_resources/__init__.py",line 1049,in best_match return self.obtain(req,installer) File "/root/.local/share/virtualenvs/stdworkflow-yjFasZlk/lib/python3.7/site-packages/pkg_resources/__init__.py",line 1061,in obtain return installer(requirement) File "/root/.local/share/virtualenvs/stdworkflow-yjFasZlk/lib/python3.7/site-packages/setuptools/dist.py",line 732,in fetch_build_egg return fetch_build_egg(self,req) File "/root/.local/share/virtualenvs/stdworkflow-yjFasZlk/lib/python3.7/site-packages/setuptools/installer.py",line 128,in fetch_build_egg raise distutilsError(str(e)) from e distutils.errors.distutilsError: Command '['/root/.local/share/virtualenvs/stdworkflow-yjFasZlk/bin/python','setuptools_scm']' returned non-zero exit status 1. ---------------------------------------- ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output. 命令以前工作得很好,但今天它给出了这个错误信息。有人知道这个问题吗?

我还尝试安装其他软件包以测试它是软件包还是源的问题,例如 pipenv install,但它仍然给我相同的错误消息。

解决方法

对不起,我回来了,我刚刚解决了我的问题,如果我搜索更长的时间,我应该有。这适用于我的问题:

cd project_name

pipenv install setuptools_scm
pipenv install django-haystack

虽然我不知道原因,但是需要一个 setuptools_scm 包。

版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。