python environment settings

news/2025/11/25 20:52:57/文章来源:https://www.cnblogs.com/panpanwelcome/p/19270048

Install python

https://www.python.org/

 

for example:

python-3.14.0-amd64.exe

 

install

image

 

 

 

List all python installed in local machine

> py -0
-V:3.14 * Python 3.14 (64-bit)
-V:3.13 Python 3.13 (64-bit)
-V:3.12 Python 3.12 (64-bit)
-V:3.11 Python 3.11 (64-bit)

  

 

Create virtual enviornement for python project

> python --version
Python 3.9.13

 

 

 

> py -m venv myenv_3_14

 

 

> .\myenv_3_14\Scripts\activate
(myenv_3_14) PS D:\

 

(myenv_3_14) PS D:\> python --version
Python 3.14.0
(myenv_3_14)

 

 

> deactivate

  

 Jupyter Notebook

 

 

> py --version
Python 3.14.0

 

> py -m pip install --upgrade pip

 

> py -m pip install notebook




> jupyter notebook [I 2025-11-25 20:46:28.199 ServerApp] Extension package jupyter_server_terminals took 0.6866s to import [I 2025-11-25 20:46:28.706 ServerApp] jupyter_lsp | extension was successfully linked. [I 2025-11-25 20:46:28.712 ServerApp] jupyter_server_terminals | extension was successfully linked. [I 2025-11-25 20:46:28.727 ServerApp] jupyterlab | extension was successfully linked. [I 2025-11-25 20:46:28.738 ServerApp] notebook | extension was successfully linked.
...

Or copy and paste one of these URLs:http://localhost:8888/tree?token=a7b0746c1f0cd96588efa4198781436a3d4cf4ff2e7dbdf6http://127.0.0.1:8888/tree?token=a7b0746c1f0cd96588efa4198781436a3d4cf4ff2e7dbdf6

 

image

image

 

 

1. Jupyter Notebook

  • What it is:
    An interactive web-based environment for writing and running code, especially popular in data science and machine learning.
  • Key Features:
    • Runs in your browser.
    • Supports Markdown for documentation alongside code.
    • Allows inline visualization (charts, plots, images).
    • Supports multiple languages via kernels (Python, R, Julia, etc.).
    • Ideal for exploratory programming, data analysis, and sharing notebooks.
  • Use Case:
    Great for data science, machine learning, prototyping, and teaching.

2. Regular Python Notebook / IDE (e.g., VS Code, PyCharm)

  • What it is:
    A traditional development environment for writing Python scripts (.py files).
  • Key Features:
    • Focused on software development rather than interactive exploration.
    • No built-in Markdown or inline visualization (though IDEs can integrate tools).
    • Better for large projects, debugging, and version control.
  • Use Case:
    Ideal for production code, backend development, and complex applications.

Main Differences

FeatureJupyter NotebookPython IDE / Notebook
Interface Web-based Desktop application
File Type .ipynb .py
Documentation Markdown + Code Comments only
Visualization Inline plots/images Separate windows
Best For Data analysis, ML Full-scale development

 

 User VS code Edit .ipynb code

add file test.ipynb

 

image

 

image

 

ipykernel is a key component of the Jupyter ecosystem. Here’s what it is and why it matters:


What is ipykernel?

  • Definition:
    ipykernel is the Python kernel for Jupyter. A kernel is the computational engine that executes the code contained in your Jupyter Notebook cells.
  • It allows Jupyter Notebook (or JupyterLab) to run Python code and communicate with the notebook interface.

How it works

  • When you start a Jupyter Notebook, it launches a kernel in the background.
  • The kernel:
    • Executes Python code.
    • Sends results back to the notebook interface.
    • Handles variables, imports, and state during your session.

Why do you need it?

    • Without ipykernel, Jupyter cannot run Python code.
    • It’s installed automatically with Jupyter, but if you want to add Python to Jupyter from a virtual environment, you need to install ipykernel in that environment.

 

 

PS,

VS code extention used

image

 

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

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

相关文章

2025 年 11 月靶材廠家權威推薦榜:濺射/磁控濺射/旋轉靶材,ITO/半導體/光學鍍膜,陶瓷/金屬/鈦/鋁/銅/鎢/鉬/鉭/矽/合金/稀土靶材精選,工藝精湛與創新應用深度解析

2025 年 11 月靶材廠家權威推薦榜:濺射/磁控濺射/旋轉靶材,ITO/半導體/光學鍍膜,陶瓷/金屬/鈦/鋁/銅/鎢/鉬/鉭/矽/合金/稀土靶材精選,工藝精湛與創新應用深度解析 行業發展現狀與技術趨勢 隨著全球高科技產業的快速…

2025 年 11 月高壓清洗服務廠家推薦排行榜,管道/下水道/污水管/市政管道高壓清洗,化糞池/隔油池/污水池專業清洗,家庭/商鋪/小區/工廠高效深度清潔首選!

2025 年 11 月高壓清洗服務廠家推薦排行榜,管道/下水道/污水管/市政管道高壓清洗,化糞池/隔油池/污水池專業清洗,家庭/商鋪/小區/工廠高效深度清潔首選! 行業背景分析 高壓清洗技術作為現代化清潔維護的重要組成部…

如何在C++中实现面向对象编程?

C++ 面向对象编程(OOP)的核心是 封装、继承、多态,通过 class 关键字定义类,将数据(成员变量)和操作(成员函数)绑定在一起,同时支持派生类扩展基类、虚函数实现动态行为。以下是具体实现方法和示例: 一、封装…

2025 年 11 月鍍膜材料源頭廠家權威推薦榜:真空鍍膜材料、光學鍍膜材料、金屬鍍膜材料,高效能與耐用性深度解析

2025 年 11 月鍍膜材料源頭廠家權威推薦榜:真空鍍膜材料、光學鍍膜材料、金屬鍍膜材料,高效能與耐用性深度解析 前言:鍍膜材料產業發展現狀與技術趨勢 隨著全球高科技製造業的快速發展,鍍膜材料作為關鍵基礎材料,…

一物一码赋能全链路管控,二脉科技互动溯源系统引领行业新生态 !

在假冒伪劣产品频发、市场窜货乱象丛生的当下,防伪溯源成为企业守护品牌信誉、保障消费者权益的核心防线。防伪溯源、追溯系统、追溯防窜货等需求日益迫切,而防伪追溯、防伪码溯源码、追溯码、一物一码二维码追溯等技…

最简单的畅通工程

1.千万别忘记路径压缩:顺便把经历的父节点给变成根节点 2.道路=独立的-1 3.最后判断fa==i就是独立的 不用find一开始的初始化不就是这样的么 #include <bits/stdc++.h> using namespace std; int fa[10005]; in…

高级程序语言设计第七次

这个作业属于:https://edu.cnblogs.com/campus/fzu/gjyycx 这个作业的要求:https://edu.cnblogs.com/campus/fzu/gjyycx/homework/15587 学号:102500416 姓名:王浩宇 第一题第二题第三题第四题第五题第六题第七题第…

有限元技巧核心原理与学习路径:从一维基础到多维拓展(七步流程)

pre { white-space: pre !important; word-wrap: normal !important; overflow-x: auto !important; display: block !important; font-family: "Consolas", "Monaco", "Courier New", …

唯物辩证法3大观点11原理

一、联系的观点 1、联系的普遍性和客观性原理世界上的一切事物都处于普遍联系之中,其中没有任何一个事物是孤立存在的,整个世界就是一个普遍联系的统一整体。 事物的联系又是客观的,不以人的意识为转移,人们不能否…

实用指南:面向高并发场景的舆情处置技术实践——基于字节探索Infoseek的架构拆解

实用指南:面向高并发场景的舆情处置技术实践——基于字节探索Infoseek的架构拆解2025-11-25 20:40 tlnshuju 阅读(0) 评论(0) 收藏 举报pre { white-space: pre !important; word-wrap: normal !important; overf…

Day48(18)-F:\硕士阶段\Java\课程代码\后端\web-ai-code\web-ai-project02\tlias-web-management

异常管理package com.itheima.exception;import com.itheima.pojo.Result; import lombok.extern.slf4j.Slf4j; import org.springframework.dao.DuplicateKeyException; import org.springframework.web.bind.annotat…

习题解析之:模拟生成微软序列号

习题解析之:模拟生成微软序列号【问题描述】 微软产品一般都有一个25位的序列号,用来区分每份微软产品。产品序列号由五组被“-”分隔开,由字母数字混合编制的字符串组成,每组字符串是由五个字符串组成。如: 36XJ…

sg 多堆的取石子游戏

我们的sg正宗适用题目来啦 #include <bits/stdc++.h> using namespace std; vector<int>k; int f[105]; int sg(int x) {if(f[x]!=-1) return f[x];set<int>s;for(auto it:k){if(it>x) continue;…

日总结 31

Launch4j 核心使用指南(Java 客户端打包成.exe) Launch4j 是 Java 客户端打包成 Windows .exe 最常用的开源工具,核心是将可运行 JAR 包封装为原生 exe,支持绑定 JRE、自定义图标、配置启动参数,无需用户手动安装…

AI写论文方法全揭秘:轻松掌握高效论文写作技巧

论文写作是研究者必备技能,但面对繁重任务和紧迫时间,高效完成高质量论文成难题。本文揭秘AI写论文方法与实用技巧,介绍AI辅助写作定义、优势及常见工具。分享论文大纲、摘要、国内外研究现状、结论的AI生成技巧及对…

加盟稳赚?2025广东自习室加盟TOP5品牌及盈利方案

加盟稳赚?2025广东自习室加盟TOP5品牌及盈利方案2025年广东自习室加盟市场已形成“智能升级与细分突围”的双轮格局:松鼠AI凭借“AI技术+线下实体”的成熟模式稳居头部,成为投资者首选;而一批聚焦特定赛道的特色品…

50046_基于微信小程序的电影票预订管理系统

1.项目包含 项目源码、项目文档、数据库脚本、软件工具等资料; 带你从零开始部署运行本套系统。 2.项目介绍 本电影票务预订系统采用微信小程序与Vue框架协同架构,构建多终端协同解决方案。在用户服务端口,系统集成…

102302114_比山布努尔兰_作业3

作业1 指定一个网站,爬取这个网站中的所有的所有图片,例如中国气象网(http://www.weather.com.cn)。实现单线程和多线程的方式爬取 作业代码 `import requests from bs4 import BeautifulSoup import os import th…

Verilog位宽赋值规则

https://mp.weixin.qq.com/s/7mwsUMI6CYvCCCZXZ98Apg

云栖实录|驰骋在数据洪流上:Flink+Hologres驱动零跑科技实时计算的应用与实践 - 指南

pre { white-space: pre !important; word-wrap: normal !important; overflow-x: auto !important; display: block !important; font-family: "Consolas", "Monaco", "Courier New", …