gpt4 book ai didi

ios - 无法在 python3 中构建 pycrypto 配方 - 工具链

转载 作者:行者123 更新时间:2023-11-29 05:28:54 26 4
gpt4 key购买 nike

我正在尝试使用网站中的说明在 iOS 中打包一个简单的 Kivy 应用程序:

https://github.com/kivy/kivy-ios

我的应用程序非常简单,只有 1 行:

from firebase import firebase

在android下使用linux可以成功打包app。但是,我在将其打包到 iOS 时遇到问题。我需要构建一个名为 pycrypto 的配方,但它给了我以下错误。我尝试了 python2 和 python3。我仍然遇到同样的错误。看来 url 链接已失效 ( https://ftp.dlitz.net/pub/dlitz/crypto/pycrypto/pycrypto-2.6.1.tar.gz )

https://kivy.org/doc/stable/guide/packaging-ios.html
hcaos-iMac:kivy-ios hcao$ ./toolchain.py build pycrypto
[INFO ] Building with 4 processes, where supported
[INFO ] Want to build ['pycrypto']
[INFO ] Loaded recipe pycrypto (depends of ['python', 'openssl'], optional are [])
[INFO ] Loaded recipe python (depends of [u'python3'], optional are [])
[INFO ] Loaded recipe openssl (depends of [], optional are [])
[INFO ] Loaded recipe python3 (depends of ['hostpython3', 'libffi', 'openssl'], optional are [])
[INFO ] Loaded recipe hostpython3 (depends of [], optional are ['openssl'])
[INFO ] Loaded recipe libffi (depends of [], optional are [])
[INFO ] Build order is ['libffi', 'openssl', 'hostpython3', u'python3', 'python', 'pycrypto']
[INFO ] Recipe order is ['libffi', 'openssl', 'hostpython3', 'python3', 'pycrypto']
[INFO ] Include dir added: {arch.arch}/ffi
[INFO ] Include dir added: {arch.arch}/openssl
[INFO ] Global: hostpython located at /Users/hcao/Desktop/kivyios-python3/kivy-ios/dist/hostpython3/bin/python
[INFO ] Global: hostpgen located at /Users/hcao/Desktop/kivyios-python3/kivy-ios/dist/hostpython3/bin/pgen
[DEBUG ] Cached result: Download libffi. Ignoring
[DEBUG ] Cached result: Extract libffi. Ignoring
[DEBUG ] Cached result: Build_all libffi. Ignoring
[DEBUG ] Cached result: Download openssl. Ignoring
[DEBUG ] Cached result: Extract openssl. Ignoring
[DEBUG ] Cached result: Build_all openssl. Ignoring
[DEBUG ] Cached result: Download hostpython3. Ignoring
[DEBUG ] Cached result: Extract hostpython3. Ignoring
[DEBUG ] Cached result: Build_all hostpython3. Ignoring
[DEBUG ] Cached result: Download python3. Ignoring
[DEBUG ] Cached result: Extract python3. Ignoring
[DEBUG ] Cached result: Build_all python3. Ignoring
[INFO ] Download pycrypto
[INFO ] Downloading https://ftp.dlitz.net/pub/dlitz/crypto/pycrypto/pycrypto-2.6.1.tar.gz
Traceback (most recent call last):
File "./toolchain.py", line 1569, in <module>
ToolchainCL()
File "./toolchain.py", line 1284, in __init__
getattr(self, args.command)()
File "./toolchain.py", line 1325, in build
build_recipes(args.recipe, ctx)
File "./toolchain.py", line 1161, in build_recipes
recipe.execute()
File "/Users/hcao/Desktop/kivyios-python3/kivy-ios/toolchain.py", line 726, in execute
self.download()
File "/Users/hcao/Desktop/kivyios-python3/kivy-ios/toolchain.py", line 84, in _cache_execution
f(self, *args, **kwargs)
File "/Users/hcao/Desktop/kivyios-python3/kivy-ios/toolchain.py", line 761, in download
self.download_file(self.url.format(version=self.version), fn)
File "/Users/hcao/Desktop/kivyios-python3/kivy-ios/toolchain.py", line 478, in download_file
urlretrieve(url, filename, report_hook)
File "/Library/Python/2.7/site-packages/future/backports/urllib/request.py", line 1731, in retrieve
fp = self.open(url, data)
File "/Library/Python/2.7/site-packages/future/backports/urllib/request.py", line 1703, in open
raise_with_traceback(IOError('socket error', msg))
File "/Library/Python/2.7/site-packages/future/backports/urllib/request.py", line 1697, in open
return getattr(self, name)(url)
File "/Library/Python/2.7/site-packages/future/backports/urllib/request.py", line 1907, in open_https
return self._open_generic_http(self._https_connection, url, data)
File "/Library/Python/2.7/site-packages/future/backports/urllib/request.py", line 1856, in _open_generic_http
http_conn.request("GET", selector, headers=headers)
File "/Library/Python/2.7/site-packages/future/backports/http/client.py", line 1083, in request
self._send_request(method, url, body, headers)
File "/Library/Python/2.7/site-packages/future/backports/http/client.py", line 1121, in _send_request
self.endheaders(body)
File "/Library/Python/2.7/site-packages/future/backports/http/client.py", line 1079, in endheaders
self._send_output(message_body)
File "/Library/Python/2.7/site-packages/future/backports/http/client.py", line 924, in _send_output
self.send(msg)
File "/Library/Python/2.7/site-packages/future/backports/http/client.py", line 860, in send
self.connect()
File "/Library/Python/2.7/site-packages/future/backports/http/client.py", line 1221, in connect
self.timeout, self.source_address)
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/socket.py", line 575, in create_connection
raise err
IOError: [Errno socket error] [Errno 61] Connection refused

最佳答案

答案可以在 https://github.com/kivy/kivy-ios/issues/384 找到Pycrypto 可以构建,但无法正常运行。解决方法是完全避免使用 firebase(需要 pycrypto)。使用 requests 和 json 代替简单的 get 和 post 方法。

关于ios - 无法在 python3 中构建 pycrypto 配方 - 工具链,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/57864387/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com