Я получил синтаксическую ошибку при активации среды на Conda - PullRequest
0 голосов
/ 10 июля 2020

Вот полный код, который я ввел:

ввод:

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 голосов
/ 12 июля 2020

Вместо источника активируйте my_shell типа conda активируйте my_shell.

...