django_安装django-haystack报错_ERROR: Command errored out with exit status 1: python setup.py egg_info C

问题描述:

在阿里云服务器(Ubantu14.0)上安装django-haystack报错

ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.

报错详情:

ERROR: Command errored out with exit status 1:
     command: /zt_dailyfresh/dailyfresh_env/bin/python -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-pk7q6tll/django-haystack/setup.py'"'"'; __file__='"'"'/tmp/pip-install-pk7q6tll/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-install-pk7q6tll/django-haystack/pip-egg-info
         cwd: /tmp/pip-install-pk7q6tll/django-haystack/
    Complete output (35 lines):
    /zt_dailyfresh/dailyfresh_env/lib/python3.6/site-packages/cryptography/hazmat/bindings/openssl/binding.py:163: CryptographyDeprecationWarning: OpenSSL version 1.0.1 is no longer supported by the OpenSSL project, please upgrade. The next version of cryptography will drop support for it.
      utils.CryptographyDeprecationWarning
    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 "/zt_dailyfresh/dailyfresh_env/lib/python3.6/site-packages/setuptools/installer.py", line 128, in fetch_build_egg
        subprocess.check_call(cmd)
      File "/usr/lib/python3.6/subprocess.py", line 311, in check_call
        raise CalledProcessError(retcode, cmd)
    subprocess.CalledProcessError: Command '['/zt_dailyfresh/dailyfresh_env/bin/python', '-m', 'pip', '--disable-pip-version-check', 'wheel', '--no-deps', '-w', '/tmp/tmpq3lst1cy', '--quiet', '--index-url', 'http://mirrors.aliyun.com/pypi/simple/', 'setuptools_scm']' returned non-zero exit status 1.

    During handling of the above exception, another exception occurred:

    Traceback (most recent call last):
      File "", line 1, in 
      File "/tmp/pip-install-pk7q6tll/django-haystack/setup.py", line 71, in 
        setup_requires=['setuptools_scm'],
      File "/zt_dailyfresh/dailyfresh_env/lib/python3.6/site-packages/setuptools/__init__.py", line 143, in setup
        _install_setup_requires(attrs)
      File "/zt_dailyfresh/dailyfresh_env/lib/python3.6/site-packages/setuptools/__init__.py", line 138, in _install_setup_requires
        dist.fetch_build_eggs(dist.setup_requires)
      File "/zt_dailyfresh/dailyfresh_env/lib/python3.6/site-packages/setuptools/dist.py", line 721, in fetch_build_eggs
        replace_conflicting=True,
      File "/zt_dailyfresh/dailyfresh_env/lib/python3.6/site-packages/pkg_resources/__init__.py", line 783, in resolve
        replace_conflicting=replace_conflicting
      File "/zt_dailyfresh/dailyfresh_env/lib/python3.6/site-packages/pkg_resources/__init__.py", line 1066, in best_match
        return self.obtain(req, installer)
      File "/zt_dailyfresh/dailyfresh_env/lib/python3.6/site-packages/pkg_resources/__init__.py", line 1078, in obtain
        return installer(requirement)
      File "/zt_dailyfresh/dailyfresh_env/lib/python3.6/site-packages/setuptools/dist.py", line 777, in fetch_build_egg
        return fetch_build_egg(self, req)
      File "/zt_dailyfresh/dailyfresh_env/lib/python3.6/site-packages/setuptools/installer.py", line 130, in fetch_build_egg
        raise DistutilsError(str(e))
    distutils.errors.DistutilsError: Command '['/zt_dailyfresh/dailyfresh_env/bin/python', '-m', 'pip', '--disable-pip-version-check', 'wheel', '--no-deps', '-w', '/tmp/tmpq3lst1cy', '--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.

django_安装django-haystack报错_ERROR: Command errored out with exit status 1: python setup.py egg_info C_第1张图片

解决方法:
1、pip3 install setuptools_scm
2、pip3 install django-haystack==2.8.1

django_安装django-haystack报错_ERROR: Command errored out with exit status 1: python setup.py egg_info C_第2张图片

感谢: https://blog.csdn.net/weixin_45552789/article/details/104884436

你可能感兴趣的:(django_安装django-haystack报错_ERROR: Command errored out with exit status 1: python setup.py egg_info C)