python3.4.4 配置opencv3.1 解决pip版本不够的问题

本文详细记录了在Python3.4.4环境中配置OpenCV3.1的过程,包括下载numpy和opencv的特定版本whl文件,通过cmd命令安装,并解决了遇到的pip版本不足的问题。最后通过import导入模块验证安装成功。

搞了好几个小时,沿着各种百度谷歌来的前人的脚步,总算成功了。

现分享出来,希望以后的盆友少走点弯路。

引用网址在此。

http://blog.youkuaiyun.com/baidu_32134295/article/details/52918453

http://www.lfd.uci.edu/~gohlke/pythonlibs/#numpy

http://wenku.baidu.com/link?url=oqLwPoORalL0ooQ1dfabEpYPuyofnh477vOlcgg7OTy6Lsxm3marK11CuYP5oUu0L6C1jzSTEs5ClvKazWwDfhPakqfWmkaKkmwyLduil3q


1. 安装python,在官网上下载安装即可,安装的时候记得勾选自动添加到环境变量。

2. http://www.lfd.uci.edu/~gohlke/pythonlibs/#numpy

在这个网址下载对应版本的numpy 和 opencv

(openpi) nvidia@nvidia-desktop:~/pi/simple_client$ pip install --upgrade "opencv-python-headless>=4.13.0" Defaulting to user installation because normal site-packages is not writeable Looking in indexes: https://pypi.tuna.tsinghua.edu.cn/simple ERROR: Ignored the following yanked versions: 3.4.11.39, 3.4.11.41, 4.4.0.40, 4.4.0.42, 4.4.0.44, 4.5.5.62, 4.7.0.68, 4.8.0.74 ERROR: Could not find a version that satisfies the requirement opencv-python-headless>=4.13.0 (from versions: 3.4.10.37, 3.4.11.43, 3.4 .11.45, 3.4.13.47, 3.4.15.55, 3.4.16.59, 3.4.17.61, 3.4.17.63, 3.4.18.65, 4.3.0.38, 4.4.0.46, 4.5.1.48, 4.5.3.56, 4.5.4.58, 4.5.4.60, 4 .5.5.64, 4.6.0.66, 4.7.0.72, 4.8.0.76, 4.8.1.78, 4.9.0.80, 4.10.0.82, 4.10.0.84, 4.11.0.86, 4.12.0.88) ERROR: No matching distribution found for opencv-python-headless>=4.13.0 (openpi) nvidia@nvidia-desktop:~/pi/simple_client$ pip install "pyzed<5.0" "rerun-sdk<0.26.0" Defaulting to user installation because normal site-packages is not writeable Looking in indexes: https://pypi.tuna.tsinghua.edu.cn/simple Collecting pyzed<5.0 Downloading https://pypi.tuna.tsinghua.edu.cn/packages/38/3d/d74e1a695c7b164f8ab711c51eb59220d121240d45016468ddd15235a9bd/pyzed-1.3.0 -py3-none-any.whl (3.1 kB) Collecting rerun-sdk<0.26.0 Downloading https://pypi.tuna.tsinghua.edu.cn/packages/07/15/3c9c60b28c0e399f980e58df6d7a98e82890623f99b39c731c6437fa86b5/rerun_sdk-0 .25.1-cp39-abi3-manylinux_2_28_aarch64.whl (90.8 MB) ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 90.8/90.8 MB 489.6 kB/s 0:01:49 Collecting durationpy (from pyzed<5.0) Downloading https://pypi.tuna.tsinghua.edu.cn/packages/b0/0d/9feae160378a3553fa9a339b0e9c1a048e147a4127210e286ef18b730f03/durationpy- 0.10-py3-none-any.whl (3.9 kB) Requirement already satisfied: python-dateutil in /home/nvidia/.local/lib/python3.10/site-packages (from pyzed<5.0) (2.9.0.post0) Requirement already satisfied: requests in /home/nvidia/.local/lib/python3.10/site-packages (from pyzed<5.0) (2.32.5) Requirement already satisfied: attrs>=23.1.0 in /home/nvidia/.local/lib/python3.10/site-packages (from rerun-sdk<0.26.0) (25.4.0) Collecting numpy>=2 (from rerun-sdk<0.26.0) Using cached https://pypi.tuna.tsinghua.edu.cn/packages/eb/17/96a3acd228cec142fcb8723bd3cc39c2a474f7dcf0a5d16731980bcafa95/numpy-2.2. 6-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (14.3 MB) Requirement already satisfied: pillow>=8.0.0 in /usr/lib/python3/dist-packages (from rerun-sdk<0.26.0) (9.0.1) Requirement already satisfied: pyarrow>=18.0.0 in /home/nvidia/.local/lib/python3.10/site-packages (from rerun-sdk<0.26.0) (22.0.0) Requirement already satisfied: typing-extensions>=4.5 in /home/nvidia/.local/lib/python3.10/site-packages (from rerun-sdk<0.26.0) (4.15 .0) Requirement already satisfied: six>=1.5 in /usr/lib/python3/dist-packages (from python-dateutil->pyzed<5.0) (1.16.0) Requirement already satisfied: charset_normalizer<4,>=2 in /home/nvidia/.local/lib/python3.10/site-packages (from requests->pyzed<5.0) (3.4.4) Requirement already satisfied: idna<4,>=2.5 in /usr/lib/python3/dist-packages (from requests->pyzed<5.0) (3.3) Requirement already satisfied: urllib3<3,>=1.21.1 in /home/nvidia/.local/lib/python3.10/site-packages (from requests->pyzed<5.0) (2.5.0 ) Requirement already satisfied: certifi>=2017.4.17 in /usr/lib/python3/dist-packages (from requests->pyzed<5.0) (2020.6.20) Installing collected packages: durationpy, numpy, rerun-sdk, pyzed Attempting uninstall: numpy Found existing installation: numpy 1.26.4 Uninstalling numpy-1.26.4: Successfully uninstalled numpy-1.26.4 Attempting uninstall: rerun-sdk Found existing installation: rerun-sdk 0.26.2 Uninstalling rerun-sdk-0.26.2: Successfully uninstalled rerun-sdk-0.26.2 Attempting uninstall: pyzed Found existing installation: pyzed 5.0 Uninstalling pyzed-5.0: Successfully uninstalled pyzed-5.0 ERROR: pip&#39;s dependency resolver does not currently take into account all the packages that are installed. This behaviour is the source of the following dependency conflicts. numba 0.59.1 requires numpy<1.27,>=1.22, but you have numpy 2.2.6 which is incompatible. Successfully installed durationpy-0.10 numpy-2.2.6 pyzed-1.3.0 rerun-sdk-0.25.1 (openpi) nvidia@nvidia-desktop:~/pi/simple_client$
最新发布
11-06
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值