简体   繁体   English

Buildroot 中的 Python - PyDrive 错误

[英]Python in Buildroot - PyDrive errors

I am attempting to use an application in my buildroot target which uses PyDrive.我试图在我的 buildroot 目标中使用一个使用 PyDrive 的应用程序。

I am receiving the following errors:我收到以下错误:

# python driveapp.py
ERROR:root:code for hash md5 was not found.
Traceback (most recent call last):
  File "usr/lib/python2.7/hashlib.py", line 147, in <module>
  File "usr/lib/python2.7/hashlib.py", line 97, in __get_builtin_constructor
ValueError: unsupported hash type md5
ERROR:root:code for hash sha1 was not found.
Traceback (most recent call last):
  File "usr/lib/python2.7/hashlib.py", line 147, in <module>
  File "usr/lib/python2.7/hashlib.py", line 97, in __get_builtin_constructor
ValueError: unsupported hash type sha1
ERROR:root:code for hash sha224 was not found.
Traceback (most recent call last):
  File "usr/lib/python2.7/hashlib.py", line 147, in <module>
  File "usr/lib/python2.7/hashlib.py", line 97, in __get_builtin_constructor
ValueError: unsupported hash type sha224
ERROR:root:code for hash sha256 was not found.
Traceback (most recent call last):
  File "usr/lib/python2.7/hashlib.py", line 147, in <module>
  File "usr/lib/python2.7/hashlib.py", line 97, in __get_builtin_constructor
ValueError: unsupported hash type sha256
ERROR:root:code for hash sha384 was not found.
Traceback (most recent call last):
  File "usr/lib/python2.7/hashlib.py", line 147, in <module>
  File "usr/lib/python2.7/hashlib.py", line 97, in __get_builtin_constructor
ValueError: unsupported hash type sha384
ERROR:root:code for hash sha512 was not found.
Traceback (most recent call last):
  File "usr/lib/python2.7/hashlib.py", line 147, in <module>
  File "usr/lib/python2.7/hashlib.py", line 97, in __get_builtin_constructor
ValueError: unsupported hash type sha512
Traceback (most recent call last):
  File "driveapp.py", line 1, in <module>
    from pydrive.auth import GoogleAuth
  File "usr/lib/python2.7/site-packages/pydrive/auth.py", line 3, in <module>
  File "usr/lib/python2.7/site-packages/httplib2/__init__.py", line 51, in <module>
  File "usr/lib/python2.7/sha.py", line 10, in <module>
ImportError: cannot import name sha1

What modules am I missing?我缺少哪些模块? Can anyone help?任何人都可以帮忙吗?

DD DD

You are missing BR2_PACKAGE_PYTHON_HASHLIB option.您缺少BR2_PACKAGE_PYTHON_HASHLIB选项。 Perform following actions:执行以下操作:

  • enebale this option via make menuconfig通过make menuconfig启用此选项
  • remove your target Python rm -fr output/build/python-2.7*删除你的目标 Python rm -fr output/build/python-2.7*
  • invoke make to rebuild Python with hashlib module调用make使用 hashlib 模块重建 Python

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM