当前位置:网站首页>安装OpenCV--conda建立虚拟环境并在jupyter中添加此环境的kernel
安装OpenCV--conda建立虚拟环境并在jupyter中添加此环境的kernel
2022-07-05 06:20:00 【寒叶飘逸_】
第一步:创建名为myopencv的虚拟环境
win+R -->cmd
conda create --name myopencv python=3.7
第二步:下载OpenCV-python
下载页面:https://www.lfd.uci.edu/~gohlke/pythonlibs/#opencv
找到OpenCV,因为当前python版本为3.7,操作系统为64位,所以下载
把安装文件下载到本地(D:\Anaconda3\envs\myopencv)
在cmd命令行中激活环境
activate myopencv
pip install D:\Anaconda3\envs\myopencv\opencv_python-4.4.0-cp37-cp37m-win_amd64.whl
之后进入myopencv的Python环境
发现在此环境中我没有安装numpy
退出Python环境,在myopencv环境中安装numpy
exit()
pip install numpy
再次进入myopencv的Python环境
import cv2
安装成功!!!
退出Python环境,查看环境中包含的所有包
exit()
pip list
发现没有ipykernel,进行安装
pip install ipykernel
安装成功
激活默认环境(base),查看当前环境(有*的是当前环境)
activate base
conda env base
进入要添加到jupyter的kernel的环境,输入
python -m ipykernel install --name myopencv
Installed kernelspec myopencv in C:\ProgramData\jupyter\kernels\myopencv
将kernel添加到jupyter的kernel列表中
查看jupyter的kernel列表
进入jupyter中查看
参考资料:
- https://zhuanlan.zhihu.com/p/37050300
- https://zhuanlan.zhihu.com/p/37708958
- https://www.jianshu.com/p/7a996a7f1c9e
- https://blog.csdn.net/zhaoguanghe/article/details/103389302
边栏推荐
- P2575 master fight
- Sum of three terms (construction)
- There are three kinds of SQL connections: internal connection, external connection and cross connection
- 栈 AcWing 3302. 表达式求值
- Network security skills competition in Secondary Vocational Schools -- a tutorial article on middleware penetration testing in Guangxi regional competition
- LeetCode 0108. Convert an ordered array into a binary search tree - the median of the array is the root, and the left and right of the median are the left and right subtrees respectively
- Gauss Cancellation acwing 884. Solution d'un système d'équations Xor linéaires par élimination gaussienne
- 【LeetCode】Easy | 20. Valid parentheses
- Single chip computer engineering experience - layered idea
- 20220213-CTF MISC-a_ good_ Idea (use of stegsolve tool) -2017_ Dating_ in_ Singapore
猜你喜欢
Appium automation test foundation - Summary of appium test environment construction
20220213-CTF MISC-a_ good_ Idea (use of stegsolve tool) -2017_ Dating_ in_ Singapore
MySQL advanced part 2: optimizing SQL steps
阿里巴巴成立企业数智服务公司“瓴羊”,聚焦企业数字化增长
MySQL advanced part 2: SQL optimization
可变电阻器概述——结构、工作和不同应用
MIT-6874-Deep Learning in the Life Sciences Week 7
阿里新成员「瓴羊」正式亮相,由阿里副总裁朋新宇带队,集结多个核心部门技术团队
MPLS experiment
博弈论 AcWing 891. Nim游戏
随机推荐
4. Object mapping Mapster
[2020]GRAF: Generative Radiance Fields for 3D-Aware Image Synthesis
高斯消元 AcWing 884. 高斯消元解异或線性方程組
Navicat連接Oracle數據庫報錯ORA-28547或ORA-03135
博弈论 AcWing 894. 拆分-Nim游戏
Simple selection sort of selection sort
RGB LED infinite mirror controlled by Arduino
[rust notes] 15 string and text (Part 1)
[leetcode] day94 reshape matrix
There are three kinds of SQL connections: internal connection, external connection and cross connection
Leetcode array operation
Sword finger offer II 058: schedule
1040 Longest Symmetric String
阿里新成员「瓴羊」正式亮相,由阿里副总裁朋新宇带队,集结多个核心部门技术团队
高斯消元 AcWing 884. 高斯消元解异或线性方程组
The difference between CPU core and logical processor
Leetcode recursion
[rust notes] 16 input and output (Part 1)
SQLMAP使用教程(一)
MatrixDB v4.5.0 重磅发布,全新推出 MARS2 存储引擎!