[英]how to activate virtualenv in vs code editor when i type source env/bin/activate it does not activate
[英]Why is VS Code calling both source miniconda3/bin/activate and conda activate in fish shell?
當我在VS Code中打開具有自動環境激活功能的終端時,會發生以下情況:
Welcome to fish, the friendly interactive shell
luka@Lukas-MBP ~/D/e/p/collatz-conjecture> source /Users/luka/miniconda3/bin/activate (base)
~/miniconda3/bin/activate (line 5): 'return' outside of function definition
\. "$_CONDA_ROOT/etc/profile.d/conda.sh" || return $?
^
from sourcing file ~/miniconda3/bin/activate
called on standard input
source: Error while reading file '/Users/luka/miniconda3/bin/activate'
luka@Lukas-MBP ~/D/e/p/collatz-conjecture> conda activate base (base)
如何防止VS Code調用兩個命令並且僅使用conda activate base
,同時仍使用自動環境激活功能。
我假設您正在使用的conda版本早於4.6,但我認為該版本沒有任何支持。 更新到4.6或更高版本,並使用conda init
設置您的Shell配置文件,這應該可以解決問題。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.