1

这是我输入的完整代码:

输入:

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.

这是为什么??激活环境出现语法错误怎么办?

4

1 回答 1

-3

而不是 source activate my_shell 类型 conda activate my_shell。

于 2020-07-11T22:03:23.487 回答