链接:GitHub - pyenv-win/pyenv-win: pyenv for Windows. pyenv is a simple python version management tool. It lets you easily switch between multiple versions of Python. It's simple, unobtrusive, and follows the UNIX tradition of single-purpose tools that do one thing well.
简介
pyenv-win 是windows 下的一个python 多版本管理工具。
使用
命令 | 用法 |
local | Set or show the local application-specific Python version |
global | Set or show the global Python version |
shell | Set or show the shell-specific Python version |
install | Install 1 or more versions of Python |
uninstall | Uninstall 1 or more versions of Python |
update | Update the cached version DB |
rehash | Rehash pyenv shims (run this after switching Python versions) |
vname | Show the current Python version |
version | Show the current Python version and its origin |
version-name | Show the current Python version |
versions | List all Python versions available to pyenv |
exec | Runs an executable by first preparing PATH so that the selected Python |
which | Display the full path to an executable |
whence | List all Python versions that contain the given executable |
下载
一. windows terminal
windows shell 使用 powershell 。 直接Microsoft Store 搜索 windows terminal 。 点击下载安装即可。
二. 通过pip下载 pyenv-win
首先下载一个python 版本。https://www.python.org/downloads/windows/ 。下载后点击安装
然后在python 的bin 目录里面执行 pip install pyenv-win --target [your path where to store pyenv]
三. 为 pyenv 配置系统变量
操作 过程: 1.【此电脑】 -> 【属性】-> 【高级系统设置】-> 【环境变量】(以下操作更改的都是系统变量)-> 【系统变量】-> 【新建变量】
2. 【双击系统变量的path】 -> 【新建】
测试
重启当前 cmd 或 powershell。 执行 pyenv --version ,能输出版本号即配置成功。如果有错误,再检查一遍有没有遗漏或拼写错误。
PS : powershell 执行pyenv 可能有个问题
无法加载文件 C:\Users\DH\Desktop\cs\rename.ps1,因为在此系统上禁止运行脚本。有关详细信息,请参阅 https:/go.microsoft.com/fwlink/?LinkID=135170 中的 about_Execution_Policies。
此时 执行下set-executionpolicy remotesigned 。 再重新执行命令即可。
具体看:PowerShell:因为在此系统上禁止运行脚本,解决方法 - 简书
热门文章
- 我所在的城市有一家宠物医院的英语作文(我所在的城市有一家宠物医院的英语作文怎么写)
- 再谈JavaScript中bind、call、apply三个方法的区别与使用方式_javascript技巧
- 4月10日|V2ray/Shadowrocket/SSR/Clash每天更新21.1M/S免费节点订阅链接,付费节点订阅推荐
- springcloudalibaba架构(12):Feign整合Sentinel实现服务容错
- 狗粮生产机器设备二手(狗粮加工机器设备二手)
- 人打的狂犬和动物打的狂犬一样吗图片(人打的狂犬疫苗跟狗的一样吗?)
- 宠物粮食市场营销调查报告范文(宠物粮食营销策划案)
- 淘宝店铺转让交易平台有哪些(淘宝网店转让交易平台)
- C#使用RestClient调用Web API_C#教程
- 3月18日|Clash/SSR/V2ray/Shadowrocket每天更新20M/S免费节点订阅链接,付费节点订阅推荐