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

~/micromamba/envs/myenv/bin/python3.1 symlink generated for Python 3.11 #3317

Closed
3 tasks done
basnijholt opened this issue Jun 10, 2024 · 6 comments
Closed
3 tasks done
Labels
where::macOS macOS-specific issues

Comments

@basnijholt
Copy link

basnijholt commented Jun 10, 2024

Troubleshooting docs

  • My problem is not solved in the Troubleshooting docs

Anaconda default channels

  • I do NOT use the Anaconda default channels (pkgs/* etc.)

How did you install Mamba?

Mambaforge or latest Miniforge

Search tried in issue tracker

alias, symlink

Latest version of Mamba

  • My problem is not solved with the latest version

Tried in Conda?

I didn't try

Describe your issue

When creating a new env:

❯ micromamba create -n test python=3.12

❯ l ~/micromamba/envs/test/bin/python3.1
lrwxr-xr-x@ 1 bas.nijholt  staff    10B Jun 10 11:19 /Users/bas.nijholt/micromamba/envs/test/bin/python3.1 -> python3.12

❯ micromamba --version
1.5.8

This results in VS Code being confused, e.g., see:

VS Code uses this alias to figure out which Python version is being used.

image

This problem occurs on at least MacOS and Ubuntu.

mamba info / micromamba info

❯ micromamba info

       libmamba version : 1.5.8
     micromamba version : 1.5.8
           curl version : libcurl/8.6.0 SecureTransport (OpenSSL/3.2.1) zlib/1.2.13 zstd/1.5.5 libssh2/1.11.0 nghttp2/1.58.0
     libarchive version : libarchive 3.7.2 zlib/1.2.13 bz2lib/1.0.8 libzstd/1.5.5
       envs directories : /Users/bas.nijholt/micromamba/envs
          package cache : /Users/bas.nijholt/micromamba/pkgs
                          /Users/bas.nijholt/.mamba/pkgs
            environment : None (not found)
           env location : -
      user config files : /Users/bas.nijholt/.mambarc
 populated config files : /Users/bas.nijholt/.mambarc
                          /Users/bas.nijholt/.condarc
       virtual packages : __unix=0=0
                          __osx=14.5=0
                          __archspec=1=arm64
               channels : https://conda.anaconda.org/conda-forge/osx-arm64
                          https://conda.anaconda.org/conda-forge/noarch
       base environment : /Users/bas.nijholt/micromamba
               platform : osx-arm64

Related:

@jjerphan
Copy link
Member

jjerphan commented Dec 6, 2024

We cannot reproduce this issue with 2.0.

I would recommend using the $CONDA_PREFIX/bin/python symlink which points to the version of python which is installed and used in the environment.

Feel free to reopen an issue with a reproduce if you still have this issue with 2.0.

Note that 1.x is note being developed anymore, but to address security fixes.

@jjerphan jjerphan closed this as not planned Won't fix, can't repro, duplicate, stale Dec 6, 2024
@basnijholt
Copy link
Author

Seems to still be an issue with 2.0.8:

at 10:50:49 ❯ micromamba create -n test python=3.12
conda-forge/noarch                                          Using cache
conda-forge/osx-arm64                                       Using cache


Transaction

  Prefix: /Users/bas.nijholt/micromamba/envs/test

  Updating specs:

   - python=3.12


  Package              Version  Build               Channel           Size
────────────────────────────────────────────────────────────────────────────
  Install:
────────────────────────────────────────────────────────────────────────────

  + bzip2                1.0.8  h99b78c6_7          conda-forge     Cached
  + ca-certificates  2024.8.30  hf0a4a13_0          conda-forge     Cached
  + libexpat             2.6.4  h286801f_0          conda-forge     Cached
  + libffi               3.4.2  h3422bc3_5          conda-forge     Cached
  + liblzma              5.6.3  h39f12f2_1          conda-forge     Cached
  + libsqlite           3.47.0  hbaaea75_1          conda-forge     Cached
  + libzlib              1.3.1  h8359307_2          conda-forge     Cached
  + ncurses                6.5  h7bae524_1          conda-forge     Cached
  + openssl              3.4.0  h39f12f2_0          conda-forge     Cached
  + pip                 24.3.1  pyh8b19718_0        conda-forge     Cached
  + python              3.12.8  hc22306f_1_cpython  conda-forge     Cached
  + readline               8.2  h92ec313_1          conda-forge     Cached
  + setuptools          75.6.0  pyhff2d567_1        conda-forge     Cached
  + tk                  8.6.13  h5083fa2_1          conda-forge     Cached
  + tzdata               2024b  hc8b5060_0          conda-forge     Cached
  + wheel               0.45.1  pyhd8ed1ab_1        conda-forge     Cached

  Summary:

  Install: 16 packages

  Total download: 0 B

────────────────────────────────────────────────────────────────────────────



Transaction starting
Linking libexpat-2.6.4-h286801f_0
Linking ncurses-6.5-h7bae524_1
Linking bzip2-1.0.8-h99b78c6_7
Linking liblzma-5.6.3-h39f12f2_1
Linking libzlib-1.3.1-h8359307_2
Linking libffi-3.4.2-h3422bc3_5
Linking ca-certificates-2024.8.30-hf0a4a13_0
Linking readline-8.2-h92ec313_1
Linking tk-8.6.13-h5083fa2_1
Linking libsqlite-3.47.0-hbaaea75_1
Linking openssl-3.4.0-h39f12f2_0
Linking tzdata-2024b-hc8b5060_0
Linking python-3.12.8-hc22306f_1_cpython
Linking wheel-0.45.1-pyhd8ed1ab_1
Linking setuptools-75.6.0-pyhff2d567_1
Linking pip-24.3.1-pyh8b19718_0

Transaction finished

To activate this environment, use:

    micromamba activate test

Or to execute a single command in this environment, use:

    micromamba run -n test mycommand


~ took 8s
at 10:51:00 ❯ l ~/micromamba/envs/test/bin/python3.1
lrwxr-xr-x@ 1 bas.nijholt  staff    10B Dec  6 10:50 /Users/bas.nijholt/micromamba/envs/test/bin/python3.1 -> python3.12

~
at 10:51:03 ❯ micromamba --version
2.0.4

This is what is in my .bashrc:

export MAMBA_EXE="$HOME/.local/bin/micromamba"
export MAMBA_ROOT_PREFIX="$HOME/micromamba"
eval "$($MAMBA_EXE shell hook --shell zsh)"
micromamba activate

@jjerphan
Copy link
Member

jjerphan commented Dec 6, 2024

Reopening it as a macOS-specific error.

@jjerphan jjerphan reopened this Dec 6, 2024
@jjerphan jjerphan added the where::macOS macOS-specific issues label Dec 6, 2024
@basnijholt
Copy link
Author

basnijholt commented Dec 6, 2024

It is not a problem for me at the moment, the main issue I experienced was that VS Code's Python extension started to detect the symlink and reported that Python 3.1 is not supported. Since then it seems like they have created workarounds.

e.g., (microsoft/vscode-python#22877 (comment)):

xref:

@jjerphan
Copy link
Member

I can reproduce the issue on a new miniforge installation on macOS.

@jjerphan
Copy link
Member

jjerphan commented Dec 10, 2024

This is not a problem with micromamba, but this is a problem with the symlink which is embedded in packages, for instance in python-3.12.8-hc22306f_1_cpython (namely python-3.12.8-hc22306f_1_cpython/pkg-python-3.12.8-hc22306f_1_cpython/bin/python3.1).

I would report this issue on conda-forge/python-feedstock, or continue the discussions on conda-forge/python-feedstock#611.

@jjerphan jjerphan closed this as not planned Won't fix, can't repro, duplicate, stale Dec 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
where::macOS macOS-specific issues
Projects
None yet
Development

No branches or pull requests

2 participants