conda-forge / miniforge

A conda-forge distribution.
https://conda-forge.org/miniforge
Other
6k stars 317 forks source link

Powershell issue with environment #432

Closed funnym0nk3y closed 1 year ago

funnym0nk3y commented 1 year ago

Solution to issue cannot be found in the documentation.

Issue

I just installed mambaforge and ran mamba init from the Miniforge prompt. There I can switch envs via activate and the current env is shown infront of the current location. However when running Powershell I can't change the env via mamba activate env. There is no error shown but mamba info confirms that the env was not changed and it isn't just a bug with the env display. Instead I need to run conda activate in powershell.

EDIT

It seems that the mamba activate command is passed successfully to conda as

> mamba activate -h

ActivateHelp: usage: conda activate [-h] [--[no-]stack] [env_name_or_prefix]

Activate a conda environment.

Options:

positional arguments:
  env_name_or_prefix    The environment name or prefix to activate. If the
                        prefix is a relative path, it must start with './'
                        (or '.\' on Windows).

optional arguments:
  -h, --help            Show this help message and exit.
  --stack               Stack the environment being activated on top of the
                        previous active environment, rather replacing the
                        current active environment with a new one. Currently,
                        only the PATH environment variable is stacked. This
                        may be enabled implicitly by the 'auto_stack'
                        configuration variable.
  --no-stack            Do not stack the environment. Overrides 'auto_stack'
                        setting.

Installed packages

# packages in environment at C:\Users\Michael\mambaforge:
#
# Name                    Version                   Build  Channel
brotlipy                  0.7.0           py310h8d17308_1005    conda-forge
bzip2                     1.0.8                h8ffe710_4    conda-forge
ca-certificates           2022.12.7            h5b45459_0    conda-forge
certifi                   2022.12.7          pyhd8ed1ab_0    conda-forge
cffi                      1.15.1          py310h628cb3f_3    conda-forge
charset-normalizer        2.1.1              pyhd8ed1ab_0    conda-forge
colorama                  0.4.6              pyhd8ed1ab_0    conda-forge
conda                     22.11.1         py310h5588dad_1    conda-forge
conda-package-handling    2.0.2              pyh38be061_0    conda-forge
conda-package-streaming   0.7.0              pyhd8ed1ab_1    conda-forge
cryptography              39.0.1          py310h6e82f81_0    conda-forge
fmt                       9.1.0                h181d51b_0    conda-forge
idna                      3.4                pyhd8ed1ab_0    conda-forge
krb5                      1.20.1               heb0366b_0    conda-forge
libarchive                3.6.2                h27c7867_0    conda-forge
libcurl                   7.87.0               h68f0423_0    conda-forge
libffi                    3.4.2                h8ffe710_5    conda-forge
libiconv                  1.17                 h8ffe710_0    conda-forge
libmamba                  1.1.0                h8a7d157_3    conda-forge
libmambapy                1.1.0           py310h3fe4c2e_3    conda-forge
libsolv                   0.7.23               h12be248_0    conda-forge
libsqlite                 3.40.0               hcfcfb64_0    conda-forge
libssh2                   1.10.0               h9a1e1f7_3    conda-forge
libxml2                   2.10.3               hc3477c8_0    conda-forge
libzlib                   1.2.13               hcfcfb64_4    conda-forge
lz4-c                     1.9.4                hcfcfb64_0    conda-forge
lzo                       2.10              he774522_1000    conda-forge
mamba                     1.1.0           py310hd9d798f_3    conda-forge
menuinst                  1.4.19          py310h5588dad_1    conda-forge
miniforge_console_shortcut 1.0                  h57928b3_0    conda-forge
openssl                   3.0.8                hcfcfb64_0    conda-forge
pip                       23.0               pyhd8ed1ab_0    conda-forge
pluggy                    1.0.0              pyhd8ed1ab_5    conda-forge
pybind11-abi              4                    hd8ed1ab_3    conda-forge
pycosat                   0.6.4           py310h8d17308_1    conda-forge
pycparser                 2.21               pyhd8ed1ab_0    conda-forge
pyopenssl                 23.0.0             pyhd8ed1ab_0    conda-forge
pysocks                   1.7.1              pyh0701188_6    conda-forge
python                    3.10.9          h4de0772_0_cpython    conda-forge
python_abi                3.10                    3_cp310    conda-forge
reproc                    14.2.4               hcfcfb64_0    conda-forge
reproc-cpp                14.2.4               h63175ca_0    conda-forge
requests                  2.28.2             pyhd8ed1ab_0    conda-forge
ruamel.yaml               0.17.21         py310h8d17308_2    conda-forge
ruamel.yaml.clib          0.2.7           py310h8d17308_1    conda-forge
setuptools                65.6.3             pyhd8ed1ab_0    conda-forge
tk                        8.6.12               h8ffe710_0    conda-forge
toolz                     0.12.0             pyhd8ed1ab_0    conda-forge
tqdm                      4.64.1             pyhd8ed1ab_0    conda-forge
tzdata                    2022g                h191b570_0    conda-forge
ucrt                      10.0.22621.0         h57928b3_0    conda-forge
urllib3                   1.26.14            pyhd8ed1ab_0    conda-forge
vc                        14.3                hb6edc58_10    conda-forge
vs2015_runtime            14.34.31931         h4c5c07a_10    conda-forge
wheel                     0.38.4             pyhd8ed1ab_0    conda-forge
win_inet_pton             1.1.0              pyhd8ed1ab_6    conda-forge
xz                        5.2.6                h8d14728_0    conda-forge
yaml-cpp                  0.7.0                h63175ca_2    conda-forge
zstandard                 0.19.0          py310h0009e47_1    conda-forge
zstd                      1.5.2                h12be248_6    conda-forge

Environment info

__    __    __    __
                 /  \  /  \  /  \  /  \
                /    \/    \/    \/    \
███████████████/  /██/  /██/  /██/  /████████████████████████
              /  / \   / \   / \   / \  \____
             /  /   \_/   \_/   \_/   \    o \__,
            / _/                       \_____/  `
            |/
        ███╗   ███╗ █████╗ ███╗   ███╗██████╗  █████╗
        ████╗ ████║██╔══██╗████╗ ████║██╔══██╗██╔══██╗
        ██╔████╔██║███████║██╔████╔██║██████╔╝███████║
        ██║╚██╔╝██║██╔══██║██║╚██╔╝██║██╔══██╗██╔══██║
        ██║ ╚═╝ ██║██║  ██║██║ ╚═╝ ██║██████╔╝██║  ██║
        ╚═╝     ╚═╝╚═╝  ╚═╝╚═╝     ╚═╝╚═════╝ ╚═╝  ╚═╝

        mamba (1.1.0) supported by @QuantStack

        GitHub:  https://github.com/mamba-org/mamba
        Twitter: https://twitter.com/QuantStack

█████████████████████████████████████████████████████████████

     active environment : base
    active env location : C:\Users\funnym0nk3y\mambaforge
            shell level : 3
       user config file : C:\Users\funnym0nk3y\.condarc
 populated config files : C:\Users\funnym0nk3y\mambaforge\.condarc
                          C:\Users\funnym0nk3y\.condarc
          conda version : 22.11.1
    conda-build version : not installed
         python version : 3.10.9.final.0
       virtual packages : __archspec=1=x86_64
                          __win=0=0
       base environment : C:\Users\funnym0nk3y\mambaforge  (writable)
      conda av data dir : C:\Users\funnym0nk3y\mambaforge\etc\conda
  conda av metadata url : None
           channel URLs : https://conda.anaconda.org/conda-forge/win-64
                          https://conda.anaconda.org/conda-forge/noarch
                          https://repo.anaconda.com/pkgs/main/win-64
                          https://repo.anaconda.com/pkgs/main/noarch
                          https://repo.anaconda.com/pkgs/r/win-64
                          https://repo.anaconda.com/pkgs/r/noarch
                          https://repo.anaconda.com/pkgs/msys2/win-64
                          https://repo.anaconda.com/pkgs/msys2/noarch
          package cache : C:\Users\funnym0nk3y\mambaforge\pkgs
                          C:\Users\funnym0nk3y\.conda\pkgs
                          C:\Users\funnym0nk3y\AppData\Local\conda\conda\pkgs
       envs directories : C:\Users\funnym0nk3y\mambaforge\envs
                          C:\Users\funnym0nk3y\.conda\envs
                          C:\Users\funnym0nk3y\AppData\Local\conda\conda\envs
               platform : win-64
             user-agent : conda/22.11.1 requests/2.28.2 CPython/3.10.9 Windows/10 Windows/10.0.19044
          administrator : False
             netrc file : None
           offline mode : False
funnym0nk3y commented 1 year ago

This is an issue with mamba directly an not with mambaforge. See mamba-org/mamba#1717