我的问题不是在一行中安装多个软件包(我之前研究过的所有问题都在讨论 oneliner,但它仍然是连续的)。我正在安装opencv-python
适合我的系统的特定版本:3.4.0.14。
系统:
uname -a
Linux orangepi4 4.4.179-rk3399 #2 SMP Thu May 6 10:53:22 CST 2021 aarch64 aarch64 aarch64 GNU/Linux
虽然我更新了 pip,但需要很长时间building wheel for opencv-python (setup.py)...
(对此没有任何疑问,我知道这是预构建版本和 pip 版本的问题,我只需要等待)。我特别需要该版本,并且它必须是python 2.7
,而不是python 3.X
。
python -m pip install --upgrade pip
DEPRECATION: Python 2.7 reached the end of its life on January 1st, 2020. Please upgrade your Python as Python 2.7 is no longer maintained. pip 21.0 will drop support for Python 2.7 in January 2021. More details about Python 2 support in pip can be found at https://pip.pypa.io/en/latest/development/release-process/#python-2-support pip 21.0 will remove support for this functionality.
Defaulting to user installation because normal site-packages is not writeable
Requirement already up-to-date: pip in /home/orangepi/.local/lib/python2.7/site-packages (20.3.4)
现在,我看到还有一个无头选项,它应该更快。
pip install opencv-contrib-python-headless==3.4.0.14
(尽管 contrib 也应该需要更长的时间)。但我不想停止 opencv 构建过程,因为它已经运行了一个小时。当另一个命令已经在运行时,我可以在另一个终端中运行另一个pip install
命令pip install
吗?我还没有尝试过,因为我不想冒险破坏依赖项或包出现问题。
最后一点:在 pip 提出的仅有的 3 个软件包中,这是唯一一个正在构建的软件包。其余的一直报错:
ERROR: Could not find a version that satisfies the requirement opencv-python==3.4.3.18 (from versions: 3.4.0.14, 3.4.10.37, 4.3.0.38)
ERROR: No matching distribution found for opencv-python==3.4.3.37