본문 바로가기
OS/Windows

[Windows] 윈도우 pyenv 설치

by pcm9881 2023. 4. 18.

1.  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"

 

 

& : 이 시스템에서 스크립트를 실행할 수 없으므로 C:\Users\유저명\install-pyenv-win.ps1 파일을 로드할 수 없습니다. 자세한 내용은 about_Execution_P olicies(https://go.microsoft.com/fwlink/?LinkID=135170)를 참조하십시오. 위치 줄:1 문자:173 + ... n.ps1" -OutFile "./install-pyenv-win.ps1"; &"./install-pyenv-win.ps1" + ~~~~~~~~~~~~~~~~~~~~~~~~~ + CategoryInfo : 보안 오류: (:) [], PSSecurityException + FullyQualifiedErrorId : UnauthorizedAccess

* 위와 같은 오류 메세지가나오는 경우

Set-ExecutionPolicy RemoteSigned

 

PowerShell 재실행

pyenv --version

 

결과

 

 

2. Chocholatey 설치

 

Chocholatey 설치 명령어

choco install pyenv-win

 

결과

 

PowerShell 재실행

pyenv --version

 

결과

 

 

3. pyenv 명령어

 

설치 가능한 파이썬 버전 확인

pyenv install -l

 

파이썬 설치

pyenv install [version]

 

예시

pyenv install 3.11.0b4

 

결과

 

 

참조

[Github pyeny-win]: https://github.com/pyenv-win/pyenv-win#quick-start

 

GitHub - pyenv-win/pyenv-win: pyenv for Windows. pyenv is a simple python version management tool. It lets you easily switch bet

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 s...

github.com

[Chocolatey pyenv-win]: https://community.chocolatey.org/packages/pyenv-win#description

 

pyenv-win 3.1.1

pyenv for Windows

community.chocolatey.org

[Microsoft 실행정책]: https://learn.microsoft.com/en-us/powershell/module/microsoft.powershell.security/set-executionpolicy?view=powershell-7.3 

 

Set-ExecutionPolicy (Microsoft.PowerShell.Security) - PowerShell

The Set-ExecutionPolicy cmdlet changes PowerShell execution policies for Windows computers. For more information, see about_Execution_Policies. Beginning in PowerShell 6.0 for non-Windows computers, the default execution policy is Unrestricted and can't be

learn.microsoft.com

 

728x90

댓글