1621 lines
93 KiB
HTML
1621 lines
93 KiB
HTML
|
||
<!DOCTYPE HTML>
|
||
<html lang="zh-hans" >
|
||
<head>
|
||
<meta charset="UTF-8">
|
||
<meta content="text/html; charset=utf-8" http-equiv="Content-Type">
|
||
<title>6-10 python3小白课:虚拟环境使用 · python3小白课笔记</title>
|
||
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
|
||
<meta name="description" content="">
|
||
<meta name="generator" content="GitBook 3.2.3">
|
||
<meta name="author" content="雪山凌狐">
|
||
|
||
|
||
|
||
<link rel="stylesheet" href="../gitbook/style.css">
|
||
|
||
|
||
|
||
|
||
<link rel="stylesheet" href="../gitbook/gitbook-plugin-prism/prism-material-light.css">
|
||
|
||
|
||
|
||
<link rel="stylesheet" href="../gitbook/gitbook-plugin-fontsettings/website.css">
|
||
|
||
|
||
|
||
<link rel="stylesheet" href="../gitbook/gitbook-plugin-back-to-top-button/plugin.css">
|
||
|
||
|
||
|
||
<link rel="stylesheet" href="../gitbook/gitbook-plugin-expandable-chapters-small/expandable-chapters-small.css">
|
||
|
||
|
||
|
||
<link rel="stylesheet" href="../gitbook/gitbook-plugin-code/plugin.css">
|
||
|
||
|
||
|
||
<link rel="stylesheet" href="../gitbook/gitbook-plugin-search-pro/search.css">
|
||
|
||
|
||
|
||
<link rel="stylesheet" href="../gitbook/gitbook-plugin-splitter/splitter.css">
|
||
|
||
|
||
|
||
<link rel="stylesheet" href="../gitbook/gitbook-plugin-donate/plugin.css">
|
||
|
||
|
||
|
||
<link rel="stylesheet" href="../gitbook/gitbook-plugin-tbfed-pagefooter/footer.css">
|
||
|
||
|
||
|
||
<link rel="stylesheet" href="../gitbook/gitbook-plugin-pageview-count/plugin.css">
|
||
|
||
|
||
|
||
<link rel="stylesheet" href="../gitbook/gitbook-plugin-auto-scroll-table/website.css">
|
||
|
||
|
||
|
||
<link rel="stylesheet" href="../gitbook/gitbook-plugin-lightbox/css/lightbox.min.css">
|
||
|
||
|
||
|
||
<link rel="stylesheet" href="../gitbook/gitbook-plugin-anchor-navigation-ex/style/plugin.css">
|
||
|
||
|
||
|
||
<link rel="stylesheet" href="../gitbook/gitbook-plugin-ad/plugin.css">
|
||
|
||
|
||
|
||
<link rel="stylesheet" href="../gitbook/gitbook-plugin-image-captions/image-captions.css">
|
||
|
||
|
||
|
||
<link rel="stylesheet" href="../gitbook/gitbook-plugin-advanced-emoji/emoji-website.css">
|
||
|
||
|
||
|
||
<link rel="stylesheet" href="../gitbook/gitbook-plugin-flexible-alerts/style.css">
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
<link rel="stylesheet" href="../css/website.css">
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
<meta name="HandheldFriendly" content="true"/>
|
||
<meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no">
|
||
<meta name="apple-mobile-web-app-capable" content="yes">
|
||
<meta name="apple-mobile-web-app-status-bar-style" content="black">
|
||
<link rel="apple-touch-icon-precomposed" sizes="152x152" href="../gitbook/images/apple-touch-icon-precomposed-152.png">
|
||
<link rel="shortcut icon" href="../gitbook/images/favicon.ico" type="image/x-icon">
|
||
|
||
|
||
<link rel="next" href="../chapter7/" />
|
||
|
||
|
||
<link rel="prev" href="6-9 python3小白课:虚拟环境介绍和安装.html" />
|
||
|
||
|
||
|
||
<link rel="shortcut icon" href='../assets/favicon.ico' type="image/x-icon">
|
||
|
||
|
||
<link rel="bookmark" href='../assets/favicon.ico' type="image/x-icon">
|
||
|
||
|
||
|
||
|
||
</head>
|
||
<body>
|
||
|
||
<div class="book">
|
||
<div class="book-summary">
|
||
|
||
|
||
<div id="book-search-input" role="search">
|
||
<input type="text" placeholder="输入并搜索" />
|
||
</div>
|
||
|
||
|
||
<nav role="navigation">
|
||
|
||
|
||
|
||
<ul class="summary">
|
||
|
||
|
||
|
||
|
||
<li>
|
||
<a href="http://fox-9.com" target="_blank" class="custom-link">雪山凌狐教程</a>
|
||
</li>
|
||
|
||
|
||
|
||
|
||
<li class="divider"></li>
|
||
|
||
|
||
|
||
|
||
|
||
|
||
<li class="chapter " data-level="1.1" data-path="../">
|
||
|
||
<a href="../">
|
||
|
||
|
||
Python3小白课 介绍
|
||
|
||
</a>
|
||
|
||
|
||
|
||
</li>
|
||
|
||
<li class="chapter " data-level="1.2" data-path="../Catalog.html">
|
||
|
||
<a href="../Catalog.html">
|
||
|
||
|
||
课程目录
|
||
|
||
</a>
|
||
|
||
|
||
|
||
</li>
|
||
|
||
<li class="chapter " data-level="1.3" data-path="../chapter1/">
|
||
|
||
<a href="../chapter1/">
|
||
|
||
|
||
一、Python初识
|
||
|
||
</a>
|
||
|
||
|
||
|
||
<ul class="articles">
|
||
|
||
|
||
<li class="chapter " data-level="1.3.1" data-path="../chapter1/1-1 python3小白课:python语言简介.html">
|
||
|
||
<a href="../chapter1/1-1 python3小白课:python语言简介.html">
|
||
|
||
|
||
1-1 python3小白课:python语言简介
|
||
|
||
</a>
|
||
|
||
|
||
|
||
</li>
|
||
|
||
<li class="chapter " data-level="1.3.2" data-path="../chapter1/1-2 python3小白课:python下载.html">
|
||
|
||
<a href="../chapter1/1-2 python3小白课:python下载.html">
|
||
|
||
|
||
1-2 python3小白课:python下载
|
||
|
||
</a>
|
||
|
||
|
||
|
||
</li>
|
||
|
||
<li class="chapter " data-level="1.3.3" data-path="../chapter1/1-3 python3小白课:python安装.html">
|
||
|
||
<a href="../chapter1/1-3 python3小白课:python安装.html">
|
||
|
||
|
||
1-3 python3小白课:python安装
|
||
|
||
</a>
|
||
|
||
|
||
|
||
</li>
|
||
|
||
<li class="chapter " data-level="1.3.4" data-path="../chapter1/1-4 python3小白课:我的第一个python脚本.html">
|
||
|
||
<a href="../chapter1/1-4 python3小白课:我的第一个python脚本.html">
|
||
|
||
|
||
1-4 python3小白课:我的第一个python脚本
|
||
|
||
</a>
|
||
|
||
|
||
|
||
</li>
|
||
|
||
<li class="chapter " data-level="1.3.5" data-path="../chapter1/1-5 python3小白课:如何运行py文件.html">
|
||
|
||
<a href="../chapter1/1-5 python3小白课:如何运行py文件.html">
|
||
|
||
|
||
1-5 python3小白课:如何运行py文件
|
||
|
||
</a>
|
||
|
||
|
||
|
||
</li>
|
||
|
||
<li class="chapter " data-level="1.3.6" data-path="../chapter1/1-6 python3小白课:使用python IDLE.html">
|
||
|
||
<a href="../chapter1/1-6 python3小白课:使用python IDLE.html">
|
||
|
||
|
||
1-6 python3小白课:使用python IDLE
|
||
|
||
</a>
|
||
|
||
|
||
|
||
</li>
|
||
|
||
<li class="chapter " data-level="1.3.7" data-path="../chapter1/1-7 python3小白课:使用python shell.html">
|
||
|
||
<a href="../chapter1/1-7 python3小白课:使用python shell.html">
|
||
|
||
|
||
1-7 python3小白课:使用python shell
|
||
|
||
</a>
|
||
|
||
|
||
|
||
</li>
|
||
|
||
|
||
</ul>
|
||
|
||
</li>
|
||
|
||
<li class="chapter " data-level="1.4" data-path="../chapter2/">
|
||
|
||
<a href="../chapter2/">
|
||
|
||
|
||
二、变量、简单类型和运算符
|
||
|
||
</a>
|
||
|
||
|
||
|
||
<ul class="articles">
|
||
|
||
|
||
<li class="chapter " data-level="1.4.1" data-path="../chapter2/2-1 python3小白课:啥是变量.html">
|
||
|
||
<a href="../chapter2/2-1 python3小白课:啥是变量.html">
|
||
|
||
|
||
2-1 python3小白课:啥是变量
|
||
|
||
</a>
|
||
|
||
|
||
|
||
</li>
|
||
|
||
<li class="chapter " data-level="1.4.2" data-path="../chapter2/2-2 python3小白课:定义常量.html">
|
||
|
||
<a href="../chapter2/2-2 python3小白课:定义常量.html">
|
||
|
||
|
||
2-2 python3小白课:定义常量
|
||
|
||
</a>
|
||
|
||
|
||
|
||
</li>
|
||
|
||
<li class="chapter " data-level="1.4.3" data-path="../chapter2/2-3 python3小白课:注释让你事半功倍.html">
|
||
|
||
<a href="../chapter2/2-3 python3小白课:注释让你事半功倍.html">
|
||
|
||
|
||
2-3 python3小白课:注释让你事半功倍
|
||
|
||
</a>
|
||
|
||
|
||
|
||
</li>
|
||
|
||
<li class="chapter " data-level="1.4.4" data-path="../chapter2/2-4 python3小白课:数值类型之整型.html">
|
||
|
||
<a href="../chapter2/2-4 python3小白课:数值类型之整型.html">
|
||
|
||
|
||
2-4 python3小白课:数值类型之整型
|
||
|
||
</a>
|
||
|
||
|
||
|
||
</li>
|
||
|
||
<li class="chapter " data-level="1.4.5" data-path="../chapter2/2-5 python3小白课:数值类型之浮点型.html">
|
||
|
||
<a href="../chapter2/2-5 python3小白课:数值类型之浮点型.html">
|
||
|
||
|
||
2-5 python3小白课:数值类型之浮点型
|
||
|
||
</a>
|
||
|
||
|
||
|
||
</li>
|
||
|
||
<li class="chapter " data-level="1.4.6" data-path="../chapter2/2-6 python3小白课:数值类型之复数.html">
|
||
|
||
<a href="../chapter2/2-6 python3小白课:数值类型之复数.html">
|
||
|
||
|
||
2-6 python3小白课:数值类型之复数
|
||
|
||
</a>
|
||
|
||
|
||
|
||
</li>
|
||
|
||
<li class="chapter " data-level="1.4.7" data-path="../chapter2/2-7 python3小白课:字符串入门.html">
|
||
|
||
<a href="../chapter2/2-7 python3小白课:字符串入门.html">
|
||
|
||
|
||
2-7 python3小白课:字符串入门
|
||
|
||
</a>
|
||
|
||
|
||
|
||
</li>
|
||
|
||
<li class="chapter " data-level="1.4.8" data-path="../chapter2/2-8 python3小白课:字节串.html">
|
||
|
||
<a href="../chapter2/2-8 python3小白课:字节串.html">
|
||
|
||
|
||
2-8 python3小白课:字节串
|
||
|
||
</a>
|
||
|
||
|
||
|
||
</li>
|
||
|
||
<li class="chapter " data-level="1.4.9" data-path="../chapter2/2-9 python3小白课:字符串进阶.html">
|
||
|
||
<a href="../chapter2/2-9 python3小白课:字符串进阶.html">
|
||
|
||
|
||
2-9 python3小白课:字符串进阶
|
||
|
||
</a>
|
||
|
||
|
||
|
||
</li>
|
||
|
||
<li class="chapter " data-level="1.4.10" data-path="../chapter2/2-10 python3小白课:赋值运算符.html">
|
||
|
||
<a href="../chapter2/2-10 python3小白课:赋值运算符.html">
|
||
|
||
|
||
2-10 python3小白课:赋值运算符
|
||
|
||
</a>
|
||
|
||
|
||
|
||
</li>
|
||
|
||
<li class="chapter " data-level="1.4.11" data-path="../chapter2/2-11 python3小白课:算术运算符.html">
|
||
|
||
<a href="../chapter2/2-11 python3小白课:算术运算符.html">
|
||
|
||
|
||
2-11 python3小白课:算术运算符
|
||
|
||
</a>
|
||
|
||
|
||
|
||
</li>
|
||
|
||
<li class="chapter " data-level="1.4.12" data-path="../chapter2/2-12 python3小白课:索引运算符.html">
|
||
|
||
<a href="../chapter2/2-12 python3小白课:索引运算符.html">
|
||
|
||
|
||
2-12 python3小白课:索引运算符
|
||
|
||
</a>
|
||
|
||
|
||
|
||
</li>
|
||
|
||
<li class="chapter " data-level="1.4.13" data-path="../chapter2/2-13 python3小白课:比较运算符.html">
|
||
|
||
<a href="../chapter2/2-13 python3小白课:比较运算符.html">
|
||
|
||
|
||
2-13 python3小白课:比较运算符
|
||
|
||
</a>
|
||
|
||
|
||
|
||
</li>
|
||
|
||
<li class="chapter " data-level="1.4.14" data-path="../chapter2/2-14 python3小白课:身份运算符.html">
|
||
|
||
<a href="../chapter2/2-14 python3小白课:身份运算符.html">
|
||
|
||
|
||
2-14 python3小白课:身份运算符
|
||
|
||
</a>
|
||
|
||
|
||
|
||
</li>
|
||
|
||
<li class="chapter " data-level="1.4.15" data-path="../chapter2/2-15 python3小白课:逻辑运算符.html">
|
||
|
||
<a href="../chapter2/2-15 python3小白课:逻辑运算符.html">
|
||
|
||
|
||
2-15 python3小白课:逻辑运算符
|
||
|
||
</a>
|
||
|
||
|
||
|
||
</li>
|
||
|
||
<li class="chapter " data-level="1.4.16" data-path="../chapter2/2-16 python3小白课:位运算符.html">
|
||
|
||
<a href="../chapter2/2-16 python3小白课:位运算符.html">
|
||
|
||
|
||
2-16 python3小白课:位运算符
|
||
|
||
</a>
|
||
|
||
|
||
|
||
</li>
|
||
|
||
<li class="chapter " data-level="1.4.17" data-path="../chapter2/2-17 python3小白课:赋值运算符扩展.html">
|
||
|
||
<a href="../chapter2/2-17 python3小白课:赋值运算符扩展.html">
|
||
|
||
|
||
2-17 python3小白课:赋值运算符扩展
|
||
|
||
</a>
|
||
|
||
|
||
|
||
</li>
|
||
|
||
<li class="chapter " data-level="1.4.18" data-path="../chapter2/2-18 python3小白课:三目运算符.html">
|
||
|
||
<a href="../chapter2/2-18 python3小白课:三目运算符.html">
|
||
|
||
|
||
2-18 python3小白课:三目运算符
|
||
|
||
</a>
|
||
|
||
|
||
|
||
</li>
|
||
|
||
<li class="chapter " data-level="1.4.19" data-path="../chapter2/2-19 python3小白课:成员运算符.html">
|
||
|
||
<a href="../chapter2/2-19 python3小白课:成员运算符.html">
|
||
|
||
|
||
2-19 python3小白课:成员运算符
|
||
|
||
</a>
|
||
|
||
|
||
|
||
</li>
|
||
|
||
<li class="chapter " data-level="1.4.20" data-path="../chapter2/2-20 python3小白课:运算符优先级.html">
|
||
|
||
<a href="../chapter2/2-20 python3小白课:运算符优先级.html">
|
||
|
||
|
||
2-20 python3小白课:运算符优先级
|
||
|
||
</a>
|
||
|
||
|
||
|
||
</li>
|
||
|
||
|
||
</ul>
|
||
|
||
</li>
|
||
|
||
<li class="chapter " data-level="1.5" data-path="../chapter3/">
|
||
|
||
<a href="../chapter3/">
|
||
|
||
|
||
三、列表、元组和字典
|
||
|
||
</a>
|
||
|
||
|
||
|
||
<ul class="articles">
|
||
|
||
|
||
<li class="chapter " data-level="1.5.1" data-path="../chapter3/3-1 python3小白课:列表和元组的区别.html">
|
||
|
||
<a href="../chapter3/3-1 python3小白课:列表和元组的区别.html">
|
||
|
||
|
||
3-1 python3小白课:列表和元组的区别
|
||
|
||
</a>
|
||
|
||
|
||
|
||
</li>
|
||
|
||
<li class="chapter " data-level="1.5.2" data-path="../chapter3/3-2 python3小白课:列表元组入门.html">
|
||
|
||
<a href="../chapter3/3-2 python3小白课:列表元组入门.html">
|
||
|
||
|
||
3-2 python3小白课:列表元组入门
|
||
|
||
</a>
|
||
|
||
|
||
|
||
</li>
|
||
|
||
<li class="chapter " data-level="1.5.3" data-path="../chapter3/3-3 python3小白课:深入列表.html">
|
||
|
||
<a href="../chapter3/3-3 python3小白课:深入列表.html">
|
||
|
||
|
||
3-3 python3小白课:深入列表
|
||
|
||
</a>
|
||
|
||
|
||
|
||
</li>
|
||
|
||
<li class="chapter " data-level="1.5.4" data-path="../chapter3/3-4 python3小白课:字典初识.html">
|
||
|
||
<a href="../chapter3/3-4 python3小白课:字典初识.html">
|
||
|
||
|
||
3-4 python3小白课:字典初识
|
||
|
||
</a>
|
||
|
||
|
||
|
||
</li>
|
||
|
||
<li class="chapter " data-level="1.5.5" data-path="../chapter3/3-5 python3小白课:字典操作基础.html">
|
||
|
||
<a href="../chapter3/3-5 python3小白课:字典操作基础.html">
|
||
|
||
|
||
3-5 python3小白课:字典操作基础
|
||
|
||
</a>
|
||
|
||
|
||
|
||
</li>
|
||
|
||
<li class="chapter " data-level="1.5.6" data-path="../chapter3/3-6 python3小白课:字典的常用方法.html">
|
||
|
||
<a href="../chapter3/3-6 python3小白课:字典的常用方法.html">
|
||
|
||
|
||
3-6 python3小白课:字典的常用方法
|
||
|
||
</a>
|
||
|
||
|
||
|
||
</li>
|
||
|
||
|
||
</ul>
|
||
|
||
</li>
|
||
|
||
<li class="chapter " data-level="1.6" data-path="../chapter4/">
|
||
|
||
<a href="../chapter4/">
|
||
|
||
|
||
四、流程控制
|
||
|
||
</a>
|
||
|
||
|
||
|
||
<ul class="articles">
|
||
|
||
|
||
<li class="chapter " data-level="1.6.1" data-path="../chapter4/4-1 python3小白课:if分支结构.html">
|
||
|
||
<a href="../chapter4/4-1 python3小白课:if分支结构.html">
|
||
|
||
|
||
4-1 python3小白课:if分支结构
|
||
|
||
</a>
|
||
|
||
|
||
|
||
</li>
|
||
|
||
<li class="chapter " data-level="1.6.2" data-path="../chapter4/4-2 python3小白课:while循环结构.html">
|
||
|
||
<a href="../chapter4/4-2 python3小白课:while循环结构.html">
|
||
|
||
|
||
4-2 python3小白课:while循环结构
|
||
|
||
</a>
|
||
|
||
|
||
|
||
</li>
|
||
|
||
<li class="chapter " data-level="1.6.3" data-path="../chapter4/4-3 python3小白课:for-in循环结构.html">
|
||
|
||
<a href="../chapter4/4-3 python3小白课:for-in循环结构.html">
|
||
|
||
|
||
4-3 python3小白课:for-in循环结构
|
||
|
||
</a>
|
||
|
||
|
||
|
||
</li>
|
||
|
||
<li class="chapter " data-level="1.6.4" data-path="../chapter4/4-4 python3小白课:for表达式.html">
|
||
|
||
<a href="../chapter4/4-4 python3小白课:for表达式.html">
|
||
|
||
|
||
4-4 python3小白课:for表达式
|
||
|
||
</a>
|
||
|
||
|
||
|
||
</li>
|
||
|
||
|
||
</ul>
|
||
|
||
</li>
|
||
|
||
<li class="chapter " data-level="1.7" data-path="../chapter5/">
|
||
|
||
<a href="../chapter5/">
|
||
|
||
|
||
五、自定义函数
|
||
|
||
</a>
|
||
|
||
|
||
|
||
<ul class="articles">
|
||
|
||
|
||
<li class="chapter " data-level="1.7.1" data-path="../chapter5/5-1 python3小白课:函数是什么.html">
|
||
|
||
<a href="../chapter5/5-1 python3小白课:函数是什么.html">
|
||
|
||
|
||
5-1 python3小白课:函数是什么
|
||
|
||
</a>
|
||
|
||
|
||
|
||
</li>
|
||
|
||
<li class="chapter " data-level="1.7.2" data-path="../chapter5/5-2 python3小白课:函数入门.html">
|
||
|
||
<a href="../chapter5/5-2 python3小白课:函数入门.html">
|
||
|
||
|
||
5-2 python3小白课:函数入门
|
||
|
||
</a>
|
||
|
||
|
||
|
||
</li>
|
||
|
||
<li class="chapter " data-level="1.7.3" data-path="../chapter5/5-3 python3小白课:递归函数.html">
|
||
|
||
<a href="../chapter5/5-3 python3小白课:递归函数.html">
|
||
|
||
|
||
5-3 python3小白课:递归函数
|
||
|
||
</a>
|
||
|
||
|
||
|
||
</li>
|
||
|
||
<li class="chapter " data-level="1.7.4" data-path="../chapter5/5-4 python3小白课:关键字参数.html">
|
||
|
||
<a href="../chapter5/5-4 python3小白课:关键字参数.html">
|
||
|
||
|
||
5-4 python3小白课:关键字参数
|
||
|
||
</a>
|
||
|
||
|
||
|
||
</li>
|
||
|
||
<li class="chapter " data-level="1.7.5" data-path="../chapter5/5-5 python3小白课:参数默认值.html">
|
||
|
||
<a href="../chapter5/5-5 python3小白课:参数默认值.html">
|
||
|
||
|
||
5-5 python3小白课:参数默认值
|
||
|
||
</a>
|
||
|
||
|
||
|
||
</li>
|
||
|
||
<li class="chapter " data-level="1.7.6" data-path="../chapter5/5-6 python3小白课:参数收集.html">
|
||
|
||
<a href="../chapter5/5-6 python3小白课:参数收集.html">
|
||
|
||
|
||
5-6 python3小白课:参数收集
|
||
|
||
</a>
|
||
|
||
|
||
|
||
</li>
|
||
|
||
<li class="chapter " data-level="1.7.7" data-path="../chapter5/5-7 python3小白课:变量作用域.html">
|
||
|
||
<a href="../chapter5/5-7 python3小白课:变量作用域.html">
|
||
|
||
|
||
5-7 python3小白课:变量作用域
|
||
|
||
</a>
|
||
|
||
|
||
|
||
</li>
|
||
|
||
<li class="chapter " data-level="1.7.8" data-path="../chapter5/5-8 python3小白课:局部函数.html">
|
||
|
||
<a href="../chapter5/5-8 python3小白课:局部函数.html">
|
||
|
||
|
||
5-8 python3小白课:局部函数
|
||
|
||
</a>
|
||
|
||
|
||
|
||
</li>
|
||
|
||
|
||
</ul>
|
||
|
||
</li>
|
||
|
||
<li class="chapter " data-level="1.8" data-path="./">
|
||
|
||
<a href="./">
|
||
|
||
|
||
六、模块和包
|
||
|
||
</a>
|
||
|
||
|
||
|
||
<ul class="articles">
|
||
|
||
|
||
<li class="chapter " data-level="1.8.1" data-path="6-1 python3小白课:模块的导入.html">
|
||
|
||
<a href="6-1 python3小白课:模块的导入.html">
|
||
|
||
|
||
6-1 python3小白课:模块的导入
|
||
|
||
</a>
|
||
|
||
|
||
|
||
</li>
|
||
|
||
<li class="chapter " data-level="1.8.2" data-path="6-2 python3小白课:自己写模块.html">
|
||
|
||
<a href="6-2 python3小白课:自己写模块.html">
|
||
|
||
|
||
6-2 python3小白课:自己写模块
|
||
|
||
</a>
|
||
|
||
|
||
|
||
</li>
|
||
|
||
<li class="chapter " data-level="1.8.3" data-path="6-3 python3小白课:导入模块详解.html">
|
||
|
||
<a href="6-3 python3小白课:导入模块详解.html">
|
||
|
||
|
||
6-3 python3小白课:导入模块详解
|
||
|
||
</a>
|
||
|
||
|
||
|
||
</li>
|
||
|
||
<li class="chapter " data-level="1.8.4" data-path="6-4 python3小白课:包是什么.html">
|
||
|
||
<a href="6-4 python3小白课:包是什么.html">
|
||
|
||
|
||
6-4 python3小白课:包是什么
|
||
|
||
</a>
|
||
|
||
|
||
|
||
</li>
|
||
|
||
<li class="chapter " data-level="1.8.5" data-path="6-5 python3小白课:定义包.html">
|
||
|
||
<a href="6-5 python3小白课:定义包.html">
|
||
|
||
|
||
6-5 python3小白课:定义包
|
||
|
||
</a>
|
||
|
||
|
||
|
||
</li>
|
||
|
||
<li class="chapter " data-level="1.8.6" data-path="6-6 python3小白课:包成员导入.html">
|
||
|
||
<a href="6-6 python3小白课:包成员导入.html">
|
||
|
||
|
||
6-6 python3小白课:包成员导入
|
||
|
||
</a>
|
||
|
||
|
||
|
||
</li>
|
||
|
||
<li class="chapter " data-level="1.8.7" data-path="6-7 python3小白课:模块内容查看.html">
|
||
|
||
<a href="6-7 python3小白课:模块内容查看.html">
|
||
|
||
|
||
6-7 python3小白课:模块内容查看
|
||
|
||
</a>
|
||
|
||
|
||
|
||
</li>
|
||
|
||
<li class="chapter " data-level="1.8.8" data-path="6-8 python3小白课:解锁你心仪的三方包.html">
|
||
|
||
<a href="6-8 python3小白课:解锁你心仪的三方包.html">
|
||
|
||
|
||
6-8 python3小白课:解锁你心仪的三方包
|
||
|
||
</a>
|
||
|
||
|
||
|
||
</li>
|
||
|
||
<li class="chapter " data-level="1.8.9" data-path="6-9 python3小白课:虚拟环境介绍和安装.html">
|
||
|
||
<a href="6-9 python3小白课:虚拟环境介绍和安装.html">
|
||
|
||
|
||
6-9 python3小白课:虚拟环境介绍和安装
|
||
|
||
</a>
|
||
|
||
|
||
|
||
</li>
|
||
|
||
<li class="chapter active" data-level="1.8.10" data-path="6-10 python3小白课:虚拟环境使用.html">
|
||
|
||
<a href="6-10 python3小白课:虚拟环境使用.html">
|
||
|
||
|
||
6-10 python3小白课:虚拟环境使用
|
||
|
||
</a>
|
||
|
||
|
||
|
||
</li>
|
||
|
||
|
||
</ul>
|
||
|
||
</li>
|
||
|
||
<li class="chapter " data-level="1.9" data-path="../chapter7/">
|
||
|
||
<a href="../chapter7/">
|
||
|
||
|
||
七、类和对象
|
||
|
||
</a>
|
||
|
||
|
||
|
||
<ul class="articles">
|
||
|
||
|
||
<li class="chapter " data-level="1.9.1" data-path="../chapter7/7-1 python3小白课:一节课搞懂面向对象.html">
|
||
|
||
<a href="../chapter7/7-1 python3小白课:一节课搞懂面向对象.html">
|
||
|
||
|
||
7-1 python3小白课:一节课搞懂面向对象
|
||
|
||
</a>
|
||
|
||
|
||
|
||
</li>
|
||
|
||
<li class="chapter " data-level="1.9.2" data-path="../chapter7/7-2 python3小白课:定义类和实例化对象.html">
|
||
|
||
<a href="../chapter7/7-2 python3小白课:定义类和实例化对象.html">
|
||
|
||
|
||
7-2 python3小白课:定义类和实例化对象
|
||
|
||
</a>
|
||
|
||
|
||
|
||
</li>
|
||
|
||
<li class="chapter " data-level="1.9.3" data-path="../chapter7/7-3 python3小白课:了解实例方法.html">
|
||
|
||
<a href="../chapter7/7-3 python3小白课:了解实例方法.html">
|
||
|
||
|
||
7-3 python3小白课:了解实例方法
|
||
|
||
</a>
|
||
|
||
|
||
|
||
</li>
|
||
|
||
<li class="chapter " data-level="1.9.4" data-path="../chapter7/7-4 python3小白课:用property函数定义属性.html">
|
||
|
||
<a href="../chapter7/7-4 python3小白课:用property函数定义属性.html">
|
||
|
||
|
||
7-4 python3小白课:用property函数定义属性
|
||
|
||
</a>
|
||
|
||
|
||
|
||
</li>
|
||
|
||
<li class="chapter " data-level="1.9.5" data-path="../chapter7/7-5 python3小白课:封装和隐藏.html">
|
||
|
||
<a href="../chapter7/7-5 python3小白课:封装和隐藏.html">
|
||
|
||
|
||
7-5 python3小白课:封装和隐藏
|
||
|
||
</a>
|
||
|
||
|
||
|
||
</li>
|
||
|
||
<li class="chapter " data-level="1.9.6" data-path="../chapter7/7-6 python3小白课:类的继承和多继承.html">
|
||
|
||
<a href="../chapter7/7-6 python3小白课:类的继承和多继承.html">
|
||
|
||
|
||
7-6 python3小白课:类的继承和多继承
|
||
|
||
</a>
|
||
|
||
|
||
|
||
</li>
|
||
|
||
<li class="chapter " data-level="1.9.7" data-path="../chapter7/7-7 python3小白课:重写父类方法和使用super函数.html">
|
||
|
||
<a href="../chapter7/7-7 python3小白课:重写父类方法和使用super函数.html">
|
||
|
||
|
||
7-7 python3小白课:重写父类方法和使用super函数
|
||
|
||
</a>
|
||
|
||
|
||
|
||
</li>
|
||
|
||
<li class="chapter " data-level="1.9.8" data-path="../chapter7/7-8 python3小白课:类的多态性.html">
|
||
|
||
<a href="../chapter7/7-8 python3小白课:类的多态性.html">
|
||
|
||
|
||
7-8 python3小白课:类的多态性
|
||
|
||
</a>
|
||
|
||
|
||
|
||
</li>
|
||
|
||
<li class="chapter " data-level="1.9.9" data-path="../chapter7/7-9 python3小白课:可以被枚举的类.html">
|
||
|
||
<a href="../chapter7/7-9 python3小白课:可以被枚举的类.html">
|
||
|
||
|
||
7-9 python3小白课:可以被枚举的类
|
||
|
||
</a>
|
||
|
||
|
||
|
||
</li>
|
||
|
||
|
||
</ul>
|
||
|
||
</li>
|
||
|
||
<li class="chapter " data-level="1.10" data-path="../chapter8/">
|
||
|
||
<a href="../chapter8/">
|
||
|
||
|
||
八、异常处理机制
|
||
|
||
</a>
|
||
|
||
|
||
|
||
<ul class="articles">
|
||
|
||
|
||
<li class="chapter " data-level="1.10.1" data-path="../chapter8/8-1 python3小白课:最基本的异常处理.html">
|
||
|
||
<a href="../chapter8/8-1 python3小白课:最基本的异常处理.html">
|
||
|
||
|
||
8-1 python3小白课:最基本的异常处理
|
||
|
||
</a>
|
||
|
||
|
||
|
||
</li>
|
||
|
||
<li class="chapter " data-level="1.10.2" data-path="../chapter8/8-2 python3小白课:多异常捕获.html">
|
||
|
||
<a href="../chapter8/8-2 python3小白课:多异常捕获.html">
|
||
|
||
|
||
8-2 python3小白课:多异常捕获
|
||
|
||
</a>
|
||
|
||
|
||
|
||
</li>
|
||
|
||
<li class="chapter " data-level="1.10.3" data-path="../chapter8/8-3 python3小白课:查看详细异常信息.html">
|
||
|
||
<a href="../chapter8/8-3 python3小白课:查看详细异常信息.html">
|
||
|
||
|
||
8-3 python3小白课:查看详细异常信息
|
||
|
||
</a>
|
||
|
||
|
||
|
||
</li>
|
||
|
||
<li class="chapter " data-level="1.10.4" data-path="../chapter8/8-4 python3小白课:异常机制中的else块.html">
|
||
|
||
<a href="../chapter8/8-4 python3小白课:异常机制中的else块.html">
|
||
|
||
|
||
8-4 python3小白课:异常机制中的else块
|
||
|
||
</a>
|
||
|
||
|
||
|
||
</li>
|
||
|
||
<li class="chapter " data-level="1.10.5" data-path="../chapter8/8-5 python3小白课:finally块回收资源.html">
|
||
|
||
<a href="../chapter8/8-5 python3小白课:finally块回收资源.html">
|
||
|
||
|
||
8-5 python3小白课:finally块回收资源
|
||
|
||
</a>
|
||
|
||
|
||
|
||
</li>
|
||
|
||
<li class="chapter " data-level="1.10.6" data-path="../chapter8/8-6 python3小白课:自己引发异常.html">
|
||
|
||
<a href="../chapter8/8-6 python3小白课:自己引发异常.html">
|
||
|
||
|
||
8-6 python3小白课:自己引发异常
|
||
|
||
</a>
|
||
|
||
|
||
|
||
</li>
|
||
|
||
|
||
</ul>
|
||
|
||
</li>
|
||
|
||
<li class="chapter " data-level="1.11" data-path="../Summary.html">
|
||
|
||
<a href="../Summary.html">
|
||
|
||
|
||
课程总结
|
||
|
||
</a>
|
||
|
||
|
||
|
||
</li>
|
||
|
||
|
||
|
||
|
||
<li class="divider"></li>
|
||
|
||
<li>
|
||
<a href="https://www.gitbook.com" target="blank" class="gitbook-link">
|
||
本书使用 GitBook 发布
|
||
</a>
|
||
</li>
|
||
</ul>
|
||
|
||
|
||
</nav>
|
||
|
||
|
||
</div>
|
||
|
||
<div class="book-body">
|
||
|
||
<div class="body-inner">
|
||
|
||
|
||
|
||
<div class="book-header" role="navigation">
|
||
|
||
|
||
<!-- Title -->
|
||
<h1>
|
||
<i class="fa fa-circle-o-notch fa-spin"></i>
|
||
<a href=".." >6-10 python3小白课:虚拟环境使用</a>
|
||
</h1>
|
||
</div>
|
||
|
||
|
||
|
||
|
||
<div class="page-wrapper" tabindex="-1" role="main">
|
||
<div class="page-inner">
|
||
|
||
<div id="book-search-results">
|
||
<div class="search-noresults">
|
||
|
||
<section class="normal markdown-section">
|
||
|
||
<html><head></head><body><div id="anchor-navigation-ex-navbar"><i class="fa fa-navicon"></i><ul><li><span class="title-icon fa fa-hand-o-right"></span><a href="#python3小白课:虚拟环境使用"><b></b>python3小白课:虚拟环境使用</a></li><ul><ul><li><span class="title-icon fa fa-hand-o-right"></span><a href="#创建虚拟环境"><b></b>创建虚拟环境</a></li><li><span class="title-icon fa fa-hand-o-right"></span><a href="#退出已激活的虚拟环境"><b></b>退出已激活的虚拟环境</a></li><li><span class="title-icon fa fa-hand-o-right"></span><a href="#激活或切换虚拟环境"><b></b>激活或切换虚拟环境</a></li><li><span class="title-icon fa fa-hand-o-right"></span><a href="#删除虚拟环境"><b></b>删除虚拟环境</a></li><li><span class="title-icon fa fa-hand-o-right"></span><a href="#安装其他版本的python的虚拟环境"><b></b>安装其他版本的python的虚拟环境</a></li><li><span class="title-icon fa fa-hand-o-right"></span><a href="#冻结项目所用的包"><b></b>冻结项目所用的包</a></li><li><span class="title-icon fa fa-hand-o-right"></span><a href="#单词释义"><b></b>单词释义</a></li></ul></ul></ul></div><h1 id="python3小白课:虚拟环境使用"><a name="python3小白课:虚拟环境使用" class="anchor-navigation-ex-anchor" href="#python3小白课:虚拟环境使用"><i class="fa fa-link" aria-hidden="true"></i></a>python3小白课:虚拟环境使用</h1>
|
||
<p>上节课我们安装好了虚拟环境,这节课我们来教会大家基本的使用,关于其他使用命令,日常不常用的,我就不讲解了,讲多了大家也记不住。</p>
|
||
<p>接着上节课我们打开了一个cmd窗口对吧,目前还是没有任何虚拟环境的。</p>
|
||
<h3 id="创建虚拟环境"><a name="创建虚拟环境" class="anchor-navigation-ex-anchor" href="#创建虚拟环境"><i class="fa fa-link" aria-hidden="true"></i></a>创建虚拟环境</h3>
|
||
<pre class="language-"><code class="lang-powershell">mkvirtualenv test
|
||
</code></pre>
|
||
<p>回车,就创建好了,你可以使用<code>workon</code>查看到生成了一个名为<code>test</code>的虚拟环境,并且直接激活进入了该虚拟环境。</p>
|
||
<a href="assets/6-10-1.jpg" data-lightbox="ac0856dc-2419-4e65-a17d-2a7dcbf2c291" data-title="图6-10-1 创建test虚拟环境"><figure id="fig1.8.10.1"><img src="assets/6-10-1.jpg" alt="图6-10-1 创建test虚拟环境"><figcaption>图6-10-1 创建test虚拟环境</figcaption></figure></a>
|
||
<p>这里<code>mkvirtualenv</code>就是创建新的虚拟环境的命令,你记住<code>mk</code>即可,应该是英文单词<code>make</code>制造。后面跟随的是空格和虚拟环境的名字,它会在之前的<code>WORKON_HOME</code>路径下创建一个以这个名字命名的文件夹,所以你的名字也别太花哨了,文件夹名不支持的字符不要作为名字哦~比如我们这里就是名字为<code>test</code>,到资源管理器中查看该路径,确实该文件夹已经创立。</p>
|
||
<p>这种命令的写法默认会使用你<code>当前的系统python的版本</code>创建一个虚拟环境。</p>
|
||
<p>像这种创建方法你可以直接进入到新虚拟环境中,大家可以看到在上图中命令提示符最后一行的最左侧多了<code>(test)</code>这样的标识,这就是已进入虚拟环境的标志。在虚拟环境进入后,我们可以输入<code>python</code>进入当前虚拟环境版本的<code>python shell</code>,也可以使用<code>python py文件名</code>或<code>pip</code>命令来使用虚拟环境。这时你若使用<code>pip install 包名</code>命令,安装的包只会存在于虚拟环境,不会安装到系统的python环境,这就能让项目的三方包环境非常整洁干净,未来你需要看一下这个项目用了哪几个三方包,版本号是多少的时候就会极其方便。</p>
|
||
<blockquote>
|
||
<p>[!note]</p>
|
||
<p>如果你感兴趣,可以到虚拟环境的存放目录,看一下虚拟环境跟普通已安装好的python有什么区别。</p>
|
||
<p>可以发现,其实就是将已安装的python进行虚拟化,复制一份,文件夹也做了一些优化,让它可以作为独立环境运行。</p>
|
||
</blockquote>
|
||
<hr>
|
||
<h3 id="退出已激活的虚拟环境"><a name="退出已激活的虚拟环境" class="anchor-navigation-ex-anchor" href="#退出已激活的虚拟环境"><i class="fa fa-link" aria-hidden="true"></i></a>退出已激活的虚拟环境</h3>
|
||
<blockquote>
|
||
<p>[!question]</p>
|
||
<p>创建好了虚拟环境,怎么退出呢?</p>
|
||
</blockquote>
|
||
<pre class="language-"><code class="lang-powershell">deactivate
|
||
</code></pre>
|
||
<p><code>activate</code>是激活的意思,加上否定前缀就是不激活咯,就是退出虚拟环境了,而<code>activate</code>也是一个激活的命令,后面我们会讲到。</p>
|
||
<a href="assets/6-10-2.jpg" data-lightbox="f8f9464c-005f-4621-8b7b-eff59a1b6ea9" data-title="图6-10-2 退出虚拟环境"><figure id="fig1.8.10.2"><img src="assets/6-10-2.jpg" alt="图6-10-2 退出虚拟环境"><figcaption>图6-10-2 退出虚拟环境</figcaption></figure></a>
|
||
<p>如图,命令提示符最后一行的最左侧恢复了正常。</p>
|
||
<hr>
|
||
<h3 id="激活或切换虚拟环境"><a name="激活或切换虚拟环境" class="anchor-navigation-ex-anchor" href="#激活或切换虚拟环境"><i class="fa fa-link" aria-hidden="true"></i></a>激活或切换虚拟环境</h3>
|
||
<p>如上面的截图例子所示,我们的当前目录在<code>C:\Users\xueshanlinghu</code>这个路径下,我们可以切换当前工作目录到你要激活的那个虚拟环境目录下的<code>Scripts</code>文件夹下,如<code>E:\ProgramFiles\virtualpython\test\Scripts</code>,在这里我们可以运行</p>
|
||
<pre class="language-"><code class="lang-powershell">activate
|
||
</code></pre>
|
||
<p>即可激活虚拟环境。</p>
|
||
<p>但我一般很少这样操作。还记得我们上节课学习过的可以通过<code>workon</code>命令查看当前有多少个虚拟环境吗,它会把所有虚拟环境的名字罗列出来。你如果知道你要进入哪个虚拟环境的名字,可以在任意工作目录下输入命令:</p>
|
||
<pre class="language-"><code class="lang-powershell">workon test
|
||
</code></pre>
|
||
<a href="assets/6-10-3.jpg" data-lightbox="3c220604-7643-491f-84cd-5ef363d3b9e6" data-title="图6-10-3 workon激活虚拟环境test"><figure id="fig1.8.10.3"><img src="assets/6-10-3.jpg" alt="图6-10-3 workon激活虚拟环境test"><figcaption>图6-10-3 workon激活虚拟环境test</figcaption></figure></a>
|
||
<p>这样我们可以更轻松进行虚拟环境的激活了,<code>test</code>这个虚拟环境名你可以换成你的。通常推荐大家这样用。</p>
|
||
<p>顺便,我们来看一下<code>pip list</code>和<code>pip --version</code>的运行效果:</p>
|
||
<a href="assets/6-10-4.jpg" data-lightbox="cfa4c667-d36f-4e22-8c57-65067f78f41f" data-title="图6-10-4 虚拟环境下的pip"><figure id="fig1.8.10.4"><img src="assets/6-10-4.jpg" alt="图6-10-4 虚拟环境下的pip"><figcaption>图6-10-4 虚拟环境下的pip</figcaption></figure></a>
|
||
<p>可以看到,都是单独的。</p>
|
||
<hr>
|
||
<h3 id="删除虚拟环境"><a name="删除虚拟环境" class="anchor-navigation-ex-anchor" href="#删除虚拟环境"><i class="fa fa-link" aria-hidden="true"></i></a>删除虚拟环境</h3>
|
||
<blockquote>
|
||
<p>[!question]</p>
|
||
<p>当某虚拟环境不准备再使用了怎么办?</p>
|
||
</blockquote>
|
||
<p>那就删除呗。</p>
|
||
<p>你可以到虚拟环境的文件夹将该虚拟环境文件夹直接删除即可。</p>
|
||
<p>我个人一般会用命令删除:</p>
|
||
<pre class="language-"><code class="lang-powershell">rmvirtualenv test
|
||
</code></pre>
|
||
<p>这样就可以把<code>test</code>这个虚拟环境删除了。其实就是前面加了<code>rm</code>,应为<code>remove移除</code>的意思,很好理解和记忆。</p>
|
||
<a href="assets/6-10-5.jpg" data-lightbox="76d1440a-9a7d-4ec2-bfc4-6651e8cf9b7d" data-title="图6-10-5 删除虚拟环境test"><figure id="fig1.8.10.5"><img src="assets/6-10-5.jpg" alt="图6-10-5 删除虚拟环境test"><figcaption>图6-10-5 删除虚拟环境test</figcaption></figure></a>
|
||
<hr>
|
||
<h3 id="安装其他版本的python的虚拟环境"><a name="安装其他版本的python的虚拟环境" class="anchor-navigation-ex-anchor" href="#安装其他版本的python的虚拟环境"><i class="fa fa-link" aria-hidden="true"></i></a>安装其他版本的python的虚拟环境</h3>
|
||
<p>这里我们的系统环境python是3.8.2版本,我们拿安装python2.7.18和python3.6.6版本的虚拟环境为例跟大家做讲解,其他的可以举一反三。</p>
|
||
<p>安装包下载(我也会在课程中提供给大家,这里均为64位的安装包为例):</p>
|
||
<ul>
|
||
<li>python3.6.6:<a href="https://www.python.org/ftp/python/3.6.6/python-3.6.6-amd64.exe" target="_blank">https://www.python.org/ftp/python/3.6.6/python-3.6.6-amd64.exe</a></li>
|
||
<li>python2.7.18:<a href="https://www.python.org/ftp/python/2.7.18/python-2.7.18.amd64.msi" target="_blank">https://www.python.org/ftp/python/2.7.18/python-2.7.18.amd64.msi</a></li>
|
||
</ul>
|
||
<h4 id="python366虚拟环境创建"><a name="python366虚拟环境创建" class="anchor-navigation-ex-anchor" href="#python366虚拟环境创建"><i class="fa fa-link" aria-hidden="true"></i></a>python3.6.6虚拟环境创建</h4>
|
||
<p>安装很简单,跟之前学习的差不多,需要注意的是,不要选择添加到环境变量就可以了。</p>
|
||
<a href="assets/6-10-6.jpg" data-lightbox="38563aab-59e3-4296-ae43-cad262fa156a" data-title="图6-10-6 python3.6.6安装"><figure id="fig1.8.10.6"><img src="assets/6-10-6.jpg" alt="图6-10-6 python3.6.6安装"><figcaption>图6-10-6 python3.6.6安装</figcaption></figure></a>
|
||
<p>这里比如我安装在<code>E:\ProgramFiles\virtualpython\purepython\python3.6.6</code>目录下。</p>
|
||
<p>安装完成后复制一份该文件夹到当前目录下。复制后,就可以到系统程序与功能-卸载或更改程序那里,将python3.6.6版本卸载掉了,这样可以让系统不那么乱,更绿色。卸载后,将刚才备份的文件夹重命名跟复制前<code>python3.6.6</code>一样。</p>
|
||
<p>完成后即可在cmd输入命令创建了,例如:</p>
|
||
<pre class="language-"><code class="lang-powershell">mkvirtualenv <span class="token operator">-</span>p <span class="token string">"E:\ProgramFiles\virtualpython\purepython\python3.6.6\python.exe"</span> py36
|
||
mkvirtualenv <span class="token operator">--</span>python <span class="token string">"E:\ProgramFiles\virtualpython\purepython\python3.6.6\python.exe"</span> py36
|
||
</code></pre>
|
||
<blockquote>
|
||
<p>[!tip]</p>
|
||
<p>上面两种方法均可以创建,任选一种即可,我个人喜欢第一种。-p参数后面跟上你安装的其他版本python的python.exe解释器的绝对路径,如果路径中没有空格可以不加引号,如果有需要加上引号,我建议你都加上就好了。写完后再写上需要创建的虚拟环境名称即可。</p>
|
||
</blockquote>
|
||
<a href="assets/6-10-7.jpg" data-lightbox="cba4eda9-3e35-4a3b-9b47-301e92b4fa9b" data-title="图6-10-7 创建python3.6.6的虚拟环境"><figure id="fig1.8.10.7"><img src="assets/6-10-7.jpg" alt="图6-10-7 创建python3.6.6的虚拟环境"><figcaption>图6-10-7 创建python3.6.6的虚拟环境</figcaption></figure></a>
|
||
<p>你看,成功了!</p>
|
||
<h4 id="python2718虚拟环境创建"><a name="python2718虚拟环境创建" class="anchor-navigation-ex-anchor" href="#python2718虚拟环境创建"><i class="fa fa-link" aria-hidden="true"></i></a>python2.7.18虚拟环境创建</h4>
|
||
<p>由于安装包是msi的后缀,所以稍微跟python3的有一点点小区别。</p>
|
||
<p>安装时注意点我就不多说了,参考我们之前安装python的时候,需要注意的是不要选择添加到环境变量,默认就是不选的,按默认的就行:</p>
|
||
<a href="assets/6-10-8.jpg" data-lightbox="3a1eccfd-ba90-47a9-ae54-310f9f586730" data-title="图6-10-8 python2.7.18安装"><figure id="fig1.8.10.8"><img src="assets/6-10-8.jpg" alt="图6-10-8 python2.7.18安装"><figcaption>图6-10-8 python2.7.18安装</figcaption></figure></a>
|
||
<p>这里我安装到了<code>E:\ProgramFiles\virtualpython\purepython\python2.7.18</code>这个文件夹下。复制一下这个文件夹。</p>
|
||
<p>接下来这一步很重要,你需要到<code>C:\Windows\System32</code>这个目录,搜索<code>python27.dll</code>这个文件并拷贝到另一个地方备份。</p>
|
||
<p>然后到系统程序与功能-卸载或更改程序那里将python2.7.18版本卸载了,卸载完成后,将刚才复制备份的文件夹修改回<code>python2.7.18</code>这个文件夹名。</p>
|
||
<p>将<code>python27.dll</code>这个文件还原到<code>C:\Windows\System32</code>这个目录。</p>
|
||
<p>这样,绿色版的python2.7.18就制作好了。</p>
|
||
<p>你可以输入命令来创建一个python2.7的虚拟环境了:</p>
|
||
<pre class="language-"><code class="lang-powershell">mkvirtualenv <span class="token operator">-</span>p <span class="token string">"E:\ProgramFiles\virtualpython\purepython\python2.7.18\python.exe"</span> py27
|
||
</code></pre>
|
||
<a href="assets/6-10-9.jpg" data-lightbox="0a760e98-6e70-4739-bebd-ae22388bf0f7" data-title="图6-10-9 创建python2.7.18的虚拟环境"><figure id="fig1.8.10.9"><img src="assets/6-10-9.jpg" alt="图6-10-9 创建python2.7.18的虚拟环境"><figcaption>图6-10-9 创建python2.7.18的虚拟环境</figcaption></figure></a>
|
||
<p>可以看到,确实使用了python2.7.18的版本。</p>
|
||
<blockquote>
|
||
<p>[!tip]</p>
|
||
<p>在python2语法中,打印输出使用的是<code>print 要打印的内容</code>这样的写法,而在python3中,变成了<code>print(要打印的内容)</code>,你可以很好地辨别用的是python2还是python3,请知悉。</p>
|
||
</blockquote>
|
||
<hr>
|
||
<h3 id="冻结项目所用的包"><a name="冻结项目所用的包" class="anchor-navigation-ex-anchor" href="#冻结项目所用的包"><i class="fa fa-link" aria-hidden="true"></i></a>冻结项目所用的包</h3>
|
||
<p>之前我们在学习解锁心仪的三方包的时候,学习过可以使用<code>pip freeze > requirements.txt</code>命令来冻结所用到的三方包的情况,我们来举个例子。</p>
|
||
<p>我们分别在cmd中输入下面的命令:</p>
|
||
<pre class="language-"><code class="lang-powershell">workon py36 <span class="token comment"># 切换py36虚拟环境</span>
|
||
pip install requests <span class="token comment"># 安装requests三方包及相关包</span>
|
||
pip list <span class="token comment"># 查看目前的pip列表</span>
|
||
pip freeze > requirements<span class="token punctuation">.</span>txt <span class="token comment"># 冻结目前所用的所有三方包保存到文件</span>
|
||
<span class="token function">type</span> requirements<span class="token punctuation">.</span>txt <span class="token comment"># cmd中打开文本文件并打印输出所有内容</span>
|
||
</code></pre>
|
||
<p>运行结果如下:</p>
|
||
<pre class="language-"><code class="lang-powershell">Microsoft Windows <span class="token punctuation">[</span>版本 10<span class="token punctuation">.</span>0<span class="token punctuation">.</span>18363<span class="token punctuation">.</span>778<span class="token punctuation">]</span>
|
||
<span class="token punctuation">(</span>c<span class="token punctuation">)</span> 2019 Microsoft Corporation。保留所有权利。
|
||
|
||
C:\Users\xueshanlinghu>workon py36
|
||
<span class="token punctuation">(</span>py36<span class="token punctuation">)</span> C:\Users\xueshanlinghu>pip install requests
|
||
Collecting requests
|
||
Downloading requests<span class="token operator">-</span>2<span class="token punctuation">.</span>23<span class="token punctuation">.</span>0<span class="token operator">-</span>py2<span class="token punctuation">.</span>py3<span class="token operator">-</span>none<span class="token operator">-</span>any<span class="token punctuation">.</span>whl <span class="token punctuation">(</span>58 kB<span class="token punctuation">)</span>
|
||
<span class="token punctuation">|</span>████████████████████████████████<span class="token punctuation">|</span> 58 kB 363 kB<span class="token operator">/</span>s
|
||
Collecting certifi>=2017<span class="token punctuation">.</span>4<span class="token punctuation">.</span>17
|
||
<span class="token keyword">Using</span> cached certifi<span class="token operator">-</span>2020<span class="token punctuation">.</span>4<span class="token punctuation">.</span>5<span class="token punctuation">.</span>1<span class="token operator">-</span>py2<span class="token punctuation">.</span>py3<span class="token operator">-</span>none<span class="token operator">-</span>any<span class="token punctuation">.</span>whl <span class="token punctuation">(</span>157 kB<span class="token punctuation">)</span>
|
||
Collecting chardet<4<span class="token punctuation">,</span>>=3<span class="token punctuation">.</span>0<span class="token punctuation">.</span>2
|
||
<span class="token keyword">Using</span> cached chardet<span class="token operator">-</span>3<span class="token punctuation">.</span>0<span class="token punctuation">.</span>4<span class="token operator">-</span>py2<span class="token punctuation">.</span>py3<span class="token operator">-</span>none<span class="token operator">-</span>any<span class="token punctuation">.</span>whl <span class="token punctuation">(</span>133 kB<span class="token punctuation">)</span>
|
||
Collecting urllib3<span class="token operator">!</span>=1<span class="token punctuation">.</span>25<span class="token punctuation">.</span>0<span class="token punctuation">,</span><span class="token operator">!</span>=1<span class="token punctuation">.</span>25<span class="token punctuation">.</span>1<span class="token punctuation">,</span><1<span class="token punctuation">.</span>26<span class="token punctuation">,</span>>=1<span class="token punctuation">.</span>21<span class="token punctuation">.</span>1
|
||
<span class="token keyword">Using</span> cached urllib3<span class="token operator">-</span>1<span class="token punctuation">.</span>25<span class="token punctuation">.</span>9<span class="token operator">-</span>py2<span class="token punctuation">.</span>py3<span class="token operator">-</span>none<span class="token operator">-</span>any<span class="token punctuation">.</span>whl <span class="token punctuation">(</span>126 kB<span class="token punctuation">)</span>
|
||
Collecting idna<3<span class="token punctuation">,</span>>=2<span class="token punctuation">.</span>5
|
||
<span class="token keyword">Using</span> cached idna<span class="token operator">-</span>2<span class="token punctuation">.</span>9<span class="token operator">-</span>py2<span class="token punctuation">.</span>py3<span class="token operator">-</span>none<span class="token operator">-</span>any<span class="token punctuation">.</span>whl <span class="token punctuation">(</span>58 kB<span class="token punctuation">)</span>
|
||
Installing collected packages: certifi<span class="token punctuation">,</span> chardet<span class="token punctuation">,</span> urllib3<span class="token punctuation">,</span> idna<span class="token punctuation">,</span> requests
|
||
Successfully installed certifi<span class="token operator">-</span>2020<span class="token punctuation">.</span>4<span class="token punctuation">.</span>5<span class="token punctuation">.</span>1 chardet<span class="token operator">-</span>3<span class="token punctuation">.</span>0<span class="token punctuation">.</span>4 idna<span class="token operator">-</span>2<span class="token punctuation">.</span>9 requests<span class="token operator">-</span>2<span class="token punctuation">.</span>23<span class="token punctuation">.</span>0 urllib3<span class="token operator">-</span>1<span class="token punctuation">.</span>25<span class="token punctuation">.</span>9
|
||
|
||
<span class="token punctuation">(</span>py36<span class="token punctuation">)</span> C:\Users\xueshanlinghu>pip list
|
||
Package Version
|
||
<span class="token operator">--</span>-<span class="token operator">--</span>-<span class="token operator">--</span>-<span class="token operator">-</span> <span class="token operator">--</span>-<span class="token operator">--</span>-<span class="token operator">--</span>-<span class="token operator">-</span>
|
||
certifi 2020<span class="token punctuation">.</span>4<span class="token punctuation">.</span>5<span class="token punctuation">.</span>1
|
||
chardet 3<span class="token punctuation">.</span>0<span class="token punctuation">.</span>4
|
||
idna 2<span class="token punctuation">.</span>9
|
||
pip 20<span class="token punctuation">.</span>0<span class="token punctuation">.</span>2
|
||
requests 2<span class="token punctuation">.</span>23<span class="token punctuation">.</span>0
|
||
setuptools 46<span class="token punctuation">.</span>1<span class="token punctuation">.</span>3
|
||
urllib3 1<span class="token punctuation">.</span>25<span class="token punctuation">.</span>9
|
||
wheel 0<span class="token punctuation">.</span>34<span class="token punctuation">.</span>2
|
||
|
||
<span class="token punctuation">(</span>py36<span class="token punctuation">)</span> C:\Users\xueshanlinghu>pip freeze > requirements<span class="token punctuation">.</span>txt
|
||
|
||
<span class="token punctuation">(</span>py36<span class="token punctuation">)</span> C:\Users\xueshanlinghu><span class="token function">type</span> requirements<span class="token punctuation">.</span>txt
|
||
certifi==2020<span class="token punctuation">.</span>4<span class="token punctuation">.</span>5<span class="token punctuation">.</span>1
|
||
chardet==3<span class="token punctuation">.</span>0<span class="token punctuation">.</span>4
|
||
idna==2<span class="token punctuation">.</span>9
|
||
requests==2<span class="token punctuation">.</span>23<span class="token punctuation">.</span>0
|
||
urllib3==1<span class="token punctuation">.</span>25<span class="token punctuation">.</span>9
|
||
|
||
<span class="token punctuation">(</span>py36<span class="token punctuation">)</span> C:\Users\xueshanlinghu>
|
||
</code></pre>
|
||
<p>换一个项目,所用的包不同,则你可以再创建一个新项目的虚拟环境,在里面任意折腾,当不需要时,删除该虚拟环境即可。</p>
|
||
<p>我们退出虚拟环境,再看一下系统python的<code>pip list</code>有没有什么变化,结果如下:</p>
|
||
<pre class="language-"><code class="lang-powershell"><span class="token punctuation">(</span>py36<span class="token punctuation">)</span> C:\Users\xueshanlinghu>deactivate
|
||
|
||
C:\Users\xueshanlinghu>pip list
|
||
Package Version
|
||
<span class="token operator">--</span>-<span class="token operator">--</span>-<span class="token operator">--</span>-<span class="token operator">--</span>-<span class="token operator">--</span>-<span class="token operator">--</span>-<span class="token operator">--</span><span class="token operator">-</span> <span class="token operator">--</span>-<span class="token operator">--</span>-<span class="token operator">-</span>
|
||
appdirs 1<span class="token punctuation">.</span>4<span class="token punctuation">.</span>3
|
||
distlib 0<span class="token punctuation">.</span>3<span class="token punctuation">.</span>0
|
||
filelock 3<span class="token punctuation">.</span>0<span class="token punctuation">.</span>12
|
||
pip 20<span class="token punctuation">.</span>0<span class="token punctuation">.</span>2
|
||
setuptools 46<span class="token punctuation">.</span>1<span class="token punctuation">.</span>3
|
||
six 1<span class="token punctuation">.</span>14<span class="token punctuation">.</span>0
|
||
virtualenv 20<span class="token punctuation">.</span>0<span class="token punctuation">.</span>18
|
||
virtualenvwrapper<span class="token operator">-</span>win 1<span class="token punctuation">.</span>2<span class="token punctuation">.</span>6
|
||
|
||
C:\Users\xueshanlinghu>
|
||
</code></pre>
|
||
<p>可以看到,只有之前安装<code>virtualenv</code>的一些相关的包,清清爽爽,干干净净。</p>
|
||
<h3 id="单词释义"><a name="单词释义" class="anchor-navigation-ex-anchor" href="#单词释义"><i class="fa fa-link" aria-hidden="true"></i></a>单词释义</h3>
|
||
<table>
|
||
<thead>
|
||
<tr>
|
||
<th>单词</th>
|
||
<th>释义</th>
|
||
</tr>
|
||
</thead>
|
||
<tbody>
|
||
<tr>
|
||
<td>mkvirtualenv</td>
|
||
<td>mk,make创建、制造的简写,virtualenv虚拟环境</td>
|
||
</tr>
|
||
<tr>
|
||
<td>deactivate</td>
|
||
<td>让...停止工作,就是退出激活的意思</td>
|
||
</tr>
|
||
<tr>
|
||
<td>activate</td>
|
||
<td>激活</td>
|
||
</tr>
|
||
<tr>
|
||
<td>rmvirtualenv</td>
|
||
<td>rm,remove移除的简写,virtualenv虚拟环境</td>
|
||
</tr>
|
||
</tbody>
|
||
</table>
|
||
<footer class="page-footer"><span class="copyright">Copyright © <a href="http://fox-9.com" target="_blank">雪山凌狐教程</a> all right reserved,powered by Gitbook</span><span class="footer-modification">该文件修订时间:
|
||
2020-07-11 22:05:30
|
||
</span></footer></body></html>
|
||
|
||
</section>
|
||
|
||
</div>
|
||
<div class="search-results">
|
||
<div class="has-results">
|
||
|
||
<h1 class="search-results-title"><span class='search-results-count'></span> results matching "<span class='search-query'></span>"</h1>
|
||
<ul class="search-results-list"></ul>
|
||
|
||
</div>
|
||
<div class="no-results">
|
||
|
||
<h1 class="search-results-title">No results matching "<span class='search-query'></span>"</h1>
|
||
|
||
</div>
|
||
</div>
|
||
</div>
|
||
|
||
</div>
|
||
</div>
|
||
|
||
</div>
|
||
|
||
|
||
|
||
<a href="6-9 python3小白课:虚拟环境介绍和安装.html" class="navigation navigation-prev " aria-label="Previous page: 6-9 python3小白课:虚拟环境介绍和安装">
|
||
<i class="fa fa-angle-left"></i>
|
||
</a>
|
||
|
||
|
||
<a href="../chapter7/" class="navigation navigation-next " aria-label="Next page: 七、类和对象">
|
||
<i class="fa fa-angle-right"></i>
|
||
</a>
|
||
|
||
|
||
|
||
</div>
|
||
|
||
<script>
|
||
var gitbook = gitbook || [];
|
||
gitbook.push(function() {
|
||
gitbook.page.hasChanged({"page":{"title":"6-10 python3小白课:虚拟环境使用","level":"1.8.10","depth":2,"next":{"title":"七、类和对象","level":"1.9","depth":1,"path":"chapter7/README.md","ref":"./chapter7/README.md","articles":[{"title":"7-1 python3小白课:一节课搞懂面向对象","level":"1.9.1","depth":2,"path":"chapter7/7-1 python3小白课:一节课搞懂面向对象.md","ref":"./chapter7/7-1 python3小白课:一节课搞懂面向对象.md","articles":[]},{"title":"7-2 python3小白课:定义类和实例化对象","level":"1.9.2","depth":2,"path":"chapter7/7-2 python3小白课:定义类和实例化对象.md","ref":"./chapter7/7-2 python3小白课:定义类和实例化对象.md","articles":[]},{"title":"7-3 python3小白课:了解实例方法","level":"1.9.3","depth":2,"path":"chapter7/7-3 python3小白课:了解实例方法.md","ref":"./chapter7/7-3 python3小白课:了解实例方法.md","articles":[]},{"title":"7-4 python3小白课:用property函数定义属性","level":"1.9.4","depth":2,"path":"chapter7/7-4 python3小白课:用property函数定义属性.md","ref":"./chapter7/7-4 python3小白课:用property函数定义属性.md","articles":[]},{"title":"7-5 python3小白课:封装和隐藏","level":"1.9.5","depth":2,"path":"chapter7/7-5 python3小白课:封装和隐藏.md","ref":"./chapter7/7-5 python3小白课:封装和隐藏.md","articles":[]},{"title":"7-6 python3小白课:类的继承和多继承","level":"1.9.6","depth":2,"path":"chapter7/7-6 python3小白课:类的继承和多继承.md","ref":"./chapter7/7-6 python3小白课:类的继承和多继承.md","articles":[]},{"title":"7-7 python3小白课:重写父类方法和使用super函数","level":"1.9.7","depth":2,"path":"chapter7/7-7 python3小白课:重写父类方法和使用super函数.md","ref":"./chapter7/7-7 python3小白课:重写父类方法和使用super函数.md","articles":[]},{"title":"7-8 python3小白课:类的多态性","level":"1.9.8","depth":2,"path":"chapter7/7-8 python3小白课:类的多态性.md","ref":"./chapter7/7-8 python3小白课:类的多态性.md","articles":[]},{"title":"7-9 python3小白课:可以被枚举的类","level":"1.9.9","depth":2,"path":"chapter7/7-9 python3小白课:可以被枚举的类.md","ref":"./chapter7/7-9 python3小白课:可以被枚举的类.md","articles":[]}]},"previous":{"title":"6-9 python3小白课:虚拟环境介绍和安装","level":"1.8.9","depth":2,"path":"chapter6/6-9 python3小白课:虚拟环境介绍和安装.md","ref":"./chapter6/6-9 python3小白课:虚拟环境介绍和安装.md","articles":[]},"dir":"ltr"},"config":{"plugins":["favicon","-search","-lunr","-sharing","-livereload","-highlight","prism","prism-themes","fontsettings","back-to-top-button","expandable-chapters-small","code","search-pro","splitter","donate","tbfed-pagefooter","pageview-count","auto-scroll-table","lightbox","anchor-navigation-ex","sitemap-general","ad","image-captions","autotheme","advanced-emoji","flexible-alerts","statistics","push-bd"],"styles":{"website":"/css/website.css"},"pluginsConfig":{"tbfed-pagefooter":{"copyright":"Copyright © <a href='http://fox-9.com'>雪山凌狐教程</a>","modify_label":"该文件修订时间:","modify_format":"YYYY-MM-DD HH:mm:ss"},"prism":{"css":["prism-themes/themes/prism-material-light.css"]},"ad":{"contentBottom":false},"statistics":{"bd_url":"https://hm.baidu.com/hm.js","cnzz_url":"https://s95.cnzz.com/z_stat.php","google_url":"https://www.googletagmanager.com/gtag/js","bd_token":"605d1993c133629d69ab2701f78d9690"},"splitter":{},"search-pro":{},"auto-scroll-table":{},"code":{"copyButtons":true},"donate":{"alipay":"/python3xiaobaike/assets/alipay-code.jpg","alipayText":"支付宝打赏","button":"赏","title":"","wechat":"/python3xiaobaike/assets/wechatpay-code.jpg","wechatText":"微信打赏"},"sitemap-general":{"prefix":"http://doc.fox-9.com/python3xiaobaike/"},"fontsettings":{"family":"sans","size":2,"theme":"white"},"anchor-navigation-ex":{"associatedWithSummary":true,"float":{"floatIcon":"fa fa-navicon","level1Icon":"fa fa-hand-o-right","level2Icon":"fa fa-hand-o-right","level3Icon":"fa fa-hand-o-right","showLevelIcon":true},"mode":"float","multipleH1":true,"pageTop":{"level1Icon":"","level2Icon":"","level3Icon":"","showLevelIcon":false},"printLog":false,"showGoTop":false,"showLevel":false},"favicon":{"shortcut":"/assets/favicon.ico","bookmark":"/assets/favicon.ico"},"lightbox":{"jquery":true,"sameUuid":false},"push-bd":{},"back-to-top-button":{},"pageview-count":{},"prism-themes":{},"expandable-chapters-small":{},"flexible-alerts":{"danger":{"className":"danger","icon":"fa fa-ban","label":"注意"},"note":{"className":"info","icon":"fa fa-info-circle","label":"说明"},"style":"flat","tip":{"className":"tip","icon":"fa fa-lightbulb-o","label":"提示"},"warning":{"className":"warning","icon":"fa fa-exclamation-triangle","label":"警告"},"question":{"label":"问题","icon":"fa fa-question-circle","className":"question"}},"autotheme":{"night":[20,21,22,23,0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19],"sepia":[25,25,25,25,25,25],"white":[25,25,25,25,25,25,25,25]},"advanced-emoji":{"embedEmojis":false},"theme-default":{"styles":{"website":"styles/website.css","pdf":"styles/pdf.css","epub":"styles/epub.css","mobi":"styles/mobi.css","ebook":"styles/ebook.css","print":"styles/print.css"},"showLevel":false},"image-captions":{"caption":"_CAPTION_","variable_name":"_pictures"}},"theme":"default","author":"雪山凌狐","pdf":{"pageNumbers":true,"fontSize":12,"fontFamily":"Arial","paperSize":"a4","chapterMark":"pagebreak","pageBreaksBefore":"/","margin":{"right":62,"left":62,"top":56,"bottom":56}},"structure":{"langs":"LANGS.md","readme":"README.md","glossary":"GLOSSARY.md","summary":"CATALOG_FOR_GITBOOK.md"},"variables":{"_pictures":[{"backlink":"./chapter1/1-1 python3小白课:python语言简介.html#fig1.3.1.1","level":"1.3.1","list_caption":"Figure: 图1-1-1 龟叔","alt":"图1-1-1 龟叔","nro":1,"url":"assets/1-1-1.jpg","index":1,"caption_template":"_CAPTION_","label":"图1-1-1 龟叔","attributes":{},"skip":false,"key":"1.3.1.1"},{"backlink":"./chapter1/1-1 python3小白课:python语言简介.html#fig1.3.1.2","level":"1.3.1","list_caption":"Figure: 图1-1-2 python2的最后一个版本官方博客","alt":"图1-1-2 python2的最后一个版本官方博客","nro":2,"url":"assets/1-1-2.jpg","index":2,"caption_template":"_CAPTION_","label":"图1-1-2 python2的最后一个版本官方博客","attributes":{},"skip":false,"key":"1.3.1.2"},{"backlink":"./chapter1/1-2 python3小白课:python下载.html#fig1.3.2.1","level":"1.3.2","list_caption":"Figure: 图1-2-1 python官网界面","alt":"图1-2-1 python官网界面","nro":3,"url":"assets/1-2-1.jpg","index":1,"caption_template":"_CAPTION_","label":"图1-2-1 python官网界面","attributes":{},"skip":false,"key":"1.3.2.1"},{"backlink":"./chapter1/1-2 python3小白课:python下载.html#fig1.3.2.2","level":"1.3.2","list_caption":"Figure: 图1-2-2 python3.8.2版本安装包","alt":"图1-2-2 python3.8.2版本安装包","nro":4,"url":"assets/1-2-2.jpg","index":2,"caption_template":"_CAPTION_","label":"图1-2-2 python3.8.2版本安装包","attributes":{},"skip":false,"key":"1.3.2.2"},{"backlink":"./chapter1/1-3 python3小白课:python安装.html#fig1.3.3.1","level":"1.3.3","list_caption":"Figure: 图1-3-1 安装界面1","alt":"图1-3-1 安装界面1","nro":5,"url":"assets/1-3-1.jpg","index":1,"caption_template":"_CAPTION_","label":"图1-3-1 安装界面1","attributes":{},"skip":false,"key":"1.3.3.1"},{"backlink":"./chapter1/1-3 python3小白课:python安装.html#fig1.3.3.2","level":"1.3.3","list_caption":"Figure: 图1-3-2 安装界面2","alt":"图1-3-2 安装界面2","nro":6,"url":"assets/1-3-2.jpg","index":2,"caption_template":"_CAPTION_","label":"图1-3-2 安装界面2","attributes":{},"skip":false,"key":"1.3.3.2"},{"backlink":"./chapter1/1-3 python3小白课:python安装.html#fig1.3.3.3","level":"1.3.3","list_caption":"Figure: 图1-3-3 安装界面3","alt":"图1-3-3 安装界面3","nro":7,"url":"assets/1-3-3.jpg","index":3,"caption_template":"_CAPTION_","label":"图1-3-3 安装界面3","attributes":{},"skip":false,"key":"1.3.3.3"},{"backlink":"./chapter1/1-6 python3小白课:使用python IDLE.html#fig1.3.6.1","level":"1.3.6","list_caption":"Figure: 图1-6-1 python shell","alt":"图1-6-1 python shell","nro":8,"url":"assets/1-6-1.jpg","index":1,"caption_template":"_CAPTION_","label":"图1-6-1 python shell","attributes":{},"skip":false,"key":"1.3.6.1"},{"backlink":"./chapter1/1-6 python3小白课:使用python IDLE.html#fig1.3.6.2","level":"1.3.6","list_caption":"Figure: 图1-6-2 python IDLE写py文件","alt":"图1-6-2 python IDLE写py文件","nro":9,"url":"assets/1-6-2.jpg","index":2,"caption_template":"_CAPTION_","label":"图1-6-2 python IDLE写py文件","attributes":{},"skip":false,"key":"1.3.6.2"},{"backlink":"./chapter1/1-7 python3小白课:使用python shell.html#fig1.3.7.1","level":"1.3.7","list_caption":"Figure: 图1-7-1 进入python shell","alt":"图1-7-1 进入python shell","nro":10,"url":"assets/1-7-1.jpg","index":1,"caption_template":"_CAPTION_","label":"图1-7-1 进入python shell","attributes":{},"skip":false,"key":"1.3.7.1"},{"backlink":"./chapter1/1-7 python3小白课:使用python shell.html#fig1.3.7.2","level":"1.3.7","list_caption":"Figure: 图1-7-2 python shell代码测试","alt":"图1-7-2 python shell代码测试","nro":11,"url":"assets/1-7-2.jpg","index":2,"caption_template":"_CAPTION_","label":"图1-7-2 python shell代码测试","attributes":{},"skip":false,"key":"1.3.7.2"},{"backlink":"./chapter6/6-8 python3小白课:解锁你心仪的三方包.html#fig1.8.8.1","level":"1.8.8","list_caption":"Figure: 图6-8-1 pypi官网首页","alt":"图6-8-1 pypi官网首页","nro":12,"url":"assets/6-8-1.jpg","index":1,"caption_template":"_CAPTION_","label":"图6-8-1 pypi官网首页","attributes":{},"skip":false,"key":"1.8.8.1"},{"backlink":"./chapter6/6-8 python3小白课:解锁你心仪的三方包.html#fig1.8.8.2","level":"1.8.8","list_caption":"Figure: 图6-8-2 requests搜索结果","alt":"图6-8-2 requests搜索结果","nro":13,"url":"assets/6-8-2.jpg","index":2,"caption_template":"_CAPTION_","label":"图6-8-2 requests搜索结果","attributes":{},"skip":false,"key":"1.8.8.2"},{"backlink":"./chapter6/6-8 python3小白课:解锁你心仪的三方包.html#fig1.8.8.3","level":"1.8.8","list_caption":"Figure: 图6-8-3 包的内页","alt":"图6-8-3 包的内页","nro":14,"url":"assets/6-8-3.jpg","index":3,"caption_template":"_CAPTION_","label":"图6-8-3 包的内页","attributes":{},"skip":false,"key":"1.8.8.3"},{"backlink":"./chapter6/6-8 python3小白课:解锁你心仪的三方包.html#fig1.8.8.4","level":"1.8.8","list_caption":"Figure: 图6-8-4 下载文件页面","alt":"图6-8-4 下载文件页面","nro":15,"url":"assets/6-8-4.jpg","index":4,"caption_template":"_CAPTION_","label":"图6-8-4 下载文件页面","attributes":{},"skip":false,"key":"1.8.8.4"},{"backlink":"./chapter6/6-9 python3小白课:虚拟环境介绍和安装.html#fig1.8.9.1","level":"1.8.9","list_caption":"Figure: 图6-9-1 新建系统环境变量WORKON_HOME","alt":"图6-9-1 新建系统环境变量WORKON_HOME","nro":16,"url":"assets/6-9-1.jpg","index":1,"caption_template":"_CAPTION_","label":"图6-9-1 新建系统环境变量WORKON_HOME","attributes":{},"skip":false,"key":"1.8.9.1"},{"backlink":"./chapter6/6-10 python3小白课:虚拟环境使用.html#fig1.8.10.1","level":"1.8.10","list_caption":"Figure: 图6-10-1 创建test虚拟环境","alt":"图6-10-1 创建test虚拟环境","nro":17,"url":"assets/6-10-1.jpg","index":1,"caption_template":"_CAPTION_","label":"图6-10-1 创建test虚拟环境","attributes":{},"skip":false,"key":"1.8.10.1"},{"backlink":"./chapter6/6-10 python3小白课:虚拟环境使用.html#fig1.8.10.2","level":"1.8.10","list_caption":"Figure: 图6-10-2 退出虚拟环境","alt":"图6-10-2 退出虚拟环境","nro":18,"url":"assets/6-10-2.jpg","index":2,"caption_template":"_CAPTION_","label":"图6-10-2 退出虚拟环境","attributes":{},"skip":false,"key":"1.8.10.2"},{"backlink":"./chapter6/6-10 python3小白课:虚拟环境使用.html#fig1.8.10.3","level":"1.8.10","list_caption":"Figure: 图6-10-3 workon激活虚拟环境test","alt":"图6-10-3 workon激活虚拟环境test","nro":19,"url":"assets/6-10-3.jpg","index":3,"caption_template":"_CAPTION_","label":"图6-10-3 workon激活虚拟环境test","attributes":{},"skip":false,"key":"1.8.10.3"},{"backlink":"./chapter6/6-10 python3小白课:虚拟环境使用.html#fig1.8.10.4","level":"1.8.10","list_caption":"Figure: 图6-10-4 虚拟环境下的pip","alt":"图6-10-4 虚拟环境下的pip","nro":20,"url":"assets/6-10-4.jpg","index":4,"caption_template":"_CAPTION_","label":"图6-10-4 虚拟环境下的pip","attributes":{},"skip":false,"key":"1.8.10.4"},{"backlink":"./chapter6/6-10 python3小白课:虚拟环境使用.html#fig1.8.10.5","level":"1.8.10","list_caption":"Figure: 图6-10-5 删除虚拟环境test","alt":"图6-10-5 删除虚拟环境test","nro":21,"url":"assets/6-10-5.jpg","index":5,"caption_template":"_CAPTION_","label":"图6-10-5 删除虚拟环境test","attributes":{},"skip":false,"key":"1.8.10.5"},{"backlink":"./chapter6/6-10 python3小白课:虚拟环境使用.html#fig1.8.10.6","level":"1.8.10","list_caption":"Figure: 图6-10-6 python3.6.6安装","alt":"图6-10-6 python3.6.6安装","nro":22,"url":"assets/6-10-6.jpg","index":6,"caption_template":"_CAPTION_","label":"图6-10-6 python3.6.6安装","attributes":{},"skip":false,"key":"1.8.10.6"},{"backlink":"./chapter6/6-10 python3小白课:虚拟环境使用.html#fig1.8.10.7","level":"1.8.10","list_caption":"Figure: 图6-10-7 创建python3.6.6的虚拟环境","alt":"图6-10-7 创建python3.6.6的虚拟环境","nro":23,"url":"assets/6-10-7.jpg","index":7,"caption_template":"_CAPTION_","label":"图6-10-7 创建python3.6.6的虚拟环境","attributes":{},"skip":false,"key":"1.8.10.7"},{"backlink":"./chapter6/6-10 python3小白课:虚拟环境使用.html#fig1.8.10.8","level":"1.8.10","list_caption":"Figure: 图6-10-8 python2.7.18安装","alt":"图6-10-8 python2.7.18安装","nro":24,"url":"assets/6-10-8.jpg","index":8,"caption_template":"_CAPTION_","label":"图6-10-8 python2.7.18安装","attributes":{},"skip":false,"key":"1.8.10.8"},{"backlink":"./chapter6/6-10 python3小白课:虚拟环境使用.html#fig1.8.10.9","level":"1.8.10","list_caption":"Figure: 图6-10-9 创建python2.7.18的虚拟环境","alt":"图6-10-9 创建python2.7.18的虚拟环境","nro":25,"url":"assets/6-10-9.jpg","index":9,"caption_template":"_CAPTION_","label":"图6-10-9 创建python2.7.18的虚拟环境","attributes":{},"skip":false,"key":"1.8.10.9"},{"backlink":"./chapter7/7-1 python3小白课:一节课搞懂面向对象.html#fig1.9.1.1","level":"1.9.1","list_caption":"Figure: 图7-1-1 暖风机","alt":"图7-1-1 暖风机","nro":26,"url":"assets/7-1-1.jpg","index":1,"caption_template":"_CAPTION_","label":"图7-1-1 暖风机","attributes":{},"skip":false,"key":"1.9.1.1"},{"backlink":"./chapter7/7-1 python3小白课:一节课搞懂面向对象.html#fig1.9.1.2","level":"1.9.1","list_caption":"Figure: 图7-1-2 会摇头的暖风机","alt":"图7-1-2 会摇头的暖风机","nro":27,"url":"assets/7-1-2.jpg","index":2,"caption_template":"_CAPTION_","label":"图7-1-2 会摇头的暖风机","attributes":{},"skip":false,"key":"1.9.1.2"},{"backlink":"./chapter7/7-1 python3小白课:一节课搞懂面向对象.html#fig1.9.1.3","level":"1.9.1","list_caption":"Figure: 图7-1-3 会摇头的冷风机","alt":"图7-1-3 会摇头的冷风机","nro":28,"url":"assets/7-1-3.jpg","index":3,"caption_template":"_CAPTION_","label":"图7-1-3 会摇头的冷风机","attributes":{},"skip":false,"key":"1.9.1.3"},{"backlink":"./chapter7/7-7 python3小白课:重写父类方法和使用super函数.html#fig1.9.7.1","level":"1.9.7","list_caption":"Figure: 图7-7-1 鸡的图片","alt":"图7-7-1 鸡的图片","nro":29,"url":"assets/7-7-1.jpg","index":1,"caption_template":"_CAPTION_","label":"图7-7-1 鸡的图片","attributes":{},"skip":false,"key":"1.9.7.1"}]},"title":"python3小白课笔记","language":"zh-hans","links":{"sidebar":{"雪山凌狐教程":"http://fox-9.com"}},"gitbook":"3.2.3","description":"python3小白课,让你不再惧怕python的入门学习"},"file":{"path":"chapter6/6-10 python3小白课:虚拟环境使用.md","mtime":"2020-07-11T14:05:30.006Z","type":"markdown"},"gitbook":{"version":"3.2.3","time":"2022-09-14T10:02:56.416Z"},"basePath":"..","book":{"language":""}});
|
||
});
|
||
</script>
|
||
</div>
|
||
|
||
|
||
<script src="../gitbook/gitbook.js"></script>
|
||
<script src="../gitbook/theme.js"></script>
|
||
|
||
|
||
<script src="../gitbook/gitbook-plugin-fontsettings/fontsettings.js"></script>
|
||
|
||
|
||
|
||
<script src="../gitbook/gitbook-plugin-back-to-top-button/plugin.js"></script>
|
||
|
||
|
||
|
||
<script src="../gitbook/gitbook-plugin-expandable-chapters-small/expandable-chapters-small.js"></script>
|
||
|
||
|
||
|
||
<script src="../gitbook/gitbook-plugin-code/plugin.js"></script>
|
||
|
||
|
||
|
||
<script src="../gitbook/gitbook-plugin-search-pro/jquery.mark.min.js"></script>
|
||
|
||
|
||
|
||
<script src="../gitbook/gitbook-plugin-search-pro/search.js"></script>
|
||
|
||
|
||
|
||
<script src="../gitbook/gitbook-plugin-splitter/splitter.js"></script>
|
||
|
||
|
||
|
||
<script src="../gitbook/gitbook-plugin-donate/plugin.js"></script>
|
||
|
||
|
||
|
||
<script src="../gitbook/gitbook-plugin-pageview-count/plugin.js"></script>
|
||
|
||
|
||
|
||
<script src="../gitbook/gitbook-plugin-auto-scroll-table/plugin.js"></script>
|
||
|
||
|
||
|
||
<script src="../gitbook/gitbook-plugin-lightbox/js/lightbox.min.js"></script>
|
||
|
||
|
||
|
||
<script src="../gitbook/gitbook-plugin-ad/plugin.js"></script>
|
||
|
||
|
||
|
||
<script src="../gitbook/gitbook-plugin-autotheme/plugin.js"></script>
|
||
|
||
|
||
|
||
<script src="../gitbook/gitbook-plugin-flexible-alerts/plugin.js"></script>
|
||
|
||
|
||
|
||
<script src="../gitbook/gitbook-plugin-statistics/statistics.js"></script>
|
||
|
||
|
||
|
||
<script src="../gitbook/gitbook-plugin-push-bd/plugin.js"></script>
|
||
|
||
|
||
|
||
</body>
|
||
</html>
|
||
|