Install Python 3.6.x+Opencv 3.x via Anaconda

这篇博客介绍了如何通过Anaconda安装Python 3.6.5和OpenCV 3.4.9.31。步骤包括下载Anaconda、安装Anaconda、使用命令行安装numpy和matplotlib、安装opencv-python以及在Spyder中测试安装。推荐使用Anaconda是因为其内置了稳定的Python环境,并且提供了科学计算所需的工具。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

Versions:

  • Anaconda3 5.2.0
  • Python 3.6.5
  • opencv-python 3.4.9.31

This blog might be out of date soon, but the method introduced will last for a long time.

1. Download Anaconda

Previous versions of Anaconda are available in the archive(click to check). Considering the computer system, I choose to download Anaconda3-5.2.0-Windows-x86_64.exe including Python 3.6.5(since Python36 is more stable than Python37), so we need not to install Python seperately.

2. Install Anaconda

Steps are shown on https://docs.anaconda.com/anaconda/install/windows/.
After installation, run Anaconda Navigator, it can be seen that console_shortcut, Spyder and Jupyter notebook have been installed as well.

3. Install two packages —— numpy(necessary), matplotlib(optional)

Launch console_shortcut, type codes:

pip install numpy

Similarly, matplotlib can be installed by typing codes:

pip install matplotlib
4. Install opencv-python

Considering stablility, I choose to install opencv 3.x by continuing to type codes in console_shortcut:

pip install opencv-python==3.4.9.31

All available versions can be seen and downloaded from the website:
https://pypi.org/project/opencv-python/#history
By the way, installed packages can be checked by typing in pip list.

5. Test

Launch Spyder in Anaconda Navigator, type in

import cv2
print(cv2.__version__)

click   \, “Run”   \, button.

The result is shown in the picture.

Plus

Overview of Spyder :

Spyder is a powerful scientific environment written in Python, for Python, and designed by and for scientists, engineers and data analysts. It offers a unique combination of the advanced editing, analysis, debugging, and profiling functionality of a comprehensive development tool with the data exploration, interactive execution, deep inspection, and beautiful visualization capabilities of a scientific package.

In terms of data processing and analyzing, Spyder is better than PyCharm(another popular python IDLE), I think so.

UI for appreciation:
在这里插入图片描述
请忽略左下角丑陋的输入法和右侧来蹭脸的360加速球.

If you’d like to install Spyder seperately, see my another blog(click to have a look)!

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值