深度学习Python--常用术语和Python环境
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><strong style="color: blue;">终端窗口 </strong></p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"> 终端窗口是计算机操作系统中的一种界面,能够让用户在命令行下进行操作。</p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"> 在终端窗口中,用户<span style="color: black;">能够</span>输入命令,执行程序和<span style="color: black;">拜访</span>文件系统。</p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"> 终端窗口<span style="color: black;">亦</span><span style="color: black;">能够</span>被<span style="color: black;">叫作</span>为命令行窗口、命令行终端、<span style="color: black;">掌控</span>台窗口、cmd窗口、dos窗口。</p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><img src="//q5.itc.cn/images01/20240517/c6f6be8bdb4b40d6816b8d4a7702cf67.jpeg" style="width: 50%; margin-bottom: 20px;"></p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><strong style="color: blue;">Windows系统打开方式</strong></p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><img src="//q4.itc.cn/images01/20240517/e95de64d2cdb4c53828304d66128c21a.jpeg" style="width: 50%; margin-bottom: 20px;"></p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><strong style="color: blue;">MacOS系统打开方式</strong></p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><img src="//q9.itc.cn/images01/20240517/68b98147b6f049f881601c789dbe65b4.jpeg" style="width: 50%; margin-bottom: 20px;"></p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><strong style="color: blue;">Python环境安装 </strong></p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><strong style="color: blue;">安装Anaconda</strong></p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"> 开源的Python发行版本,其<span style="color: black;">包括</span>了conda、Python等180多个科学包及其依赖项</p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"> 下载<span style="color: black;">位置</span>:https://www.anaconda.com/download</p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><img src="//q8.itc.cn/images01/20240517/3658f7d434e24111b241a690df8a6762.jpeg" style="width: 50%; margin-bottom: 20px;"></p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><strong style="color: blue;">Windows系统Anaconda安装教程:</strong></p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;">https://www.bilibili.com/video/BV1B1421m7Kr/?spm_id_from=333.999.0.0&vd_source=175860c1f380d469f4d87d09069257ba</p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><strong style="color: blue;">macOS系统Anaconda安装教程:</strong></p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;">https://www.bilibili.com/video/BV1Xx421U7es/?spm_id_from=333.999.0.0&vd_source=175860c1f380d469f4d87d09069257ba</p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><strong style="color: blue;">Anaconda安装成功验证</strong></p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"> 1.打开终端</p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"> 2.输入命令:conda --version 或 python --version ,<span style="color: black;">而后</span>按回车</p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"> 3.<span style="color: black;">显现</span>版本号,安装成功 </p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><img src="//q7.itc.cn/images01/20240517/1bd4c78ac12740bbae75a1fbfee1a0ae.jpeg" style="width: 50%; margin-bottom: 20px;"></p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><strong style="color: blue;">说明:</strong></p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;">Windows系统成功安装Anaconda后,输入命令,<span style="color: black;">倘若</span>提示 ***不是内部或<span style="color: black;">外边</span>命令 ,<span style="color: black;">检测</span><span style="color: black;">是不是</span>已设置系统环境变量</p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"> 命令输入<span style="color: black;">不可</span>出错,尤其<span style="color: black;">重视</span>,是两个短横线 -</p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"> 版本号无需与上图一致</p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><img src="//q2.itc.cn/images01/20240517/11382b783eea45d99f1e57597f91dc40.png" style="width: 50%; margin-bottom: 20px;"></p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><strong style="color: blue;">远程软件</strong></p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"> 1.在<span style="color: black;">自动</span>安装软件的过程中,遇到难以<span style="color: black;">处理</span>的问题,<span style="color: black;">必须</span>远程<span style="color: black;">帮助</span>,可<span style="color: black;">选取</span>下载任意一种远程软件;</p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"> 2.将识别码(或设备代码)和验证码(或<span style="color: black;">秘码</span>)发到群里。</p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><img src="//q4.itc.cn/images01/20240517/2adb38fc005a4ce1945ed1b5ea2e4d28.jpeg" style="width: 50%; margin-bottom: 20px;"></p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><img src="//q4.itc.cn/images01/20240517/781f8c6397ae4f11bbc1437920286844.jpeg" style="width: 50%; margin-bottom: 20px;"></p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><strong style="color: blue;">绝对路径与相对路径</strong></p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><strong style="color: blue;">绝对路径</strong></p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><img src="//q9.itc.cn/images01/20240517/2ef8e647f39140119120f3173fd76691.jpeg" style="width: 50%; margin-bottom: 20px;"></p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><strong style="color: blue;">相对路径</strong></p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><img src="//q9.itc.cn/images01/20240517/3cffe49cba1a412297a424719c02e879.png" style="width: 50%; margin-bottom: 20px;"></p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><strong style="color: blue;">文件路径示例</strong></p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><img src="//q2.itc.cn/images01/20240517/ac05a5a0f72c4603a1f172f8603fd7a9.jpeg" style="width: 50%; margin-bottom: 20px;"></p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><strong style="color: blue;">cd命令</strong></p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"> cd:change directory</p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"> 是dos系统、Linux系统中的一个常用命令,用途<span style="color: black;">指的是</span>定要进入的目录。</p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><img src="//q3.itc.cn/images01/20240517/4a5ef44af6624915afe0e483f859e636.jpeg" style="width: 50%; margin-bottom: 20px;"></p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><strong style="color: blue;">清空窗口内容的命令</strong></p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><img src="//q9.itc.cn/images01/20240517/725080370d254ec7be758edfbc760daa.jpeg" style="width: 50%; margin-bottom: 20px;"></p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><strong style="color: blue;">Conda虚拟环境</strong></p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><strong style="color: blue;">虚拟环境的<span style="color: black;">功效</span></strong></p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"> Conda 虚拟环境是为了在单个系统中创建和管理<span style="color: black;">区别</span>的项目所需的独立 Python 环境。<strong style="color: blue;"><span style="color: black;">重点</span><span style="color: black;">功效</span><span style="color: black;">包含</span>:</strong></p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"> 1. 隔离依赖: <span style="color: black;">每一个</span> Conda 虚拟环境都有自己的独立 Python 解释器和安装的软件包,这<span style="color: black;">寓意</span>着你<span style="color: black;">能够</span>在<span style="color: black;">区别</span>的项目中<span style="color: black;">运用</span><span style="color: black;">区别</span>版本的软件包,而不必担心它们之间的冲突。</p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;">2. 项目隔离: <span style="color: black;">每一个</span>项目都<span style="color: black;">能够</span>在自己的虚拟环境中运行,这<span style="color: black;">寓意</span>着你<span style="color: black;">能够</span>为<span style="color: black;">每一个</span>项目<span style="color: black;">选取</span>特定的依赖项和版本,从而<span style="color: black;">保证</span>项目的环境保持一致,不受其他项目的影响。</p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"> 3. 便于复制和共享环境: <span style="color: black;">经过</span>创建虚拟环境,你<span style="color: black;">能够</span><span style="color: black;">容易</span>地复制和共享项目的环境。其他人<span style="color: black;">能够</span><span style="color: black;">运用</span>相同的环境来<span style="color: black;">保证</span><span style="color: black;">她们</span>在<span style="color: black;">区别</span>系统上<span style="color: black;">得到</span>与你相同的结果。</p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;">4. 环境配置的<span style="color: black;">方便</span>性: Conda <span style="color: black;">供给</span>了简单的命令来创建、激活和删除虚拟环境,这使得在<span style="color: black;">区别</span>项目之间<span style="color: black;">容易</span>切换以及管理环境变得非常方便。</p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"> 总之,Conda 虚拟环境使得管理 Python 项目的依赖项和环境变得更加简单和灵活,<span style="color: black;">同期</span><span style="color: black;">亦</span>有助于<span style="color: black;">保证</span>项目的隔离性和一致性。</p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><img src="//q5.itc.cn/images01/20240517/83ebeacff5ae4426b494bccb9b68d18e.jpeg" style="width: 50%; margin-bottom: 20px;"></p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><strong style="color: blue;">Conda命令</strong></p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><img src="//q8.itc.cn/images01/20240517/56626bb514f74af7900304c411c54e43.jpeg" style="width: 50%; margin-bottom: 20px;"></p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><img src="//q5.itc.cn/images01/20240517/1a9c3c8654b94226981ff7af01529f2e.png" style="width: 50%; margin-bottom: 20px;"></p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><img src="//q2.itc.cn/images01/20240517/d38461f774524c6fb10481f2ab16b05f.png" style="width: 50%; margin-bottom: 20px;"></p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><img src="//q3.itc.cn/images01/20240517/1166a9581691467d9c6b11f69fbfd71c.png" style="width: 50%; margin-bottom: 20px;"></p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><strong style="color: blue;">Python包管理工具pip</strong></p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><strong style="color: blue;">pip的<span style="color: black;">功效</span></strong></p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"> pip是Python语言中最常用的包管理工具之一,<strong style="color: blue;">它的<span style="color: black;">功效</span><span style="color: black;">包含</span>:</strong></p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;">1. 安装Python包:pip<span style="color: black;">能够</span>方便地从Python软件包索引(PyPI)或其他源安装Python包和模块。<span style="color: black;">经过</span>简单的命令,用户<span style="color: black;">能够</span><span style="color: black;">容易</span>地安装所需的软件包。</p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"> 例如:pip install package_name</p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"> 2. 卸载Python包:<span style="color: black;">运用</span>pip,用户<span style="color: black;">能够</span>卸载<span style="color: black;">再也不</span><span style="color: black;">必须</span>的Python包,以释放磁盘空间并<span style="color: black;">守护</span>整洁的<span style="color: black;">研发</span>环境。</p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;">命令为:pip uninstall package_name</p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"> 3. 管理Python包依赖关系:pip<span style="color: black;">能够</span>自动解析和安装Python软件包的依赖关系。这使得安装软件包时,pip能够自动安装所需的其他软件包,简化了软件包的管理。</p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;">4. 更新Python包:pip还<span style="color: black;">能够</span>用于更新已安装的Python软件包到最新版本,<span style="color: black;">保证</span>你的项目<span style="color: black;">运用</span>的是最新的功能和修复了的bug。</p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"> 命令为:pip install --upgrade package_name</p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"> 总之,pip是Python<span style="color: black;">研发</span>中不可或缺的工具,它简化了Python包的安装、管理和<span style="color: black;">守护</span>过程,使得<span style="color: black;">研发</span>者能够更<span style="color: black;">容易</span>地管理项目依赖关系,<span style="color: black;">加强</span>了<span style="color: black;">研发</span>效率。</p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><strong style="color: blue;">pip命令</strong></p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><img src="//q0.itc.cn/images01/20240517/a7fb2040082947f8802d26c69478861b.png" style="width: 50%; margin-bottom: 20px;"></p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><strong style="color: blue;">pip镜像源</strong></p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;">pip镜像源的<span style="color: black;">功效</span>是<span style="color: black;">供给</span>了一个替代官方 Python 包管理工具 (pip) 默认源的服务器<span style="color: black;">位置</span>。<span style="color: black;">这般</span>做<strong style="color: blue;">有几个目</strong>的:</p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"> 1. 加速下载速度:有些地区<span style="color: black;">拜访</span>官方源可能会受到网络限制<span style="color: black;">或</span>连接速度较慢的影响,<span style="color: black;">运用</span>镜像源<span style="color: black;">能够</span><span style="color: black;">加强</span>下载速度。</p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;">2. <span style="color: black;">加强</span>稳定性:有些时候官方源可能会<span style="color: black;">显现</span>故障<span style="color: black;">或</span>不稳定的<span style="color: black;">状况</span>,<span style="color: black;">运用</span>镜像源<span style="color: black;">能够</span><span style="color: black;">加强</span>包下载的稳定性。</p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"> 3. 避免网络限制:在<span style="color: black;">有些</span>环境下,网络可能会对<span style="color: black;">拜访</span>官方源进行限制,而<span style="color: black;">运用</span>镜像源<span style="color: black;">能够</span>绕过这些限制。</p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"> <span style="color: black;">平常</span>的 Python 镜像源<span style="color: black;">包含</span>国内的阿里云、清华大学等,它们会<span style="color: black;">定时</span>从官方源同步更新,保持和官方源的一致性。</p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><strong style="color: blue;">pip镜像源<span style="color: black;">运用</span><span style="color: black;">办法</span></strong></p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><img src="//q7.itc.cn/images01/20240517/41fa8e39de5b460c9dff9cdbb9b7c600.png" style="width: 50%; margin-bottom: 20px;"></p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><strong style="color: blue;">交互式<span style="color: black;">研发</span>环境 Jupyter Lab</strong></p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><strong style="color: blue;">Python<span style="color: black;">研发</span>环境</strong></p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;">为Python编程<span style="color: black;">供给</span>支持和工具的软件环境,<span style="color: black;">功效</span><span style="color: black;">包含</span>但不限于:代码编辑、语法<span style="color: black;">检测</span>、代码自动补全、版本管理等等。</p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"> <strong style="color: blue;"><span style="color: black;">平常</span>的Python<span style="color: black;">研发</span>环境<span style="color: black;">包含</span>:</strong></p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"> PyCharm:JetBrains<span style="color: black;">研发</span>的功能强大的集成<span style="color: black;">研发</span>环境,<span style="color: black;">供给</span>了丰富的功能和插件支持。</p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;">Visual Studio Code:由Microsoft<span style="color: black;">研发</span>,轻量级但功能丰富的代码编辑器,<span style="color: black;">经过</span>插件支持Python<span style="color: black;">研发</span>。</p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"> Spyder:用于科学计算和数据分析的Python集成<span style="color: black;">研发</span>环境,<span style="color: black;">供给</span>了强大的交互式编程和调试功能。</p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"> Jupyter Notebook:交互式笔记本环境,支持以代码、文本和图形方式组织Python代码和分析结果。</p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;">Jupyter Lab是对Jupyter Notebook的扩展和演进,它在Jupyter Notebook的<span style="color: black;">基本</span>上<span style="color: black;">增多</span>了<span style="color: black;">更加多</span>功能和灵活性,<span style="color: black;">供给</span>了更现代化的用户界面和更丰富的交互式工具。</p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><strong style="color: blue;">Jupyter Lab 的安装</strong></p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"> <strong style="color: blue;">在终端窗口的<span style="color: black;">运用</span><span style="color: black;">过程</span>:</strong></p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"> 1.<span style="color: black;">选取</span>项目运行的 conda 环境,<span style="color: black;">一般</span>是某个虚拟环境。</p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;">2.<span style="color: black;">运用</span> cd 命令切换至项目的目录(文件夹)。</p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"> 3.输入<span style="color: black;">起步</span>命令</p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><strong style="color: blue;">Jupyter Lab 的<span style="color: black;">运用</span></strong></p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"> <span style="color: black;">起步</span>后,会打开默认的浏览器。</p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"> <span style="color: black;">倘若</span>未打开,手动复制红色框中的链接(三选一)在浏览器打开。</p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><strong style="color: blue;">.py 和 .ipynb 文件的区别与联系</strong></p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"> `.ipynb` 和 `.py` 是两种<span style="color: black;">平常</span>的 Python 文件格式,它们在用途和特点上有<span style="color: black;">有些</span>区别与联系。</p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><strong style="color: blue;">.py 文件:</strong></p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"> - 格式:纯文本文件,<span style="color: black;">包括</span> Python 代码。</p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"> - 用途:<span style="color: black;">一般</span>用于编写和运行 Python 脚本。</p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"> - 特点:<span style="color: black;">能够</span><span style="color: black;">运用</span>任何文本编辑器编辑,如 Notepad、Sublime Text、VS Code 等。适用于<span style="color: black;">研发</span>和<span style="color: black;">守护</span>大型项目,<span style="color: black;">能够</span>直接在命令行或集成<span style="color: black;">研发</span>环境 (IDE) 中运行。</p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><strong style="color: blue;">.ipynb 文件(Jupyter Notebook 文件):</strong></p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"> - 格式:JSON 格式的文档,<span style="color: black;">包括</span>了丰富的内容,<span style="color: black;">包含</span>代码、文本、图像、数学公式等,以及输出结果。</p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"> - 用途:用于交互式计算、数据分析、可视化和文档编写。</p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;">- 特点:<span style="color: black;">能够</span>在 Jupyter Notebook 环境下编写和运行,支持将代码、文本和可视化结果集中在一个文件中,易于展示和分享。<span style="color: black;">一般</span>用于数据科学、<span style="color: black;">设备</span>学习、教育等<span style="color: black;">行业</span>。</p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><strong style="color: blue;">联系:</strong></p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"> 两种文件格式都<span style="color: black;">能够</span><span style="color: black;">包括</span> Python 代码,<span style="color: black;">因此呢</span>它们<span style="color: black;">能够</span>相互转换。<span style="color: black;">能够</span>将 Jupyter Notebook 文件(.ipynb)中的代码导出为 Python 脚本文件(.py)。</p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;">两种文件格式都<span style="color: black;">能够</span>用于编写和运行 Python 代码,只是在<span style="color: black;">运用</span>场景和侧重点上略有<span style="color: black;">区别</span>。</p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><strong style="color: blue;">代码运行</strong></p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;">关闭 Jupyter Lab <span style="color: black;">研发</span>环境</p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><a style="color: black;"><span style="color: black;">返回<span style="color: black;">外链论坛:www.fok120.com</span>,查看<span style="color: black;">更加多</span></span></a></p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><span style="color: black;">责任编辑:网友投稿</span></p>
系统提示我验证码错误1500次 \~゛, “NB”(牛×的缩写,表示叹为观止) “板凳”(第三个回帖的人) 我深受你的启发,你的话语是我前进的动力。
页:
[1]