Anaconda使用conda activate激活環(huán)境出錯(cuò)(待完全解決)2018-06-09

問(wèn)題

今天使用激活python36環(huán)境時(shí)出錯(cuò)

conda activate python36

出錯(cuò)log

CommandNotFoundError: Your shell has not been properly configured to use 'conda activate'.

然后按照l(shuí)og提示也沒(méi)有完全解決

解決辦法

# 激活環(huán)境
source activate
# 退出環(huán)境
source deactivate

神奇的是此時(shí)使用

conda activate python36

就可以使用了

KaideMacBook-Pro:~ tangkaisky$ conda activate python36
(python36) KaideMacBook-Pro:~ tangkaisky$ python
Python 3.6.5 |Anaconda, Inc.| (default, Apr 26 2018, 08:42:37)
[GCC 4.2.1 Compatible Clang 4.0.1 (tags/RELEASE_401/final)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>>

參考

https://blog.csdn.net/H_O_W_E/article/details/77370456

完整錯(cuò)誤log

KaideMacBook-Pro:~ tangkaisky$ conda activate python36

CommandNotFoundError: Your shell has not been properly configured to use 'conda activate'.
If your shell is Bash or a Bourne variant, enable conda for the current user with

    $ echo ". /Users/tangkaisky/anaconda3/etc/profile.d/conda.sh" >> ~/.bash_profile

or, for all users, enable conda with

    $ sudo ln -s /Users/tangkaisky/anaconda3/etc/profile.d/conda.sh /etc/profile.d/conda.sh

The options above will permanently enable the 'conda' command, but they do NOT
put conda's base (root) environment on PATH.  To do so, run

    $ conda activate

in your terminal, or to put the base environment on PATH permanently, run

    $ echo "conda activate" >> ~/.bash_profile

Previous to conda 4.4, the recommended way to activate conda was to modify PATH in
your ~/.bash_profile file.  You should manually remove the line that looks like

    export PATH="/Users/tangkaisky/anaconda3/bin:$PATH"

^^^ The above line should NO LONGER be in your ~/.bash_profile file! ^^^
最后編輯于
?著作權(quán)歸作者所有,轉(zhuǎn)載或內(nèi)容合作請(qǐng)聯(lián)系作者
【社區(qū)內(nèi)容提示】社區(qū)部分內(nèi)容疑似由AI輔助生成,瀏覽時(shí)請(qǐng)結(jié)合常識(shí)與多方信息審慎甄別。
平臺(tái)聲明:文章內(nèi)容(如有圖片或視頻亦包括在內(nèi))由作者上傳并發(fā)布,文章內(nèi)容僅代表作者本人觀點(diǎn),簡(jiǎn)書系信息發(fā)布平臺(tái),僅提供信息存儲(chǔ)服務(wù)。

相關(guān)閱讀更多精彩內(nèi)容

  • Android 自定義View的各種姿勢(shì)1 Activity的顯示之ViewRootImpl詳解 Activity...
    passiontim閱讀 179,001評(píng)論 25 709
  • 在此特此聲明:一下所有鏈接均來(lái)自互聯(lián)網(wǎng),在此記錄下我的查閱學(xué)習(xí)歷程,感謝各位原創(chuàng)作者的無(wú)私奉獻(xiàn) ! 技術(shù)一點(diǎn)一點(diǎn)積...
    遠(yuǎn)航的移動(dòng)開發(fā)歷程閱讀 11,538評(píng)論 12 197
  • 文/楊三兒 好久不提筆,一來(lái)覺(jué)得自己最近真的很忙,年末一邊忙著寫總結(jié),一邊忙著年會(huì),還要顧慮到自己的業(yè)績(jī)。二來(lái)最近...
    楊三兒閱讀 326評(píng)論 0 1
  • 。。。。。。 但是,沒(méi)想到,我跟這位大碗的梁子,就這麼結(jié)下了。後來(lái)我們又見(jiàn)過(guò)三次,都是在培訓(xùn)項(xiàng)目中遇到。我總是試圖...
    MABEL梅閱讀 208評(píng)論 0 0
  • 對(duì)茶最初的認(rèn)識(shí)是小時(shí)候夏天家里泡的大葉茶,放入沸水中幾片葉子,湯色迅速變紅,待涼了喝,有淡淡的甜味,清熱解...
    勿演兒閱讀 308評(píng)論 0 0

友情鏈接更多精彩內(nèi)容