Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

installing a package using menuinst package for windows can become complicated #923

Open
ReimarBauer opened this issue May 7, 2021 · 8 comments
Labels
type::feature-request New feature proposal

Comments

@ReimarBauer
Copy link

Our windows users reported

Executing transaction: / menuinst called from non-root env C:\Users\user\Miniconda3\envs\mssdev
WARNING menuinst_win32:<module>(157): menuinst called from non-root env C:\Users\user\Miniconda3\envs\mssdev
DEBUG menuinst_win32:__init__(198): Menu: name: 'Anaconda${PY_VER} ${PLATFORM}', prefix: 'C:\Users\user\Miniconda3\envs\mssdev', env_name: 'None', mode: 'user', used_mode: 'user'
DEBUG menuinst_win32:create(323): Shortcut cmd is C:\Users\user\Miniconda3\envs\mssdev\python.exe, args are ['C:\\Users\\user\\Miniconda3\\envs\\mssdev\\cwp.py', 'C:\\Users\\user\\Miniconda3\\envs\\mssdev', 'C:\\Users\\user\\Miniconda3\\envs\\mssdev\\Library\\bin\\bash.exe', '--login', '-i', '--']                                                - DEBUG menuinst_win32:__init__(198): Menu: name: 'Anaconda${PY_VER} ${PLATFORM}', prefix: 'C:\Users\user\Miniconda3\envs\mssdev', env_name: 'None', mode: 'user', used_mode: 'user'
DEBUG menuinst_win32:create(323): Shortcut cmd is C:\Users\user\Miniconda3\envs\mssdev\pythonw.exe, args are ['C:\\Users\\user\\Miniconda3\\envs\\mssdev\\cwp.py', 'C:\\Users\\user\\Miniconda3\\envs\\mssdev', 'C:\\Users\\user\\Miniconda3\\envs\\mssdev\\pythonw.exe', 'C:\\Users\\user\\Miniconda3\\envs\\mssdev\\Scripts\\mss-script.py']         done

This is only a warning. It gets more complicated when you want to install by mamba a local build of the MSS package.

(mssdev) C:\Users\user\workspace\MSS\localbuild>mamba install  \Users\user\Miniconda3\envs\mssdev\conda-bld\win-64\mss-alpha-py39_1000.tar.bz2

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

        mamba (0.12.2) supported by @QuantStack

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

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

Preparing transaction: done
Verifying transaction: done
Executing transaction: | menuinst called from non-root env C:\Users\user\Miniconda3\envs\mssdev
WARNING menuinst_win32:<module>(157): menuinst called from non-root env C:\Users\user\Miniconda3\envs\mssdev
/ DEBUG menuinst_win32:__init__(198): Menu: name: 'Anaconda${PY_VER} ${PLATFORM}', prefix: 'C:\Users\user\Miniconda3\envs\mssdev', env_name: 'None', mode: 'user', used_mode: 'user'
DEBUG menuinst_win32:create(323): Shortcut cmd is C:\Users\user\Miniconda3\envs\mssdev\pythonw.exe, args are ['C:\\Users\\user\\Miniconda3\\envs\\mssdev\\cwp.py', 'C:\\Users\\user\\Miniconda3\\envs\\mssdev', 'C:\\Users\\user\\Miniconda3\\envs\\mssdev\\pythonw.exe', 'C:\\Users\\user\\Miniconda3\\envs\\mssdev\\Scripts\\mss-script.py']
done

In environments usually noone needs an Admin account

conda_build_auf_guacamole

Our workaround if that happens is to use the "conda" command.

conda install  \Users\user\Miniconda3\envs\mssdev\conda-bld\win-64\mss-alpha-py39_1000.tar.bz2
Preparing transaction: done
Verifying transaction: done
Executing transaction: done
@ReimarBauer
Copy link
Author

ReimarBauer commented May 7, 2021

another example to trigger the windows admin window

mamba install spyder

there also conda triggers it. This is probably not only a "mamba/conda" problem.

@wolfv
Copy link
Member

wolfv commented Jun 3, 2021

@ReimarBauer do you have a system-wide conda installation?

I am working on adding menuinst support to micromamba right now. For a User-level shortcut, one usually does not need admin privileges, I believe.

@adriendelsalle adriendelsalle added the type::feature-request New feature proposal label Jun 4, 2021
@ReimarBauer
Copy link
Author

Some users reported that behaviour and I found it also in my testsetup. But I've not configured the windows OS. I've no idea if it happens on any windows system per default. Ignoring this window does not block the installation.

@melund
Copy link

melund commented Jun 13, 2021

Just out of curiosity. Is there a way to skip menuinst with mamba or micromamba?

conda create has a --no-shortcuts argument, but conda env create doesn't have that feature. However, menuinst is skipped in both cases if the environment is prefixed with an underscore. @wolfv Will micromamba behave the same?

@wolfv
Copy link
Member

wolfv commented Jun 14, 2021

Thanks Morten for letting me know of this feature. I didn't know about it, actually. We should take it into account in #975

@jaimergp
Copy link
Contributor

Almost every flag has an environment variable counterpart. For shortcuts, it should be CONDA_SHORTCUTS=false.

@mkdzhall
Copy link

I have Anaconda (installed in C:/) and I need to run mamba as ADMIN otherwise won't install packages.
Conda works fine without need of using ADMIN, anything else other than installation works fine without ADMIN for mamba.

Any clue on what can be happening here...

When running I get some odd messages as well:

warning libmamba Could not parse state file: Could not load cache state: [json.exception.type_error.302] type must be string, but is null
warning libmamba Could not remove state file "C:\Anaconda\pkgs\cache\1d10b142.state.json": The process cannot access the file because it is being used by another pr.

Any help is appreciated.
Let me know if you need any additional info.
I'm new to Mamba it was suggested by another Dev in my company, but he has no issue using miniconda, I prefer Anaconda due to some easy work I can do with the Navigator.

@ReimarBauer
Copy link
Author

Hi

when you want to use anaconda or miniconda and mamba use the libmambasolver, see https://www.anaconda.com/blog/a-faster-conda-for-a-growing-community

When you are based on conda-forge we strongly recommend to start from
Mambaforge (https://mamba.readthedocs.io/en/latest/installation.html) a community project of the conda-forge community.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type::feature-request New feature proposal
Projects
None yet
Development

No branches or pull requests

6 participants