windows下修改PyCharm默認(rèn)terminal
PyCharm的terminal默認(rèn)使用的是powershell,但是conda環(huán)境是通過cmd運(yùn)行的,因此可以將PyCharm的默認(rèn)terminal修改成cmd。
在設(shè)置頁面中打開Settings-->Tools-->Terminal
,將Shell path修改成cmd即可
在Git Bash中使用conda
git操作默認(rèn)是在Git Bash中使用,因此想在Git Bash中同時(shí)使用conda,這樣默認(rèn)terminal改成Git Bash就能同時(shí)使用git和conda了
參考 https://discuss.codecademy.com/t/setting-up-conda-in-git-bash/534473
找到conda的安裝路徑,例如我是miniconda,安裝路徑為C:\ProgramData\Miniconda3
,在目錄下找到文件夾etc/profile.d
,其中應(yīng)該有文件conda.sh
在該路徑下右鍵打開Git Bash,Git Bash Here
,然后根據(jù)路徑中是否有空格,輸入(前者無空格,后者有空格):
echo ". ${PWD}/conda.sh" >> ~/.bashrc
或文章來源:http://www.zghlxwxcb.cn/news/detail-647843.html
echo ". '${PWD}'/conda.sh" >> ~/.bashrc
然后重新打開新的Git Bash就能在其中使用conda環(huán)境了文章來源地址http://www.zghlxwxcb.cn/news/detail-647843.html
到了這里,關(guān)于windows下修改PyCharm默認(rèn)terminal & 在Git Bash中使用conda的文章就介紹完了。如果您還想了解更多內(nèi)容,請(qǐng)?jiān)谟疑辖撬阉鱐OY模板網(wǎng)以前的文章或繼續(xù)瀏覽下面的相關(guān)文章,希望大家以后多多支持TOY模板網(wǎng)!