鱼壳中的conda无法运行源激活 [英] Cannot run source activate with conda in Fish-shell
问题描述
我遵循 conda_PR_545 ,此处下载conda.fish,然后将其压缩到anaconda3/bin/./p>
在〜/.config/fish/config.fish的末尾添加"source/home/phejimlin/anaconda3/bin/conda.fish".
conda activate spark_env
Traceback (most recent call last):
File "/home/phejimlin/anaconda3/bin/conda", line 6, in
sys.exit(conda.cli.main())
File "/home/phejimlin/anaconda3/lib/python3.6/site-packages/conda/cli/main.py", line 161, in main
raise CommandNotFoundError(argv1, message)
TypeError: init() takes 2 positional arguments but 3 were given
或
activate spark_env
Error: activate must be sourced. Run 'source activate envname'
instead of 'activate envname'.
我想念什么吗?
从fish 2.6.0 conda 4.3.27开始:以下步骤可能会更改为conda_PR_545, conda issues 4221 and still not working on Ubuntu.
After downloading conda.fish from here, and mv it to anaconda3/bin/.
Add "source /home/phejimlin/anaconda3/bin/conda.fish" at the end of ~/.config/fish/config.fish.
conda activate spark_env
Traceback (most recent call last):
File "/home/phejimlin/anaconda3/bin/conda", line 6, in
sys.exit(conda.cli.main())
File "/home/phejimlin/anaconda3/lib/python3.6/site-packages/conda/cli/main.py", line 161, in main
raise CommandNotFoundError(argv1, message)
TypeError: init() takes 2 positional arguments but 3 were given
or
activate spark_env
Error: activate must be sourced. Run 'source activate envname'
instead of 'activate envname'.
Do I miss something?
As of fish 2.6.0 conda 4.3.27: the following steps may change as issue is addressed
update config
Take note of your conda
's location
conda info --root
/Users/mstreeter/anaconda # this is my <PATH_TO_ROOT>
Add line to ~/.config/fish/config.fish
source <PATH_TO_ROOT>/etc/fish/conf.d/conda.fish
update convention
Typically you'd run the following from bash
source activate <environment>
source deactivate <environment>
Now you must run the following from fish
conda activate <environment>
conda deactivate <environment>
issues
so after doing this I'm not able to set fish
as my default shell and have it still work properly with conda
. Currently, I must first enter my default shell, and enter fish
and the shell works as expected. I'll update this after I find out how to get it working completely without the need to explicitly choose fish
each time I log into my terminal
这篇关于鱼壳中的conda无法运行源激活的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!