Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
3.3k views
in Technique[技术] by (71.8m points)

I get 'AttributeError: module 'sipbuild.api' has no attribute 'prepare_metadata_for_build_wheel' when trying to build a Docker image of a python app

I am trying to build a docker image of a python application. It fails with the following error:

"Installing build dependencies: finished with status 'done'
  Getting requirements to build wheel: started
  Getting requirements to build wheel: finished with status 'done'
    Preparing wheel metadata: started
    Preparing wheel metadata: finished with status 'error'
    ERROR: Command errored out with exit status 1:
     command: /usr/local/bin/python /usr/local/lib/python3.9/site-packages/pip/_vendor/pep517/_in_process.py prepare_metadata_for_build_wheel /tmp/tmp2rwo2lno
         cwd: /tmp/pip-install-pie2zcdu/pyqt5_c8354bd2f8124946a971d0b85d6a3743
    Complete output (31 lines):
    Traceback (most recent call last):
      File "/usr/local/lib/python3.9/site-packages/pip/_vendor/pep517/_in_process.py", line 126, in prepare_metadata_for_build_wheel
        hook = backend.prepare_metadata_for_build_wheel
    AttributeError: module 'sipbuild.api' has no attribute 'prepare_metadata_for_build_wheel' "

I have updated to python 3.9 and PyQt5 (5.15.2) to no avail. I am using pip version 20.3.3 .

The requirements.txt file contents are:

bleach==3.1.5
cachetools==4.2.0
certifi==2020.4.5.1
chardet==3.0.4
colorama==0.4.3
cssselect==1.1.0
cssutils==1.0.2
docutils==0.16
idna==2.10
keyring==21.2.1
lxml==4.6.2
packaging==20.4
pika==1.1.0
pkginfo==1.5.0.1
premailer==3.7.0
Pygments==2.6.1
pyparsing==2.4.7
PyQt5==5.15.2
PyQt5-sip==12.7.2
PySimpleGUI==4.24.0
PyYAML==5.3.1
readme-renderer==26.0
requests==2.24.0
requests-toolbelt==0.9.1
rfc3986==1.4.0
six==1.15.0
tqdm==4.47.0
twine==3.2.0
urllib3==1.25.9
webencodings==0.5.1
yagmail==0.14.245

I am using OS X Catalina 10.15.7


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)
等待大神答复

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...