我在Conda上激活环境时遇到语法错误

时间:2020-07-10 12:27:00

标签: python anaconda conda junit-jupiter

这是我输入的完整代码:

输入:

conda create --name my_app27 python=2.7 flask sqlalchemy --yes

source activate my_app27

输出:

File "<ipython-input-2-9a6e240537c9>", line 1
    source activate my_app27
                  ^
SyntaxError: invalid syntax

然后我尝试了另一个

输入:

conda activate my_app27

输出:

    CommandNotFoundError: Your shell has not been properly configured to use 'conda activate'.
    To initialize your shell, run
    
        $ conda init <SHELL_NAME>
    
    Currently supported shells are:
      - bash
      - fish
      - tcsh
      - xonsh
      - zsh
      - powershell
    
    See 'conda init --help' for more information and options.
    
    IMPORTANT: You may need to close and restart your shell after running 'conda init'.


Note: you may need to restart the kernel to use updated packages.

那是为什么?如果通过激活环境而收到语法错误该怎么办?

1 个答案:

答案 0 :(得分:-2)

代替源激活my_shell类型 康达激活my_shell。

相关问题