在 Ubuntu 18.04 上安装 Kivy 不起作用

在 Ubuntu 18.04 上安装 Kivy 不起作用

我正在尝试安装 Python 框架 Kivy,但在使用 pip 时遇到了问题。

按照说明进行操作https://kivy.org/doc/stable/installation/installation-linux.html 我收到以下错误。

有人能帮忙吗?我应该在这里发布什么意见来解决这个问题?

$ python -m pip install --upgrade --user pip setuptools virtualenv

pip is configured with locations that require TLS/SSL, however the ssl module in Python is not available.
Cache entry deserialization failed, entry ignored
Could not fetch URL https://pypi.python.org/simple/pip/: There was a problem confirming the ssl certificate: Can't connect to HTTPS URL because the SSL module is not available. - skipping
Requirement already up-to-date: pip in /usr/local/lib/python3.6/site-packages
Could not fetch URL https://pypi.python.org/simple/setuptools/: There was a problem confirming the ssl certificate: Can't connect to HTTPS URL because the SSL module is not available. - skipping
Requirement already up-to-date: setuptools in /usr/local/lib/python3.6/site-packages
Collecting virtualenv
  Could not fetch URL https://pypi.python.org/simple/virtualenv/: There was a problem confirming the ssl certificate: Can't connect to HTTPS URL because the SSL module is not available. - skipping
  Could not find a version that satisfies the requirement virtualenv (from versions: )
No matching distribution found for virtualenv

--- 详细信息 --- Ubuntu 18.04.4 LTS “bionic”

答案1

安装 openssl 包。

sudo apt install openssl 

这应该可以做到。如果没有修复并且您正在使用 python3,那么您可以安装:

sudo apt install python3-pip 

然后尝试这个:

pip3 install setuptools vurtualenv

相关内容