pip3 无法安装软件包 - 在嵌入式系统上找不到版本

pip3 无法安装软件包 - 在嵌入式系统上找不到版本

我在 TinkerOS(适用于华硕嵌入式计算机 Tinkerboard)上运行 python pip3。TinkerOS 基于 Debian。

linaro@chione:~$ uname -a
Linux chione 4.4.132+ #1 SMP Tue Oct 23 18:03:49 CST 2018 armv7l GNU/Linux 

linaro@chione:~$ lsb_release -a
No LSB modules are available.
Distributor ID: Debian
Description:    Debian GNU/Linux 9.11 (stretch)
Release:        9.11
Codename:       stretch 

不幸的是,我无法使用 安装任何软件包pip3。这是错误。

linaro@chione:~$ sudo pip3 install pyserial
Collecting pyserial
  Could not find a version that satisfies the requirement pyserial (from versions: )
No matching distribution found for pyserial

所有使用 pip 的包都会出现同样的错误。下面给出另一个示例。

linaro@chione:~$ sudo pip3 install wheel 0.33.6
Collecting wheel
  Could not find a version that satisfies the requirement wheel (from versions: )
No matching distribution found for wheel

我尝试删除并清除 pip 和 python3,apt-get但错误仍然存​​在。这是怎么回事?

另外,尝试从 git 安装诸如 pyserial 之类的包也不起作用。

linaro@chione:~/install$ git clone https://github.com/pyserial/pyserial.git
Cloning into 'pyserial'...
fatal: unable to access 'https://github.com/pyserial/pyserial.git/': server certificate verification failed. CAfile: /etc/ssl/certs/ca-certificates.crt CRLfile: none

答案1

事实证明,系统的日期被设置为过去的时间。

linaro@chione:~/install$ date -R
Thu, 03 Nov 2016 11:29:19 -0600

这个问题已修复:

sudo apt-get install ntp

现在,时间已经合适了:

linaro@chione:~/install$ date
Mon Jan 20 10:47:07 CST 2020

此外,pip 现在可以正常工作:

linaro@chione:~/install$ sudo pip3 install wheel
Collecting wheel
  Downloading https://files.pythonhosted.org/packages/00/83/b4a77d044e78ad1a45610eb88f745be2fd2c6d658f9798a15e384b7d57c9/wheel-0.33.6-py2.py3-none-any.whl
Installing collected packages: wheel
Successfully installed wheel-0.33.6

这似乎是证书和设置的时间的问题。

相关内容