본문 바로가기
카테고리 없음

윈도우 문제 해결 - pyenv : The term 'pyenv' is not recognized as the name of a cmdlet, function, script file

by 기계공학 주인장 2025. 5. 8.
반응형

윈도우에서 pyenv를 사용하는데 다음과 같은 에러가 발생했습니다.

 

pyenv install 3.12.0
pyenv : The term 'pyenv' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was included, verify that the path is correct and try again.
At line:1 char:1
+ pyenv install 3.12.0
+ ~~~~~
+ CategoryInfo : ObjectNotFound: (pyenv:String) [], CommandNotFoundException
+ FullyQualifiedErrorId : CommandNotFoundException

 

찾아보니 윈도우 PC에 pyenv가 설치되어있지 않기 때문에 발생한 문제였습니다. 

 

이는 다음과 같은 방법으로 해결할 수 있습니다.


윈도우에서 pyenv : The term 'pyenv' is not recognized as the name of a cmdlet, function, script file 문제 해결하기

1. PowerShell을 관리자 권한으로 열어준다.

 

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

 

혹시 여기서 다음과 같은 에러가 발생한다면

 

For more information, see about_Execution_Policies at https:/go.microsoft.com/fwlink/?LinkID=135170.
At line:1 char:173
+ ... n.ps1" -OutFile "./install-pyenv-win.ps1"; &"./install-pyenv-win.ps1"
+ ~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : SecurityError: (:) [], PSSecurityException
+ FullyQualifiedErrorId : UnauthorizedAccess

 

다음과 같은 커맨드를 입력해서 권한을 부여한다.

 

Set-ExecutionPolicy -ExecutionPolicy RemoteSigned

 

그리고 다시 한 번더 커맨드를 입력한다.

 

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"

 

3. PowerShell을 껏다 켠다.

 

4. pyenv를 입력한다.

 

 

그러면 위와 같은 화면을 볼 수 있는데. 그러면 완벽하게 설치된 것입니다.

 

 

 

반응형


"이 포스팅은 쿠팡 파트너스 활동의 일환으로, 이에 따른 일정액의 수수료를 제공받습니다."


댓글