pythonsetup.pyegg_info现在在Docker上构建时未成功运行

lhcgjxsq  于 2023-03-11  发布在  Python
关注(0)|答案(1)|浏览(345)

它以前建得很好。
以前还能用的时候我没有改变。
这是它临死前的最后一刻。
正如你所看到的,它死在安装测量。
下面是Docker代码的一部分:

  1. # Install Python dependencies
  2. COPY requirements.txt /app/
  3. WORKDIR /app
  4. #RUN pip install --upgrade setuptools
  5. RUN pip install --upgrade pip
  6. RUN pip install -r requirements.txt

以下是错误

  1. #0 24.46 Collecting measurement==3.2.0
  2. #0 24.48 Downloading measurement-3.2.0.tar.gz (12 kB)
  3. #0 24.49 Preparing metadata (setup.py): started
  4. #0 30.54 Preparing metadata (setup.py): finished with status 'error'
  5. #0 30.55 error: subprocess-exited-with-error
  6. #0 30.55
  7. #0 30.55 × python setup.py egg_info did not run successfully.
  8. #0 30.55 │ exit code: 1
  9. #0 30.55 ╰─> [14 lines of output]
  10. #0 30.55 Traceback (most recent call last):
  11. #0 30.55 File "<string>", line 2, in <module>
  12. #0 30.55 File "<pip-setuptools-caller>", line 34, in <module>
  13. #0 30.55 File "/tmp/pip-install-uis_8hdi/measurement_709a216af0574a738b280207cf3f2a2e/setup.py", line 4, in <module>
  14. #0 30.55 setup(use_scm_version=True)
  15. #0 30.55 File "/usr/local/lib/python3.8/site-packages/setuptools/__init__.py", line 152, in setup
  16. #0 30.55 _install_setup_requires(attrs)
  17. #0 30.55 File "/usr/local/lib/python3.8/site-packages/setuptools/__init__.py", line 147, in _install_setup_requires
  18. #0 30.55 dist.fetch_build_eggs(dist.setup_requires)
  19. #0 30.55 File "/usr/local/lib/python3.8/site-packages/setuptools/dist.py", line 785, in fetch_build_eggs
  20. #0 30.55 resolved_dists = pkg_resources.working_set.resolve(
  21. #0 30.55 File "/usr/local/lib/python3.8/site-packages/pkg_resources/__init__.py", line 777, in resolve
  22. #0 30.55 raise VersionConflict(dist, req).with_context(dependent_req)
  23. #0 30.55 pkg_resources.ContextualVersionConflict: (sphinxcontrib.applehelp 1.0.3 (/tmp/pip-install-uis_8hdi/measurement_709a216af0574a738b280207cf3f2a2e/.eggs/sphinxcontrib.applehelp-1.0.3-py3.8.egg), Requirement.parse('sphinxcontrib-applehelp'), {'sphinx'})
  24. #0 30.55 [end of output]
  25. #0 30.55
  26. #0 30.55 note: This error originates from a subprocess, and is likely not a problem with pip.
  27. #0 30.56 error: metadata-generation-failed
  28. #0 30.56
  29. #0 30.56 × Encountered error while generating package metadata.
  30. #0 30.56 ╰─> See above for output.
  31. #0 30.56
  32. #0 30.56 note: This is an issue with the package mentioned above, not pip.
  33. #0 30.56 hint: See above for details.
nwnhqdif

nwnhqdif1#

在安装mysqlclient之前,你需要先安装一些库,运行以下代码:

  1. sudo apt-get install python3-dev default-libmysqlclient-dev build-essential

希望能有所帮助!

相关问题