Why I am suddenly seeing `Usage: source deactivate` whenever I run virtualenvwrapper commands?

后端 未结 3 360
旧时难觅i
旧时难觅i 2020-12-31 02:14

I never used to see this message before when using virtualenvwrapper, but now I\'m suddenly seeing this message whenever I run, say, mkvirtualenv

3条回答
  •  情话喂你
    2020-12-31 02:58

    Anaconda already knows where activate and the different environments are so virtualenvwrapper isn't needed.

    All virtualenvwrapper seems to provide on Mac is the workon shortcut to source activate, you can use an alias in your bash.rc file and uninstall virtualenvwrapper.

    Just add the alias line below where you add ~/anaconda/bin to your path like the example below.

    # added by Anaconda3 4.3.1 installer
    export PATH="$HOME/anaconda/bin:$PATH"
    
    # Add workon alias here!
    alias workon='source activate'
    

    Now when I run 'workon Django', it runs my Anaconda Django virtual env without reminding me that 'source deactivate' is the way to exit.

    If you didn't catch that, to exit the virtual env just run 'source deactivate'

提交回复
热议问题