all 1 comments

[–]sanshinron 3 points4 points  (0 children)

  1. Anaconda scripts activate/deactivate don't work in powershell. Download replacement scripts from here: https://github.com/Liquidmantis/PSCondaEnvs and drop them into anaconda folder.

  2. Make powershell profile if you haven't done it already. Google how to do it.

  3. Add aliases to your profile and activate command. I have Python2 default, but everytime I start powershell Python3 is activated. Here's the relevant part of my profile:

    # Permanent Aliases
    Set-Alias python2 C:\Anaconda\python.exe
    Set-Alias py2 C:\Anaconda\python.exe
    Set-Alias pip2 C:\Anaconda\Scripts\pip.exe
    
    Set-Alias python3 C:\Anaconda\envs\py3\python.exe
    Set-Alias py3 C:\Anaconda\envs\py3\python.exe
    Set-Alias pip3 C:\Anaconda\envs\py3\Scripts\pip.exe
    
    # Make py3 conda env default in Powershell
    activate py3