无法在python3中建立pycrypto配方-工具链 [英] Unable to build pycrypto recipe in python3 - toolchain

查看:105
本文介绍了无法在python3中建立pycrypto配方-工具链的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

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

I am trying to package a simple Kivy app in iOS using the instruction in the site:

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

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

My app is very simple with 1 line:

from firebase import firebase

该应用程序可以使用linux在android中成功打包.但是,我在将其打包到iOS时遇到了问题.我需要建立一个名为pycrypto的食谱,但它给了我以下错误.我尝试了python2和python3.我仍然遇到相同的错误.网址链接似乎已失效( https: //ftp.dlitz.net/pub/dlitz/crypto/pycrypto/pycrypto-2.6.1.tar.gz )

The app can be packaged successfully in android using linux. However, I am having problem packaging it to iOS. I need to build a recipe named pycrypto but it's giving me the below error. I tried both python2 and python3. I still ended up with the same error. It seems the url link is dead (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

推荐答案

可以在

Answer can be found at https://github.com/kivy/kivy-ios/issues/384 Pycrypto can be built but it won't run properly. The workaround is to avoid firebase (which requires pycrypto) altogether. Use requests and json instead for simple get and post methods.

这篇关于无法在python3中建立pycrypto配方-工具链的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆