这些教程将指导使用者如何设置开发环境、是否在原生 Windows 或 Windows Subsystem for Linux (WSL) 系统上安装自己的工具,以及如何集成 VS Code、Git 等工具。
具体教程如下所示:
- 初学者在 Windows 上使用 Python 的教程
- web 开发者在 Windows 上使用 Python 的教程
- 在 Windows 上使用 Python 编写脚本和自动执行文件系统操作
- 在 Windows 上使用 Python 执行机器学习任务(待更新)
Python资源共享群:484031800
<tt-image data-tteditor-tag="tteditorTag" contenteditable="false" class="syl1563868022455" data-render-status="finished" data-syl-blot="image" style="box-sizing: border-box; cursor: text; color: rgb(34, 34, 34); font-family: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "WenQuanYi Micro Hei", "Helvetica Neue", Arial, sans-serif; font-size: 16px; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: left; text-indent: 0px; text-transform: none; white-space: pre-wrap; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-color: rgb(255, 255, 255); text-decoration-style: initial; text-decoration-color: initial; display: block;"><input class="pgc-img-caption-ipt" placeholder="图片描述(最多50字)" value="" style="box-sizing: border-box; outline: 0px; color: rgb(102, 102, 102); position: absolute; left: 187.5px; transform: translateX(-50%); padding: 6px 7px; max-width: 100%; width: 375px; text-align: center; cursor: text; font-size: 12px; line-height: 1.5; background-color: rgb(255, 255, 255); background-image: none; border: 0px solid rgb(217, 217, 217); border-radius: 4px; transition: all 0.2s cubic-bezier(0.645, 0.045, 0.355, 1) 0s;"></tt-image>
初学者教程
该教程适用于对 Python 感兴趣的初学者,具体内容包括设置开发环境、安装 Python、安装 VS Code、安装 Git,以及简单的教程和实践活动。
<tt-image data-tteditor-tag="tteditorTag" contenteditable="false" class="syl1563868022459" data-render-status="finished" data-syl-blot="image" style="box-sizing: border-box; cursor: text; color: rgb(34, 34, 34); font-family: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "WenQuanYi Micro Hei", "Helvetica Neue", Arial, sans-serif; font-size: 16px; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: left; text-indent: 0px; text-transform: none; white-space: pre-wrap; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-color: rgb(255, 255, 255); text-decoration-style: initial; text-decoration-color: initial; display: block;"><input class="pgc-img-caption-ipt" placeholder="图片描述(最多50字)" value="" style="box-sizing: border-box; outline: 0px; color: rgb(102, 102, 102); position: absolute; left: 187.5px; transform: translateX(-50%); padding: 6px 7px; max-width: 100%; width: 375px; text-align: center; cursor: text; font-size: 12px; line-height: 1.5; background-color: rgb(255, 255, 255); background-image: none; border: 0px solid rgb(217, 217, 217); border-radius: 4px; transition: all 0.2s cubic-bezier(0.645, 0.045, 0.355, 1) 0s;"></tt-image>
web 开发者教程
该教程适用于使用 WSL 在 Windows 上使用 Python 进行 web 开发。
具体内容包括:设置开发环境、启用 WSL、安装 Linux 分发版、设置 Visual Studio Code、创建新项目、安装 Python、pip 和 venv、创建虚拟环境等步骤,以及 Flask Hello World 教程和 Django Hello World 教程。
<tt-image data-tteditor-tag="tteditorTag" contenteditable="false" class="syl1563868022463" data-render-status="finished" data-syl-blot="image" style="box-sizing: border-box; cursor: text; color: rgb(34, 34, 34); font-family: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "WenQuanYi Micro Hei", "Helvetica Neue", Arial, sans-serif; font-size: 16px; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: left; text-indent: 0px; text-transform: none; white-space: pre-wrap; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-color: rgb(255, 255, 255); text-decoration-style: initial; text-decoration-color: initial; display: block;"><input class="pgc-img-caption-ipt" placeholder="图片描述(最多50字)" value="" style="box-sizing: border-box; outline: 0px; color: rgb(102, 102, 102); position: absolute; left: 187.5px; transform: translateX(-50%); padding: 6px 7px; max-width: 100%; width: 375px; text-align: center; cursor: text; font-size: 12px; line-height: 1.5; background-color: rgb(255, 255, 255); background-image: none; border: 0px solid rgb(217, 217, 217); border-radius: 4px; transition: all 0.2s cubic-bezier(0.645, 0.045, 0.355, 1) 0s;"></tt-image>
值得注意的是,在 Windows 上使用 Python 进行 web 开发时,微软官方教程建议通过 WSL 专门安装 Python 来构建 web 应用程序。原因在于:Python web 开发的许多教程和说明都是针对 Linux 用户编写的, 并使用基于 Linux 的打包和安装工具。大多数 web 应用还部署在 Linux 上,因此,这将确保开发环境与生产环境之间的一致性。
在 Windows 上使用 Python 编写脚本和自动执行文件系统操作
该教程主要介绍如何在 Windows 上使用 Python 编写脚本和自动执行文件系统操作。具体内容包括:设置开发环境、安装 Python、安装 Visual Studio Code、安装 Microsoft Python 扩展、在 VS Code 中打开集成的 PowerShell 终端、安装 Git 等步骤。
<tt-image data-tteditor-tag="tteditorTag" contenteditable="false" class="syl1563868022466" data-render-status="finished" data-syl-blot="image" style="box-sizing: border-box; cursor: text; color: rgb(34, 34, 34); font-family: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "WenQuanYi Micro Hei", "Helvetica Neue", Arial, sans-serif; font-size: 16px; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: left; text-indent: 0px; text-transform: none; white-space: pre-wrap; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-color: rgb(255, 255, 255); text-decoration-style: initial; text-decoration-color: initial; display: block;"><input class="pgc-img-caption-ipt" placeholder="图片描述(最多50字)" value="" style="box-sizing: border-box; outline: 0px; color: rgb(102, 102, 102); position: absolute; left: 187.5px; transform: translateX(-50%); padding: 6px 7px; max-width: 100%; width: 375px; text-align: center; cursor: text; font-size: 12px; line-height: 1.5; background-color: rgb(255, 255, 255); background-image: none; border: 0px solid rgb(217, 217, 217); border-radius: 4px; transition: all 0.2s cubic-bezier(0.645, 0.045, 0.355, 1) 0s;"></tt-image>
在设置开发环境时,执行这些功能与执行 web 开发时的开发环境设置有所不同。
如前文所述,在 Windows 上使用 Python 进行 web 开发时需要通过 WSL 专门安装 Python 来构建 web 应用程序,而如果是执行 web 开发以外的其他操作时,只需使用 Microsoft Store 直接在 Windows 10 上安装 Python。
此外,除了这三门教程以及待更新的机器学习教程以外,微软官方还提供了常见问题解答(FAQ)和资源列表。
- 为什么无法 "pip 安装" 某个包?
- 什么是 py?
- 为什么在复制粘贴时文件路径不能在 Python 中使用?
- 什么是 PYTHONPATH?
- 在哪里可以找到有关打包和部署的帮助?
- 如果需要在不同的计算机上工作, 该怎么办?
- 如果我使用的是 PyCharm、Atom、Sublime Text、Emacs 或 Vim, 该怎么办?
- Mac 快捷键如何映射到 Windows 快捷键?
当你遇到这些问题时可以从微软官方教程中获得答案。
网友评论