设置 Mycroft 时遇到困难

设置 Mycroft 时遇到困难

所以我在我的 Kali 计算机上安装 Mycroft AI(Git 风格)。我运行 build_host_setup_debian.sh 没有任何问题,但是当我尝试运行 dev_setup.sh 时,出现以下错误:

Searching for pip==7.1.2
Best match: pip 7.1.2
Processing pip-7.1.2-py2.7.egg
pip 7.1.2 is already the active version in easy-install.pth
Installing pip script to /home/nonroot/.virtualenvs/mycroft/bin
Installing pip2.7 script to /home/nonroot/.virtualenvs/mycroft/bin
Installing pip2 script to /home/nonroot/.virtualenvs/mycroft/bin

Using /home/nonroot/.virtualenvs/mycroft/lib/python2.7/site-packages/pip-7.1.2-py2.7.egg
Processing dependencies for pip==7.1.2
Finished processing dependencies for pip==7.1.2
Traceback (most recent call last):
  File "/home/nonroot/.virtualenvs/mycroft/bin/pip", line 11, in <module>
    load_entry_point('pip==7.1.2', 'console_scripts', 'pip')()
  File "/home/nonroot/.virtualenvs/mycroft/local/lib/python2.7/site-   packages/pkg_resources/__init__.py", line 542, in load_entry_point
    return get_distribution(dist).load_entry_point(group, name)
  File "/home/nonroot/.virtualenvs/mycroft/local/lib/python2.7/site-   packages/pkg_resources/__init__.py", line 2569, in load_entry_point
    return ep.load()
  File "/home/nonroot/.virtualenvs/mycroft/local/lib/python2.7/site-    packages/pkg_resources/__init__.py", line 2229, in load
    return self.resolve()
  File "/home/nonroot/.virtualenvs/mycroft/local/lib/python2.7/site-packages/pkg_resources/__init__.py", line 2235, in resolve
    module = __import__(self.module_name, fromlist=['__name__'], level=0)
  File "/home/nonroot/.virtualenvs/mycroft/lib/python2.7/site-packages /pip-7.1.2-py2.7.egg/pip/__init__.py", line 15, in <module>
    from pip.vcs import git, mercurial, subversion, bazaar  # noqa
  File "/home/nonroot/.virtualenvs/mycroft/lib/python2.7/site-packages /pip-7.1.2-py2.7.egg/pip/vcs/mercurial.py", line 10, in <module>
    from pip.download import path_to_url
  File "/home/nonroot/.virtualenvs/mycroft/lib/python2.7/site-packages/pip-7.1.2-py2.7.egg/pip/download.py", line 38, in <module>
    from pip._vendor import requests, six
  File "/home/nonroot/.virtualenvs/mycroft/lib/python2.7/site-packages/pip-7.1.2-py2.7.egg/pip/_vendor/requests/__init__.py", line 53, in <module>
    from .packages.urllib3.contrib import pyopenssl
  File "/home/nonroot/.virtualenvs/mycroft/lib/python2.7/site-packages/pip-7.1.2-py2.7.egg/pip/_vendor/requests/packages/urllib3/contrib /pyopenssl.py", line 53, in <module>
    import OpenSSL.SSL
  File "/home/nonroot/.virtualenvs/mycroft/local/lib/python2.7/site-packages/OpenSSL/__init__.py", line 8, in <module>
    from OpenSSL import rand, crypto, SSL
  File "/home/nonroot/.virtualenvs/mycroft/local/lib/python2.7/site-packages/OpenSSL/SSL.py", line 124, in <module>
    SSL_ST_INIT = _lib.SSL_ST_INIT
AttributeError: 'module' object has no attribute 'SSL_ST_INIT'

我该如何修复这个错误?

答案1

更改pyOpenSSL==16.0.0requirements.txt 来pyOpenSSL==16.2.0解决这个问题。

更改后需要重新安装pip包。

pip uninstall pyOpenSSL pip install pyOpenSSL==16.2.0

答案2

我相信您遇到了此处报告的问题: https://github.com/MycroftAI/mycroft-core/issues/705

我们已在此 PR 中对此进行了修复: https://github.com/MycroftAI/mycroft-core/pull/751 基本上,这会更新requirements.txt中的pyOpenSSL版本。此修复目前位于 mycroft-core 的“dev”分支中,并将在 0.8.13 版本中移至 master

进行此更改后,您可能必须删除 ~/.virtualenv 文件夹,然后重新运行 dev_setup.sh

相关内容