当前位置:网站首页>安装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
边栏推荐
- SQL三种连接:内连接、外连接、交叉连接
- [2021]GIRAFFE: Representing Scenes as Compositional Generative Neural Feature Fields
- Navicat連接Oracle數據庫報錯ORA-28547或ORA-03135
- 开源存储这么香,为何我们还要坚持自研?
- 20220213-CTF MISC-a_ good_ Idea (use of stegsolve tool) -2017_ Dating_ in_ Singapore
- Overview of variable resistors - structure, operation and different applications
- Sqlmap tutorial (II) practical skills I
- Presentation of attribute value of an item
- Leetcode stack related
- Leetcode-6110: number of incremental paths in the grid graph
猜你喜欢
redis发布订阅命令行实现
Sorting out the latest Android interview points in 2022 to help you easily win the offer - attached is the summary of Android intermediate and advanced interview questions in 2022
MPLS experiment
Suppose a bank's ATM machine, which allows users to deposit and withdraw money. Now there is 200 yuan in an account, and both user a and user B have the right to deposit and withdraw money from this a
Chapter 6 relational database theory
背包问题 AcWing 9. 分组背包问题
可变电阻器概述——结构、工作和不同应用
[2021]IBRNet: Learning Multi-View Image-Based Rendering Qianqian
Operator priority, one catch, no doubt
求组合数 AcWing 888. 求组合数 IV
随机推荐
1.15 - input and output system
1039 Course List for Student
4. 对象映射 - Mapping.Mapster
求组合数 AcWing 889. 满足条件的01序列
Leetcode heap correlation
1.14 - assembly line
博弈论 AcWing 892. 台阶-Nim游戏
[rust notes] 14 set (Part 1)
Sum of three terms (construction)
Single chip computer engineering experience - layered idea
Appium foundation - use the first demo of appium
Leetcode-6109: number of people who know secrets
MySQL advanced part 2: MySQL architecture
How to set the drop-down arrow in the spinner- How to set dropdown arrow in spinner?
多屏电脑截屏会把多屏连着截下来,而不是只截当前屏
中国剩余定理 AcWing 204. 表达整数的奇怪方式
Basic explanation of typescript
Regulations for network security events of vocational group in 2022 Guizhou Vocational College skill competition
Arduino 控制的 RGB LED 无限镜
开源存储这么香,为何我们还要坚持自研?