将Anaconda 中新建的虚拟环境添加到Jupyter notebook

news/2024/7/16 7:18:56 标签: jupyter, python, ide

将Anaconda 中新建的虚拟环境添加到Jupyter notebook中1. 激活conda环境

1. 激活已经新建的环境

conda activate (新建的环境名称)

2. 安装ipykernel

 conda install ipykernel

jupyter_clientImportError_cannot_import_name_secure_write_9">3.更新jupyter_client(若报ImportError: cannot import name ‘secure_write’)

pip install --upgrade jupyter_client

4. 将新建的环境环境写入notebook的kernel中

python -m ipykernel install --user --name (新建的环境名称) --display-name “python (新建的环境名称)”

6. 打开notebook

jupyter notebook

jupyternotebook_20">7.在打开的jupyternotebook中的内核中可以切换

jupyter_notebookanaconda_22">8.也可安装conda install nb_conda 来在jupyter notebook中引入anaconda虚拟环境


http://www.niftyadmin.cn/n/827473.html

相关文章

pip config 修改国内源

pip 命令修改国内源时,提示有多个位置的配置文件可能产生作用,所以最好的方式是在当前环境下直接用命令修改pip 的config 文件 常用命令 pip config set// 这个命令允许我们以namevalue的形式配置某些项,比如设置镜像源:pip con…

升级Ubuntu内核虚拟机VMWARE STATION打开错误

ubuntu升级内核后,导致打开VMware提示需要安装vmmon和vmnet模块,VMware可能无法正常启动 解决方法: git clone https://github.com/mkubecek/vmware-host-modules.git cd vmware-host-modules/ git checkout workstation-15.5.1 git fetch make make install如果再…

Anaconda各版本对应的python版本

对于原生base环境,对应的python版本 Packages included in Anaconda v.1.0 Packages included in Anaconda v.1.1 Packages included in Anaconda 1.2.1 Packages included in Anaconda 1.3.1 Packages included in Anaconda 1.4.0 Packages included in Anaconda …

学习的三重境界(想成功的人都不可错过)

据说人生有几重境界,一开始时“看山是山,看水是水”,然后再高一层境界时就会“看山不是山,看水不是水”,再到后来层次更深时的“看山还是山,看水还是水”。以前我也只是略微的了解,并没有把他放…

2019年PAT甲级春季真题及参考答案

1156(20 Sexy Primes 素数) 题目描述: Sexy primes are pairs of primes of the form (p, p6), so-named since “sex” is the Latin word for “six”. (Quoted from http://mathworld.wolfram.com/SexyPrimes.html) Now given an integer, you are supposed t…

2019年秋季PAT甲级考试真题及参考答案

1160 (20 Forever dfs回溯剪枝) 题目描述: “Forever number” is a positive integer A with K digits, satisfying the following constrains: the sum of all the digits of A is m;the sum of all the digits of A1 is n; andthe greatest common divisor of m and n is…

2019年PAT甲级冬季考试真题及参考答案

1164(20 图形输出 逻辑题 注意用string,getchar吸收换行符) 7-1 Good in C (20分) When your interviewer asks you to write “Hello World” using C, can you do as the following figure shows? Input Specification: Each input file contains one test c…

2020年PAT甲级春季考试真题及答案

1168 Prime Day The above picture is from Sina Weibo, showing May 23rd, 2019 as a very cool “Prime Day”. That is, not only that the corresponding number of the date 20190523 is a prime, but all its sub-strings ended at the last digit 3 are prime numbers. …