当前位置:网站首页>安装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
边栏推荐
- [rust notes] 17 concurrent (Part 1)
- In depth analysis of for (VaR I = 0; I < 5; i++) {settimeout (() => console.log (I), 1000)}
- Leetcode-6108: decrypt messages
- A reason that is easy to be ignored when the printer is offline
- Nested method, calculation attribute is not applicable, use methods
- Alibaba's new member "Lingyang" officially appeared, led by Peng Xinyu, Alibaba's vice president, and assembled a number of core department technical teams
- Doing SQL performance optimization is really eye-catching
- 1041 Be Unique
- Introduction to LVS [unfinished (semi-finished products)]
- 1039 Course List for Student
猜你喜欢
1.13 - RISC/CISC
P2575 master fight
Operator priority, one catch, no doubt
MySQL advanced part 1: View
Matrixdb V4.5.0 was launched with a new mars2 storage engine!
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
RGB LED infinite mirror controlled by Arduino
SQLMAP使用教程(二)实战技巧一
Quickly use Amazon memorydb and build your own redis memory database
Real time clock (RTC)
随机推荐
SQLMAP使用教程(一)
Applicable to Net free barcode API [off] - free barcode API for NET [closed]
求组合数 AcWing 888. 求组合数 IV
[rust notes] 13 iterator (Part 2)
LeetCode-54
Traditional databases are gradually "difficult to adapt", and cloud native databases stand out
Gauss Cancellation acwing 884. Solution d'un système d'équations Xor linéaires par élimination gaussienne
MySQL advanced part 1: stored procedures and functions
Navicat連接Oracle數據庫報錯ORA-28547或ORA-03135
Leetcode-6110: number of incremental paths in the grid graph
QQ电脑版取消转义符输入表情
P2575 master fight
There are three kinds of SQL connections: internal connection, external connection and cross connection
栈 AcWing 3302. 表达式求值
Winter vacation water test 1 Summary
【LeetCode】Day94-重塑矩阵
Gaussian elimination acwing 884 Gauss elimination for solving XOR linear equations
SQL三种连接:内连接、外连接、交叉连接
背包问题 AcWing 9. 分组背包问题
Golang uses context gracefully