【问题标题】:ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output. when installing django-haystack错误:命令出错,退出状态为 1:python setup.py egg_info 检查日志以获取完整的命令输出。安装 django-haystack 时
【发布时间】:2021-04-15 14:51:18
【问题描述】:
[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', '-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.
    ----------------------------------------
ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.

pipenv install 命令以前工作得很好,但今天它给出了这个错误消息。有人知道这个问题吗?

我也尝试安装其他包来测试是否是包或源的问题,例如pipenv install numpy,但它仍然给我相同的错误消息。

【问题讨论】:

    标签: django-haystack


    【解决方案1】:

    对不起,我回来了,我刚刚解决了我的问题,如果我再搜索一下,我应该有。这适用于我的问题:

    cd project_name
    
    pipenv install setuptools_scm
    pipenv install django-haystack
    

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

    【讨论】:

      猜你喜欢
      • 2020-04-07
      • 1970-01-01
      • 2020-03-03
      • 2020-02-17
      • 2020-04-12
      • 2021-02-20
      • 2021-03-31
      • 1970-01-01
      • 2022-01-18
      相关资源
      最近更新 更多