python 版本管理工具 pyenv-win 安装

一、下载 pyenv

pyenv-win

使用 powershell 下载

Invoke-WebRequest -UseBasicParsing -Uri "https://raw.githubusercontent.com/pyenv-win/pyenv-win/master/pyenv-win/install-pyenv-win.ps1" -OutFile "./install-pyenv-win.ps1"; &"./install-pyenv-win.ps1"

二、可能会遇到的问题

解决方法:设置powershell执行策略

Set-ExecutionPolicy -Scope CurrentUser RemoteSigned

执行结果图

三、pyenv 相关指令

   commands     List all available pyenv commands
   local        Set or show the local application-specific Python version
   latest       Print the latest installed or known version with the given prefix
   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 version's `bin' directory is at the front
   which        Display the full path to an executable
   whence       List all Python versions that contain the given executable

四、查看是否安装成功 (需要重新打开 powershell)

pyenv --version

  • 10
    点赞
  • 3
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值