DistutilsError:找不到适合 Requirement.parse('setuptools-scm') 的发行版

问题描述

您好,尝试将 django 应用程序部署到弹性 beantalk 时出现此错误

distutilsError: Could not find suitable distribution for Requirement.parse('setuptools-scm')

我已经尝试在我的 requirements.txt 文件甚至我的 .ebextension 目录中添加库 setuptools-scm,但仍然没有任何建议?

编辑,这是错误的完整日志:

Application deployment Failed at 2021-05-18T23:56:56Z with exit status 1 and error: Hook /opt/elasticbeanstalk/hooks/appdeploy/pre/03deploy.py Failed. Collecting Django==1.11.16 Using cached Django-1.11.16-py2.py3-none-any.whl (7.0 MB) Collecting django-oscar==1.6.4 Using cached django_oscar-1.6.4-py2.py3-none-any.whl (7.5 MB) Collecting psycopg2==2.7.3.2 Using cached psycopg2-2.7.3.2-cp36-cp36m-manylinux1_x86_64.whl (2.7 MB) Collecting openpyxl==2.4.10 Using cached openpyxl-2.4.10.tar.gz (158 kB) Collecting django-storages==1.6.5 Using cached django_storages-1.6.5-py2.py3-none-any.whl (47 kB) Collecting boto3==1.5.19 Using cached boto3-1.5.19-py2.py3-none-any.whl (128 kB) Collecting django-ipware==2.0.1 Using cached django-ipware-2.0.1.tar.gz (10 kB) Collecting django-extensions>=2.0.6 Using cached django_extensions-3.1.3-py3-none-any.whl (223 kB) Collecting pygeoip==0.3.2 Using cached pygeoip-0.3.2-py2.py3-none-any.whl (20 kB) Collecting selenium==3.14.1 Using cached selenium-3.14.1-py2.py3-none-any.whl (902 kB) Collecting pycountry==18.5.26 Using cached pycountry-18.5.26-py2.py3-none-any.whl (10.3 MB) Collecting pysolr==3.8.1 Using cached pysolr-3.8.1-py2.py3-none-any.whl (16 kB) Collecting django-filter==0.13.0 Using cached django_filter-0.13.0-py2.py3-none-any.whl (27 kB) Collecting djangorestframework==3.3.3 Using cached djangorestframework-3.3.3-py2.py3-none-any.whl (662 kB) Collecting Pillow==5.3.0 Using cached Pillow-5.3.0-cp36-cp36m-manylinux1_x86_64.whl (2.0 MB) Collecting django-settings-export==1.2.1 Using cached django-settings-export-1.2.1.tar.gz (5.0 kB) Collecting django-background-tasks==1.2.0 Using cached django-background-tasks-1.2.0.tar.gz (19 kB) Collecting ip2geotools==0.1.5 Using cached ip2geotools-0.1.5-py3-none-any.whl (16 kB) Collecting watchtower==0.7.3 Using cached watchtower-0.7.3-py2.py3-none-any.whl (13 kB) Collecting pytz Using cached pytz-2021.1-py2.py3-none-any.whl (510 kB) Collecting sorl-thumbnail<12.5,>=12.4.1 Using cached sorl_thumbnail-12.4.1-py2.py3-none-any.whl (44 kB) Collecting django-widget-tweaks>=1.4.1 Using cached django_widget_tweaks-1.4.8-py2.py3-none-any.whl (11 kB) Collecting django-treebeard>=4.3.0 Using cached django_treebeard-4.5.1-py3-none-any.whl (103 kB) Collecting django-extra-views<0.12,>=0.11 Using cached django-extra-views-0.11.0.tar.gz (13 kB) Collecting Unidecode<1.1,>=1.0 Using cached Unidecode-1.0.23-py2.py3-none-any.whl (237 kB) Collecting Babel<3.0,>=1.0 Using cached Babel-2.9.1-py2.py3-none-any.whl (8.8 MB) Collecting factory-boy<3.0,>=2.4.1 Using cached factory_boy-2.12.0-py2.py3-none-any.whl (36 kB) Collecting mock<3.0,>=1.0.1 Using cached mock-2.0.0-py2.py3-none-any.whl (56 kB) Collecting phonenumbers Using cached phonenumbers-8.12.23-py2.py3-none-any.whl (2.6 MB) Collecting django-haystack<3.0.0,>=2.5.0 Using cached django-haystack-2.8.1.tar.gz (1.6 MB) ERROR: Command errored out with exit status 1: command: /opt/python/run/venv/bin/python3 -c 'import io,os,sys,setuptools,tokenize; sys.argv[0] = '"'"'/tmp/pip-install-ji9vxolp/django-haystack_504d7caab43d489ebad3acd0546161a6/setup.py'"'"'; __file__='"'"'/tmp/pip-install-ji9vxolp/django-haystack_504d7caab43d489ebad3acd0546161a6/setup.py'"'"';f = getattr(tokenize,'"'"'open'"'"',open)(__file__) if os.path.exists(__file__) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"','"'"'\n'"'"');f.close();exec(compile(code,__file__,'"'"'exec'"'"'))' egg_info --egg-base /tmp/pip-pip-egg-info-2lhqu4p5 cwd: /tmp/pip-install-ji9vxolp/django-haystack_504d7caab43d489ebad3acd0546161a6/ Complete output (23 lines): Couldn't find index page for 'setuptools_scm' (maybe misspelled?) No local packages or working download links found for setuptools_scm Traceback (most recent call last): File "",line 1,in File "/tmp/pip-install-ji9vxolp/django-haystack_504d7caab43d489ebad3acd0546161a6/setup.py",line 71,in setup_requires=['setuptools_scm'],File "/usr/lib64/python3.6/distutils/core.py",line 108,in setup _setup_distribution = dist = klass(attrs) File "/opt/python/run/venv/local/lib/python3.6/site-packages/setuptools/dist.py",line 315,in __init__ self.fetch_build_eggs(attrs['setup_requires']) File "/opt/python/run/venv/local/lib/python3.6/site-packages/setuptools/dist.py",line 361,in fetch_build_eggs replace_conflicting=True,File "/opt/python/run/venv/local/lib/python3.6/site-packages/pkg_resources/__init__.py",line 850,in resolve dist = best[req.key] = env.best_match(req,ws,installer) File "/opt/python/run/venv/local/lib/python3.6/site-packages/pkg_resources/__init__.py",line 1122,in best_match return self.obtain(req,line 1134,in obtain return installer(requirement) File "/opt/python/run/venv/local/lib/python3.6/site-packages/setuptools/dist.py",line 429,in fetch_build_egg return cmd.easy_install(req) File "/opt/python/run/venv/local/lib/python3.6/site-packages/setuptools/command/easy_install.py",line 659,in easy_install raise distutilsError(msg) distutils.errors.distutilsError: Could not find suitable distribution for Requirement.parse('setuptools_scm') ---------------------------------------- WARNING: discarding https://files.pythonhosted.org/packages/69/43/3e247b7b2134b48e9a53fb387e191e5e05b5f38f2faf78ca892097c2b441/django-haystack-2.8.1.tar.gz#sha256=8b54bcc926596765d0a3383d693bcdd76109c7abb6b2323b3984a39e3576028c (from https://pypi.org/simple/django-haystack/). Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output. Using cached django-haystack-2.8.0.tar.gz (425 kB) ERROR: Command errored out with exit status 1: command: /opt/python/run/venv/bin/python3 -c 'import io,tokenize; sys.argv[0] = '"'"'/tmp/pip-install-ji9vxolp/django-haystack_b5f23b3fb1794ae0b1220ef21f1b8b09/setup.py'"'"'; __file__='"'"'/tmp/pip-install-ji9vxolp/django-haystack_b5f23b3fb1794ae0b1220ef21f1b8b09/setup.py'"'"';f = getattr(tokenize,'"'"'exec'"'"'))' egg_info --egg-base /tmp/pip-pip-egg-info-sd7n9ubs cwd: /tmp/pip-install-ji9vxolp/django-haystack_b5f23b3fb1794ae0b1220ef21f1b8b09/ Complete output (23 lines): Couldn't find index page for 'setuptools_scm' (maybe misspelled?) No local packages or working download links found for setuptools_scm Traceback (most recent call last): File "",in File "/tmp/pip-install-ji9vxolp/django-haystack_b5f23b3fb1794ae0b1220ef21f1b8b09/setup.py",in easy_install raise distutilsError(msg) distutils.errors.distutilsError: Could not find suitable distribution for Requirement.parse('setuptools_scm') ---------------------------------------- WARNING: discarding https://files.pythonhosted.org/packages/5e/33/f7978374d447abd2803a2ea8128ff7296c89da42b0e9621ca9dd3495d2fc/django-haystack-2.8.0.tar.gz#sha256=579cd2080f7ad508e909a46c027078e278aeebd133973c1c4efcf0dc57d85c10 (from https://pypi.org/simple/django-haystack/). Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output. Using cached django-haystack-2.7.0.tar.gz (1.6 MB) ERROR: Command errored out with exit status 1: command: /opt/python/run/venv/bin/python3 -c 'import io,tokenize; sys.argv[0] = '"'"'/tmp/pip-install-ji9vxolp/django-haystack_ef77b238789b4b61bc1f1b36fd1ccc05/setup.py'"'"'; __file__='"'"'/tmp/pip-install-ji9vxolp/django-haystack_ef77b238789b4b61bc1f1b36fd1ccc05/setup.py'"'"';f = getattr(tokenize,'"'"'exec'"'"'))' egg_info --egg-base /tmp/pip-pip-egg-info-ls_ug5_i cwd: /tmp/pip-install-ji9vxolp/django-haystack_ef77b238789b4b61bc1f1b36fd1ccc05/ Complete output (23 lines): Couldn't find index page for 'setuptools_scm' (maybe misspelled?) No local packages or working download links found for setuptools_scm Traceback (most recent call last): File "",in Command output has been truncated. Please see logs for more details.

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)