mamba icon indicating copy to clipboard operation
mamba copied to clipboard

mamba env create doesn't respect pip constraints file

Open mieczyslaw opened this issue 1 year ago • 5 comments

Troubleshooting docs

  • [X] My problem is not solved in the Troubleshooting docs

How did you install Mamba?

Mambaforge

Search tried in issue tracker

pip constraints

Latest version of Mamba

  • [X] My problem is not solved with the latest version

Tried in Conda?

I have this problem with Conda as well, without using Mamba

Describe your issue

See the attached dummy package: mydummyproject_mamba.tar.gz

When I run mamba env create --prefix .venv -f environment.yml, it installs numpy 1.26.0 (the newest one) - it does not respect that in constraints file I ask for numpy 1.25.0. If I then activate the env and uninstall numpy, then call pip install -e . --constraint constraint.txt, the version in constraints is installed. The correct version is also installed if pure virtualenv is used. The issue is both with mamba and conda. I believe the issue may have been introduced quite recently.

mamba info / micromamba info

mamba version : 1.4.9
     active environment : base
            shell level : 1
          conda version : 23.7.3
    conda-build version : 3.24.0
         python version : 3.10.10.final.0
       virtual packages : __archspec=1=x86_64
                          __osx=13.5.2=0
                          __unix=0=0
  conda av metadata url : None
           channel URLs : https://conda.anaconda.org/conda-forge/osx-64
                          https://conda.anaconda.org/conda-forge/noarch
               platform : osx-64
             user-agent : conda/23.7.3 requests/2.28.2 CPython/3.10.10 Darwin/22.6.0 OSX/13.5.2
                UID:GID : 503:20
             netrc file : None
           offline mode : False

Logs

No response

environment.yml

channels:
  - conda-forge
  - nodefaults
dependencies:
- python=3.11
- pip>=21.0
- pip:
  - -e . --constraint constraint.txt

~/.condarc

No response

mieczyslaw avatar Sep 29 '23 09:09 mieczyslaw