2. 配置版本

news2024/12/22 23:53:26

2.1  安装 Python 版本

① 首先打开 Anaconda 的 Prompt 终端,输入 jupyter kernelspec list,查看已经安装的 python 版本。如下图所示,只有 Anaconda 自带的 python3。

 ② 输入 conda create --name py3.6.3 python=3.6.3 命令,输入 [y]/n 时输入 y,创建 py3.6.3 虚拟环境,它会安装 python3.6.3 到 anaconda3 的 env 目录下。

 ③ 首先确保目前盘和要进入的盘一样,输入 cd D:\11_Anaconda\envs\py3.6.3\Scripts 命令,进入 py3.6.3 目录下的 Scripts 文件夹下。

 ④ 输入 conda activate py3.6.3 激活 py3.6.3环境后,再输入 pip install ipykernel 命令,会在 script 目录下会生成一系列工具,如下图所示。( 注意:当 pip install ipykernel 时,不能挂 VNP。)

 ⑤ 将 Anaconda 文件夹下的 share/jupyter/kernels 文件夹中已经存在的项目复制一份,重命名为 python3.6.3。

 ⑥ 打开文件夹中 json 文件,将 Python 3 改为 Python 3.6.3,如下图所示。

 ⑦ 再次打开 Anaconda 终端,输入 jupyter kernelspec list,可以查看到已成功安上 Python3.6.3 的虚拟环境。

 ⑧ 再次打开 Jupyter notebook,New 里面有 Python3.6.3 选项。

 ⑨ 在 Jupyter notebook 中,用 python 代码打印 python 版本。

import sys
print(sys.version)

结果:

3.6.3 |Anaconda, Inc.| (default, Nov  8 2017, 15:10:56) [MSC v.1900 64 bit (AMD64)]

2.2  安装 d2l 库

! pip install d2l

结果:

Requirement already satisfied: d2l in d:\11_anaconda\envs\py3.6.3\lib\site-packages (0.17.0)
Requirement already satisfied: requests in d:\11_anaconda\envs\py3.6.3\lib\site-packages (from d2l) (2.27.1)
Requirement already satisfied: numpy in d:\11_anaconda\envs\py3.6.3\lib\site-packages (from d2l) (1.19.5)
Requirement already satisfied: pandas in d:\11_anaconda\envs\py3.6.3\lib\site-packages (from d2l) (1.1.5)
Requirement already satisfied: jupyter in d:\11_anaconda\envs\py3.6.3\lib\site-packages (from d2l) (1.0.0)
Requirement already satisfied: matplotlib in d:\11_anaconda\envs\py3.6.3\lib\site-packages (from d2l) (3.3.4)
Requirement already satisfied: ipywidgets in d:\11_anaconda\envs\py3.6.3\lib\site-packages (from jupyter->d2l) (7.7.0)
Requirement already satisfied: ipykernel in d:\11_anaconda\envs\py3.6.3\lib\site-packages (from jupyter->d2l) (5.5.6)
Requirement already satisfied: nbconvert in d:\11_anaconda\envs\py3.6.3\lib\site-packages (from jupyter->d2l) (6.0.7)
Requirement already satisfied: jupyter-console in d:\11_anaconda\envs\py3.6.3\lib\site-packages (from jupyter->d2l) (6.4.3)
Requirement already satisfied: notebook in d:\11_anaconda\envs\py3.6.3\lib\site-packages (from jupyter->d2l) (6.4.10)
Requirement already satisfied: qtconsole in d:\11_anaconda\envs\py3.6.3\lib\site-packages (from jupyter->d2l) (5.2.2)
Requirement already satisfied: ipython-genutils in d:\11_anaconda\envs\py3.6.3\lib\site-packages (from ipykernel->jupyter->d2l) (0.2.0)
Requirement already satisfied: tornado>=4.2 in d:\11_anaconda\envs\py3.6.3\lib\site-packages (from ipykernel->jupyter->d2l) (6.1)
Requirement already satisfied: jupyter-client in d:\11_anaconda\envs\py3.6.3\lib\site-packages (from ipykernel->jupyter->d2l) (7.1.2)
Requirement already satisfied: ipython>=5.0.0 in d:\11_anaconda\envs\py3.6.3\lib\site-packages (from ipykernel->jupyter->d2l) (7.16.3)
Requirement already satisfied: traitlets>=4.1.0 in d:\11_anaconda\envs\py3.6.3\lib\site-packages (from ipykernel->jupyter->d2l) (4.3.3)
Requirement already satisfied: colorama in d:\11_anaconda\envs\py3.6.3\lib\site-packages (from ipython>=5.0.0->ipykernel->jupyter->d2l) (0.4.4)
Requirement already satisfied: decorator in d:\11_anaconda\envs\py3.6.3\lib\site-packages (from ipython>=5.0.0->ipykernel->jupyter->d2l) (5.1.1)
Requirement already satisfied: pygments in d:\11_anaconda\envs\py3.6.3\lib\site-packages (from ipython>=5.0.0->ipykernel->jupyter->d2l) (2.11.2)
Requirement already satisfied: prompt-toolkit!=3.0.0,!=3.0.1,<3.1.0,>=2.0.0 in d:\11_anaconda\envs\py3.6.3\lib\site-packages (from ipython>=5.0.0->ipykernel->jupyter->d2l) (3.0.26)
Requirement already satisfied: backcall in d:\11_anaconda\envs\py3.6.3\lib\site-packages (from ipython>=5.0.0->ipykernel->jupyter->d2l) (0.2.0)
Requirement already satisfied: setuptools>=18.5 in d:\11_anaconda\envs\py3.6.3\lib\site-packages (from ipython>=5.0.0->ipykernel->jupyter->d2l) (58.0.4)
Requirement already satisfied: pickleshare in d:\11_anaconda\envs\py3.6.3\lib\site-packages (from ipython>=5.0.0->ipykernel->jupyter->d2l) (0.7.5)
Requirement already satisfied: jedi<=0.17.2,>=0.10 in d:\11_anaconda\envs\py3.6.3\lib\site-packages (from ipython>=5.0.0->ipykernel->jupyter->d2l) (0.17.2)
Requirement already satisfied: parso<0.8.0,>=0.7.0 in d:\11_anaconda\envs\py3.6.3\lib\site-packages (from jedi<=0.17.2,>=0.10->ipython>=5.0.0->ipykernel->jupyter->d2l) (0.7.1)
Requirement already satisfied: wcwidth in d:\11_anaconda\envs\py3.6.3\lib\site-packages (from prompt-toolkit!=3.0.0,!=3.0.1,<3.1.0,>=2.0.0->ipython>=5.0.0->ipykernel->jupyter->d2l) (0.2.5)
Requirement already satisfied: six in d:\11_anaconda\envs\py3.6.3\lib\site-packages (from traitlets>=4.1.0->ipykernel->jupyter->d2l) (1.16.0)
Requirement already satisfied: nbformat>=4.2.0 in d:\11_anaconda\envs\py3.6.3\lib\site-packages (from ipywidgets->jupyter->d2l) (5.1.3)
Requirement already satisfied: widgetsnbextension~=3.6.0 in d:\11_anaconda\envs\py3.6.3\lib\site-packages (from ipywidgets->jupyter->d2l) (3.6.0)
Requirement already satisfied: jupyterlab-widgets>=1.0.0 in d:\11_anaconda\envs\py3.6.3\lib\site-packages (from ipywidgets->jupyter->d2l) (1.1.0)
Requirement already satisfied: jupyter-core in d:\11_anaconda\envs\py3.6.3\lib\site-packages (from nbformat>=4.2.0->ipywidgets->jupyter->d2l) (4.9.1)
Requirement already satisfied: jsonschema!=2.5.0,>=2.4 in d:\11_anaconda\envs\py3.6.3\lib\site-packages (from nbformat>=4.2.0->ipywidgets->jupyter->d2l) (3.2.0)
Requirement already satisfied: attrs>=17.4.0 in d:\11_anaconda\envs\py3.6.3\lib\site-packages (from jsonschema!=2.5.0,>=2.4->nbformat>=4.2.0->ipywidgets->jupyter->d2l) (21.4.0)
Requirement already satisfied: pyrsistent>=0.14.0 in d:\11_anaconda\envs\py3.6.3\lib\site-packages (from jsonschema!=2.5.0,>=2.4->nbformat>=4.2.0->ipywidgets->jupyter->d2l) (0.18.0)
Requirement already satisfied: importlib-metadata in d:\11_anaconda\envs\py3.6.3\lib\site-packages (from jsonschema!=2.5.0,>=2.4->nbformat>=4.2.0->ipywidgets->jupyter->d2l) (4.8.3)
Requirement already satisfied: terminado>=0.8.3 in d:\11_anaconda\envs\py3.6.3\lib\site-packages (from notebook->jupyter->d2l) (0.12.1)
Requirement already satisfied: argon2-cffi in d:\11_anaconda\envs\py3.6.3\lib\site-packages (from notebook->jupyter->d2l) (21.3.0)
Requirement already satisfied: pyzmq>=17 in d:\11_anaconda\envs\py3.6.3\lib\site-packages (from notebook->jupyter->d2l) (22.3.0)
Requirement already satisfied: Send2Trash>=1.8.0 in d:\11_anaconda\envs\py3.6.3\lib\site-packages (from notebook->jupyter->d2l) (1.8.0)
Requirement already satisfied: prometheus-client in d:\11_anaconda\envs\py3.6.3\lib\site-packages (from notebook->jupyter->d2l) (0.13.1)
Requirement already satisfied: nest-asyncio>=1.5 in d:\11_anaconda\envs\py3.6.3\lib\site-packages (from notebook->jupyter->d2l) (1.5.4)
Requirement already satisfied: jinja2 in d:\11_anaconda\envs\py3.6.3\lib\site-packages (from notebook->jupyter->d2l) (3.0.3)
Requirement already satisfied: python-dateutil>=2.1 in d:\11_anaconda\envs\py3.6.3\lib\site-packages (from jupyter-client->ipykernel->jupyter->d2l) (2.8.2)
Requirement already satisfied: entrypoints in d:\11_anaconda\envs\py3.6.3\lib\site-packages (from jupyter-client->ipykernel->jupyter->d2l) (0.4)
Requirement already satisfied: pywin32>=1.0 in d:\11_anaconda\envs\py3.6.3\lib\site-packages (from jupyter-core->nbformat>=4.2.0->ipywidgets->jupyter->d2l) (303)
Requirement already satisfied: mistune<2,>=0.8.1 in d:\11_anaconda\envs\py3.6.3\lib\site-packages (from nbconvert->jupyter->d2l) (0.8.4)
Requirement already satisfied: defusedxml in d:\11_anaconda\envs\py3.6.3\lib\site-packages (from nbconvert->jupyter->d2l) (0.7.1)
Requirement already satisfied: jupyterlab-pygments in d:\11_anaconda\envs\py3.6.3\lib\site-packages (from nbconvert->jupyter->d2l) (0.1.2)
Requirement already satisfied: bleach in d:\11_anaconda\envs\py3.6.3\lib\site-packages (from nbconvert->jupyter->d2l) (4.1.0)
Requirement already satisfied: testpath in d:\11_anaconda\envs\py3.6.3\lib\site-packages (from nbconvert->jupyter->d2l) (0.6.0)
Requirement already satisfied: pandocfilters>=1.4.1 in d:\11_anaconda\envs\py3.6.3\lib\site-packages (from nbconvert->jupyter->d2l) (1.5.0)
Requirement already satisfied: nbclient<0.6.0,>=0.5.0 in d:\11_anaconda\envs\py3.6.3\lib\site-packages (from nbconvert->jupyter->d2l) (0.5.9)
Requirement already satisfied: MarkupSafe>=2.0 in d:\11_anaconda\envs\py3.6.3\lib\site-packages (from jinja2->notebook->jupyter->d2l) (2.0.1)
Requirement already satisfied: async-generator in d:\11_anaconda\envs\py3.6.3\lib\site-packages (from nbclient<0.6.0,>=0.5.0->nbconvert->jupyter->d2l) (1.10)
Requirement already satisfied: pywinpty>=1.1.0 in d:\11_anaconda\envs\py3.6.3\lib\site-packages (from terminado>=0.8.3->notebook->jupyter->d2l) (1.1.6)
Requirement already satisfied: dataclasses in d:\11_anaconda\envs\py3.6.3\lib\site-packages (from argon2-cffi->notebook->jupyter->d2l) (0.8)
Requirement already satisfied: argon2-cffi-bindings in d:\11_anaconda\envs\py3.6.3\lib\site-packages (from argon2-cffi->notebook->jupyter->d2l) (21.2.0)
Requirement already satisfied: typing-extensions in d:\11_anaconda\envs\py3.6.3\lib\site-packages (from argon2-cffi->notebook->jupyter->d2l) (3.10.0.2)
Requirement already satisfied: cffi>=1.0.1 in d:\11_anaconda\envs\py3.6.3\lib\site-packages (from argon2-cffi-bindings->argon2-cffi->notebook->jupyter->d2l) (1.15.0)
Requirement already satisfied: pycparser in d:\11_anaconda\envs\py3.6.3\lib\site-packages (from cffi>=1.0.1->argon2-cffi-bindings->argon2-cffi->notebook->jupyter->d2l) (2.21)
Requirement already satisfied: packaging in d:\11_anaconda\envs\py3.6.3\lib\site-packages (from bleach->nbconvert->jupyter->d2l) (21.3)
Requirement already satisfied: webencodings in d:\11_anaconda\envs\py3.6.3\lib\site-packages (from bleach->nbconvert->jupyter->d2l) (0.5.1)
Requirement already satisfied: zipp>=0.5 in d:\11_anaconda\envs\py3.6.3\lib\site-packages (from importlib-metadata->jsonschema!=2.5.0,>=2.4->nbformat>=4.2.0->ipywidgets->jupyter->d2l) (3.6.0)
Requirement already satisfied: cycler>=0.10 in d:\11_anaconda\envs\py3.6.3\lib\site-packages (from matplotlib->d2l) (0.11.0)
Requirement already satisfied: kiwisolver>=1.0.1 in d:\11_anaconda\envs\py3.6.3\lib\site-packages (from matplotlib->d2l) (1.3.1)
Requirement already satisfied: pyparsing!=2.0.4,!=2.1.2,!=2.1.6,>=2.0.3 in d:\11_anaconda\envs\py3.6.3\lib\site-packages (from matplotlib->d2l) (3.0.7)
Requirement already satisfied: pillow>=6.2.0 in d:\11_anaconda\envs\py3.6.3\lib\site-packages (from matplotlib->d2l) (8.4.0)
Requirement already satisfied: pytz>=2017.2 in d:\11_anaconda\envs\py3.6.3\lib\site-packages (from pandas->d2l) (2021.3)
Requirement already satisfied: qtpy in d:\11_anaconda\envs\py3.6.3\lib\site-packages (from qtconsole->jupyter->d2l) (2.0.1)
Requirement already satisfied: idna<4,>=2.5 in d:\11_anaconda\envs\py3.6.3\lib\site-packages (from requests->d2l) (3.3)
Requirement already satisfied: charset-normalizer~=2.0.0 in d:\11_anaconda\envs\py3.6.3\lib\site-packages (from requests->d2l) (2.0.12)
Requirement already satisfied: certifi>=2017.4.17 in d:\11_anaconda\envs\py3.6.3\lib\site-packages (from requests->d2l) (2021.5.30)
Requirement already satisfied: urllib3<1.27,>=1.21.1 in d:\11_anaconda\envs\py3.6.3\lib\site-packages (from requests->d2l) (1.26.9)
Note: you may need to restart the kernel to use updated packages.

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:http://www.coloradmin.cn/o/948915.html

如若内容造成侵权/违法违规/事实不符,请联系多彩编程网进行投诉反馈,一经查实,立即删除!

相关文章

rman备份数据文件和归档指定不同的filesperset

客户说带库上抓小文件会导致带库紧张。 大部分的备份软件都会用filesperset参数来做备份&#xff0c;这样恢复速度快&#xff0c;而且也有利于带库重复删除。 客户用的plus archivelog的形式&#xff0c;一条命令的做全备&#xff0c;现在就有filesperset不区分dbf和arc的情况…

Java之API详解之Objects类的详细解析

5 Objects类 5.1 概述 tips&#xff1a;了解内容 查看API文档&#xff0c;我们可以看到API文档中关于Objects类的定义如下&#xff1a; Objects类所在包是在java.util包下&#xff0c;因此在使用的时候需要进行导包。并且Objects类是被final修饰的&#xff0c;因此该类不能被继…

跨境电商独立站如何实现全球开店,获得更多流量?

对于独立站卖家来说&#xff0c;针对一个国家搭建一个站点、运营&#xff0c;就已经要花上不少力气了。更别说想要在多个市场售卖了&#xff0c;每个国家不同的货币、语言、定价、付款方式等等就已经够让人头大。 研究显示&#xff0c;40%的人不会从其他语言的网站上购买产品。…

Windows系统配置jar包自启动

目录 一、下载 WinSW.NET4.exe二、创建windows的目录结构三、编写xml配置文件四、检查环境4.1 是否安装jdk4.2 是否存在.net framework4的服务 五、安装 一、下载 WinSW.NET4.exe https://github.com/winsw/winsw/releases 下载完毕改名为jar名&#xff0c;也就是 项目.exe64位…

QT使用QImage做图片切割

#include "mainwindow.h" #include "ui_mainwindow.h" #include <QFileDialog> #include <QDebug>MainWindow::MainWindow(QWidget *parent) :QMainWindow(parent),ui(new Ui::MainWindow) {ui->setupUi(this);// 选择本地图片文件QString …

了解java中的通配符“?“

目录 通配符的作用 先看一段代码 用通配符"?"后,代码变化 结论 通配符上界 通配符下界 对通配符上下界的注释理解及其练习代码 简记: ? 用于在泛型的使用&#xff0c;即为通配符. 在Java中&#xff0c;通配符&#xff08;wildcard&#xff09;主要用于泛型…

11.物联网lwip,网卡原理

一。LWIP协议栈内存管理 1.LWIP内存管理方案 &#xff08;1&#xff09;堆heap 1.灰色为已使用内存 2.黑色为未使用内存 3.紫色为使用后内存 按照某种算法&#xff0c;把数据放在内存块中 &#xff08;2&#xff09;池pool 设置内存池&#xff0c;设置成大小相同的内存块。 2…

想报考pmp,一定得经过培训机构吗?

想要申请PMP考试&#xff0c;必须具备35个学时的PMBOK项目管理学习或培训经验。这是报考的首要条件。 所有符合条件的机构必须具备“PMI”和“中国国际基金会人才交流中心”的授权资质之一即可 首先&#xff0c;在进行英文报名时&#xff0c;需要提供并填写35学时的培训经历。…

WordPress(2)主题安装-菜单-菜单图标

提示:文章写完后,目录可以自动生成,如何生成可参考右边的帮助文档 文章目录 前言一、上传你的主题文件启用我的是 LoliMeow二、主题设置1.小工具中设置即可在网站右侧显示2.在文章中新建分类用做菜单3.也可在文字的前面添加图标[图标库](http://fa.fangguokeji.cn/)前言 提…

Visual Studio 2022的MFC框架——AfxWinMain全局对象和InitInstance函数

我是荔园微风&#xff0c;作为一名在IT界整整25年的老兵&#xff0c;今天我们来重新审视一下Visual Studio 2022下开发工具的MFC框架知识。 在看这篇帖子前&#xff0c;请先看我的另一篇帖子《Visual Studio 2022的MFC框架——应用程序向导》。 当程序调用了CWinApp类的构造…

shell常用脚本

1、Java项目重启脚本 #!/bin/bash# 定义一个函数来结束进程和启动新进程 function restart(){JAR_NAME$1 # jar包LOG_NAME$2 # 日志JVM_ARGS$3 # jvm 参数PID$(ps -ef | grep java | grep ${JAR_NAME} | awk { print $2 })if [[ ! -z "$PID" ]]; thenecho "…

LeetCode(力扣)700. 二叉搜索树中的搜索Python

LeetCode20. 有效的括号 题目链接代码 题目链接 https://leetcode.cn/problems/search-in-a-binary-search-tree/ 代码 递归法 # Definition for a binary tree node. # class TreeNode: # def __init__(self, val0, leftNone, rightNone): # self.val val #…

进度猫:如何做好项目进度管理?有几点建议

项目目进度管理是在项目实施过程中&#xff0c;对各阶段的进展和项目最终完成的期限进行的管理。目的是保证项目能在满足其时间的约束条件的前提下实现项目的总体目标。 因此为了保证项目能够按时完成&#xff0c;需要制订详尽的可操作性的项目进度管理计划&#xff0c;才可以…

MySQL数据库备份及恢复

数据备份的重要性 1、备份的主要目的是灾难恢复 2、在生产环境中&#xff0c;数据的安全性至关重要 3、任何数据的丢失都可能产生严重的后果 4、造成数据丢失的原因 备份类型(重点) 1、物理备份 数据库备份可以分为物理备份和逻辑备份。物理备份是对数据库操作系统的物…

【App端】uni-app使用百度地图api和echarts省市地图下钻

目录 前言方案一&#xff1a;echarts百度地图获取百度地图AK安装echarts和引入百度地图api完整使用代码 方案二&#xff1a;echarts地图和柱状图变形动画实现思路完整使用代码 方案三&#xff1a;中国地图和各省市地图下钻实现思路完整使用代码 前言 近期的app项目中想加一个功…

QGIS-计算几何内部点(一定在几何内)

在提取几何图像的中心点相关的X Y时&#xff0c;我们往往希望提取的点在几何内部&#xff0c;因为对于不规则图形而言&#xff0c;特别是凹几何&#xff0c;提取的点可能在图形外&#xff0c;QGIS中提供了相关的函数用于提取点中心点&#xff1a; 打开图形的属性列表&#xff…

Springboot2.0 上传图片 jar包导出启动(第二章)

目录 一&#xff0c;目录文件结构讲解二&#xff0c;文件上传实战三&#xff0c;jar包方式运行web项目的文件上传和访问处理&#xff08;核心知识&#xff09;最后 一&#xff0c;目录文件结构讲解 简介&#xff1a;讲解SpringBoot目录文件结构和官方推荐的目录规范 1、目录讲解…

行业毒瘤还是长久需求?无代码编程会是趋势吗?

无代码和低代码都是这几年才诞生、但受到不少关注的新名词。无代码和低代码的发展前景如何&#xff1f;是一时兴起还是长久需求&#xff0c;是不是行业毒瘤&#xff0c;种种讨论络绎不绝。 无代码开发平台&#xff08;NCDP&#xff0c;No Code Development Platform&#xff09…

Java从入门到精通(五)· 内部类,枚举,泛型

Java从入门到精通&#xff08;五&#xff09; 内部类&#xff0c;枚举&#xff0c;泛型 一 内部类 1.概述 简单来说&#xff0c;如果一个类定义在另一个类的内部&#xff0c;这个类就是内部类。 使用场景&#xff1a;当一个类的内部&#xff0c;包含了一个完整的事务&#…

常见的软件测试模型

目录 1、瀑布模型 2、V模型 3、W模型 4、H模型 5、X模型 1、瀑布模型 瀑布模型是一种线性的、顺序的软件开发模型 上一阶段的输出结果作为下一阶段的输入 优点&#xff1a; &#xff08;1&#xff09;为项目提供了按阶段划分的检查点。 &#xff08;2&#xff09;当前一阶段…