How to solve the issue of the conflict of anaconda and virtualenv

前端 未结 1 1192
隐瞒了意图╮
隐瞒了意图╮ 2020-12-21 04:52

I was using virtualenv all the time and then I had also installed anaconda. Just now I tried to activate a virtual environment using the way of anaconda like source ac

相关标签:
1条回答
  • 2020-12-21 05:46

    It's not clear from your question what you expect "activate" to do. Is it activating a virtualenv, or is it activating a conda environment.

    When you install miniconda or anaconda, you are given an option to add it to PATH. If you do so, then it probably always comes before your virtualenv activate script. You can rename one or the other, or create an alias to the virtualenv one that calls it with an absolute path to the activate script. You can also move Anaconda so that it's appended rather than prepended, but then the virtualenv activate will always be used rather than the conda one (barring absolute paths).

    To append conda's path, look in ~/.bashrc or ~/.bash_profile and change

    export PATH=<anaconda path>:$PATH
    

    to

    export PATH=$PATH:<anaconda path>
    
    0 讨论(0)
提交回复
热议问题