Skip to content

I can't activate my environment in the collab #10

Open
@linda-farias

Description

@linda-farias

I am in a class work in which I must develop a program in a virtual environment. My choice was '' Google Colab '', but when trying to activate my environment it always gives an error.

! conda create --name metawraptest-env python=3.7.10

WARNING: A conda environment already exists at '/usr/local/envs/metawraptest-env'
Remove existing environment (y/[n])? y

Collecting package metadata (current_repodata.json): done
Solving environment: done

## Package Plan ##

  environment location: /usr/local/envs/metawraptest-env

  added / updated specs:
    - python=3.7.10


The following NEW packages will be INSTALLED:

  _libgcc_mutex      pkgs/main/linux-64::_libgcc_mutex-0.1-main
  ca-certificates    pkgs/main/linux-64::ca-certificates-2021.4.13-h06a4308_1
  certifi            pkgs/main/linux-64::certifi-2020.12.5-py37h06a4308_0
  ld_impl_linux-64   pkgs/main/linux-64::ld_impl_linux-64-2.33.1-h53a641e_7
  libffi             pkgs/main/linux-64::libffi-3.3-he6710b0_2
  libgcc-ng          pkgs/main/linux-64::libgcc-ng-9.1.0-hdf63c60_0
  libstdcxx-ng       pkgs/main/linux-64::libstdcxx-ng-9.1.0-hdf63c60_0
  ncurses            pkgs/main/linux-64::ncurses-6.2-he6710b0_1
  openssl            pkgs/main/linux-64::openssl-1.1.1k-h27cfd23_0
  pip                pkgs/main/linux-64::pip-21.0.1-py37h06a4308_0
  python             pkgs/main/linux-64::python-3.7.10-hdb3f193_0
  readline           pkgs/main/linux-64::readline-8.1-h27cfd23_0
  setuptools         pkgs/main/linux-64::setuptools-52.0.0-py37h06a4308_0
  sqlite             pkgs/main/linux-64::sqlite-3.35.4-hdfb4753_0
  tk                 pkgs/main/linux-64::tk-8.6.10-hbc83047_0
  wheel              pkgs/main/noarch::wheel-0.36.2-pyhd3eb1b0_0
  xz                 pkgs/main/linux-64::xz-5.2.5-h7b6447c_0
  zlib               pkgs/main/linux-64::zlib-1.2.11-h7b6447c_3


Proceed ([y]/n)? y

Preparing transaction: done
Verifying transaction: done
Executing transaction: done
#
# To activate this environment, use
#
#     $ conda activate metawraptest-env
#
# To deactivate an active environment, use
#
#     $ conda deactivate

But, when activating my environment, this appears:
$ conda activate metawraptest-env

File "<ipython-input-45-dbbb19337d51>", line 1
    $ conda activate metawraptest-env
    ^
SyntaxError: invalid syntax

Or this from here:
! conda activate metawraptest-env

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'.

I tried to use '' Shell '', but it also gave error when using
$ conda init <SHELL_NAME>

 File "<ipython-input-46-248a41531067>", line 1
    $ conda init <SHELL_NAME>
    ^
SyntaxError: invalid syntax

The environment was created, but I can't activate it...
! conda env list

# conda environments:
#
base                  *  /usr/local
metawraptest-env         /usr/local/envs/metawraptest-env

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions