当前位置:网站首页>安装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
边栏推荐
- 传统数据库逐渐“难适应”,云原生数据库脱颖而出
- Is it impossible for lamda to wake up?
- [2021]IBRNet: Learning Multi-View Image-Based Rendering Qianqian
- 1041 Be Unique
- Leetcode backtracking method
- In depth analysis of for (VaR I = 0; I < 5; i++) {settimeout (() => console.log (I), 1000)}
- What is socket? Basic introduction to socket
- __ builtin_ Popcount() counts the number of 1s, which are commonly used in bit operations
- Leetcode-6108: decrypt messages
- [rust notes] 17 concurrent (Part 1)
猜你喜欢

MatrixDB v4.5.0 重磅发布,全新推出 MARS2 存储引擎!

1.13 - RISC/CISC

SQL三种连接:内连接、外连接、交叉连接

Arduino 控制的 RGB LED 无限镜

阿里新成员「瓴羊」正式亮相,由阿里副总裁朋新宇带队,集结多个核心部门技术团队
![[2021]GIRAFFE: Representing Scenes as Compositional Generative Neural Feature Fields](/img/65/7fa32cd0005ddaaebacd85c25e0c7e.jpg)
[2021]GIRAFFE: Representing Scenes as Compositional Generative Neural Feature Fields

What is socket? Basic introduction to socket

SPI details

什么是套接字?Socket基本介绍

数据可视化图表总结(二)
随机推荐
MySQL advanced part 1: stored procedures and functions
What is socket? Basic introduction to socket
Leetcode array operation
RGB LED infinite mirror controlled by Arduino
Record the process of configuring nccl and horovod in these two days (original)
Series of how MySQL works (VIII) 14 figures explain the atomicity of MySQL transactions and the principle of undo logging
LeetCode 1200. Minimum absolute difference
[rust notes] 14 set (Part 2)
New title of module a of "PanYun Cup" secondary vocational network security skills competition
Appium automation test foundation - Summary of appium test environment construction
Data visualization chart summary (I)
Leetcode-3: Longest substring without repeated characters
LVS简介【暂未完成(半成品)】
SQL三种连接:内连接、外连接、交叉连接
[leetcode] day95 effective Sudoku & matrix zeroing
927. Trisection simulation
MySQL怎么运行的系列(八)14张图说明白MySQL事务原子性和undo日志原理
11-gorm-v2-03-basic query
Leetcode-6110: number of incremental paths in the grid graph
Leetcode recursion