728x90

Window 환경의 CMD(명령 프롬프트)에서는 conda 명령어가 잘 동작하지만 powershell에서는 명령어가 동작하지 않는 문제가 있습니다.

아래와 같이 하면 PowerShell에서도 사용할 수 있습니다.

1. init powershell in Conda

# 1. ****init powershell in Conda****
conda init powershell

# 2. 현재 설정된 정책을 확인
Get-ExecutionPolicy

# Result
PS C:\WINDOWS\system32> Get-ExecutionPolicy
ByPass

2. 실행 정책 변경

아래 명령어로 정책을 변경합니다.

Set-ExecutionPolicy -ExecutionPolicy Unrestricted

Get-ExecutionPolicy 으로 Unrestricted 결과가 나오면 정책이 변경이 완료됩니다.

3. Restart Powershell

기타

PowerShll에서 (base) 를 지우고 싶은 경우,

conda config --set auto_activate_base false

PowerShll에서 (base) 를 나타나게 하고 싶은 경우,

conda config --set auto_activate_base true
728x90
반응형

+ Recent posts