Kivy无法建立

时间:2020-07-03 10:06:22

标签: python macos kivy zsh macos-catalina

我的Kivy构建失败;我遵循了GitHub上的说明。 我的规格是:

macOS Catalina 10.15.5
XCode 11.5 (incl. CL Tools)

我有2种怀疑为什么这可能会失败。

  1. python3配方列出了3.8.2版
  2. 以某种方式无法下载openssl,如下面的错误消息所示

命令:

(venv) User-MBP ~ % toolchain build python3 kivy

错误:

...
[INFO    ] Download hostopenssl
[INFO    ] Downloading http://www.openssl.org/source/openssl-1.1.1f.tar.gz
[WARNING ] Download failed. Retrying in 1 second...
[WARNING ] Download failed. Retrying in 1 second...
[WARNING ] Download failed. Retrying in 1 second...
[WARNING ] Download failed. Retrying in 1 second...
[ERROR   ] Max download attempts reached: 5
Traceback (most recent call last):
  File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/urllib/request.py", line 1756, in open
    return getattr(self, name)(url)
  File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/urllib/request.py", line 1965, in open_https
    return self._open_generic_http(self._https_connection, url, data)
  File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/urllib/request.py", line 1914, in _open_generic_http
    http_conn.request("GET", selector, headers=headers)
  File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/http/client.py", line 1229, in request
    self._send_request(method, url, body, headers, encode_chunked)
  File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/http/client.py", line 1275, in _send_request
    self.endheaders(body, encode_chunked=encode_chunked)
  File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/http/client.py", line 1224, in endheaders
    self._send_output(message_body, encode_chunked=encode_chunked)
  File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/http/client.py", line 1016, in _send_output
    self.send(msg)
  File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/http/client.py", line 956, in send
    self.connect()
  File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/http/client.py", line 1392, in connect
    server_hostname=server_hostname)
  File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/ssl.py", line 412, in wrap_socket
    session=session
  File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/ssl.py", line 850, in _create
    self.do_handshake()
  File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/ssl.py", line 1108, in do_handshake
    self._sslobj.do_handshake()
ssl.SSLCertVerificationError: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:1045)

谢谢!

1 个答案:

答案 0 :(得分:1)

您应该授予对安装文件夹读写的完全访问权限

我建议你

  1. 创建一个安装文件夹示例版本。 授予对构建文件夹的完全访问权限(读和写) 将所有文件安装在该文件夹中

  2. %CD构建

  3. cd build%sudo -H工具链构建python3 kivy

https://www.youtube.com/watch?v=R5bAglvrUgQ