conda-forge / cyipopt-feedstock

A conda-smithy repository for cyipopt.
BSD 3-Clause "New" or "Revised" License
3 stars 5 forks source link

Conflicts between cyipopt and jax #44

Closed mdhaber closed 1 year ago

mdhaber commented 1 year ago

Solution to issue cannot be found in the documentation.

Issue

I am trying to install cyipopt and jax in a fresh conda environment on windows, and I get a conflict.

(cyipopt) C:\Users\matth\>conda install -c conda-forge cyipopt jax
Collecting package metadata (current_repodata.json): done
Solving environment: failed with initial frozen solve. Retrying with flexible solve.
Solving environment: failed with repodata from current_repodata.json, will retry with next repodata source.
Collecting package metadata (repodata.json): done
Solving environment: failed with initial frozen solve. Retrying with flexible solve.
Solving environment: -
Found conflicts! Looking for incompatible packages.
This can take several minutes.  Press CTRL-C to abort.\
failed

UnsatisfiableError: The following specifications were found to be incompatible with each other:

Output in format: Requested package -> Available versions

Package numpy conflicts for:
jax -> numpy[version='>=1.12|>=1.17|>=1.18|>=1.19|>=1.20']
jax -> ml_dtypes[version='>=0.0.3'] -> numpy[version='>=1.11.3,<2.0a0|>=1.14.6,<2.0a0|>=1.16,<1.23|>=1.16.5,<2.0a0|>=1.16.6,<2.0a0|>=1.17.5,<2.0a0|>=1.18.5,<2.0a0|>=1.19.5,<2.0a0|>=1.20.3,<1.26|>=1.20.3,<1.27|>=1.20.3,<2.0a0|>=1.21.6,<2.0a0|>=1.23.5,<2.0a0|>=1.21.6,<1.27|>=1.23.5,<1.27|>=1.23.4,<1.26|>=1.23.4,<2.0a0|>=1.21.6,<1.26|>=1.20.3,<1.25|>=1.21.6,<1.25|>=1.21.5,<2.0a0|>=1.21.6,<1.23|>=1.20.3,<1.23|>=1.21.4,<2.0a0|>=1.19.4,<2.0a0|>=1.19.2,<2.0a0|>=1.23,<1.27.0|>=1.19.5,<1.27.0|>=1.21,<1.27.0|>=1.19,<1.26.0|>=1.23,<1.26.0|>=1.21,<1.26.0|>=1.19,<1.25.0|>=1.21,<1.25.0|>=1.21,<1.23|>=1.21.2,<1.23.0|>=1.16.6,<1.23.0']

Package openssl conflicts for:
jax -> python[version='>=3.8'] -> openssl[version='>=1.1.1a,<1.1.2a|>=1.1.1d,<1.1.2a|>=1.1.1e,<1.1.2a|>=1.1.1f,<1.1.2a|>=1.1.1g,<1.1.2a|>=1.1.1h,<1.1.2a|>=1.1.1i,<1.1.2a|>=1.1.1j,<1.1.2a|>=1.1.1k,<1.1.2a|>=1.1.1l,<1.1.2a|>=1.1.1n,<1.1.2a|>=1.1.1o,<1.1.2a|>=1.1.1q,<1.1.2a|>=3.1.0,<4.0a0|>=3.0.5,<4.0a0|>=3.0.7,<4.0a0|>=1.1.1s,<1.1.2a|>=3.0.3,<4.0a0|>=3.0.2,<4.0a0|>=3.0.0,<4.0a0|>=1.1.1t,<1.1.2a|>=1.1.1c,<1.1.2a|>=1.1.1b,<1.1.2a']
cyipopt -> python[version='>=3.11,<3.12.0a0'] -> openssl[version='>=1.1.1a,<1.1.2a|>=1.1.1d,<1.1.2a|>=1.1.1e,<1.1.2a|>=1.1.1f,<1.1.2a|>=1.1.1g,<1.1.2a|>=1.1.1h,<1.1.2a|>=1.1.1i,<1.1.2a|>=1.1.1j,<1.1.2a|>=1.1.1k,<1.1.2a|>=1.1.1l,<1.1.2a|>=1.1.1n,<1.1.2a|>=1.1.1o,<1.1.2a|>=1.1.1q,<1.1.2a|>=3.1.0,<4.0a0|>=3.0.5,<4.0a0|>=1.1.1t,<1.1.2a|>=1.1.1s,<1.1.2a|>=3.0.7,<4.0a0|>=3.0.3,<4.0a0|>=3.0.2,<4.0a0|>=3.0.0,<4.0a0|>=1.1.1c,<1.1.2a|>=1.1.1b,<1.1.2a']

Package python conflicts for:
jax -> ml_dtypes[version='>=0.0.3'] -> python[version='2.7.*|3.5.*|3.6.*|>=2.7,<2.8.0a0|>=3.10,<3.11.0a0|>=3.11,<3.12.0a0|>=3.8,<3.9.0a0|>=3.9,<3.10.0a0|>=3.7,<3.8.0a0|>=3.5|>=3.6,<3.7.0a0|>=3.5,<3.6.0a0|>=3|3.4.*']
jax -> python[version='>=3.6|>=3.7|>=3.8']

Installed packages

# packages in environment at C:\Users\matth\anaconda3\envs\cyipopt:
#
# Name                    Version                   Build  Channel

Environment info

active environment : cyipopt
    active env location : C:\Users\matth\anaconda3\envs\cyipopt
            shell level : 1
       user config file : C:\Users\matth\.condarc
 populated config files : C:\Users\matth\.condarc
          conda version : 22.9.0
    conda-build version : 3.21.6
         python version : 3.9.7.final.0
       virtual packages : __win=0=0
                          __archspec=1=x86_64
       base environment : C:\Users\matth\anaconda3  (writable)
      conda av data dir : C:\Users\matth\anaconda3\etc\conda
  conda av metadata url : None
           channel URLs : 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\matth\anaconda3\pkgs
                          C:\Users\matth\.conda\pkgs
                          C:\Users\matth\AppData\Local\conda\conda\pkgs
       envs directories : C:\Users\matth\anaconda3\envs
                          C:\Users\matth\.conda\envs
                          C:\Users\matth\AppData\Local\conda\conda\envs
               platform : win-64
             user-agent : conda/22.9.0 requests/2.26.0 CPython/3.9.7 Windows/10 Windows/10.0.22621
          administrator : False
             netrc file : None
           offline mode : False
moorepants commented 1 year ago

There doesn't seem to be any issue on linux:

$ mamba create -n cyipopt-jax cyipopt jax

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

        mamba (1.4.0) supported by @QuantStack

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

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

Looking for: ['cyipopt', 'jax']

pydy/linux-64                                                 No change
pydy/noarch                                                   No change
moorepants/linux-64                                           No change
moorepants/noarch                                             No change
conda-forge/noarch                                  11.8MB @   4.3MB/s  3.2s
conda-forge/linux-64                                30.7MB @   5.1MB/s  6.8s
Transaction

  Prefix: /home/moorepants/miniconda/envs/cyipopt-jax

  Updating specs:

   - cyipopt
   - jax

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

  + _libgcc_mutex                0.1  conda_forge          conda-forge/linux-64     Cached
  + _openmp_mutex                4.5  2_gnu                conda-forge/linux-64     Cached
  + ampl-mp                    3.1.0  h2cc385e_1006        conda-forge/linux-64     Cached
  + brotlipy                   0.7.0  py311hd4cff14_1005   conda-forge/linux-64     Cached
  + bzip2                      1.0.8  h7f98852_4           conda-forge/linux-64     Cached
  + c-ares                    1.18.1  h7f98852_0           conda-forge/linux-64     Cached
  + ca-certificates        2022.12.7  ha878542_0           conda-forge/linux-64     Cached
  + certifi                2022.12.7  pyhd8ed1ab_0         conda-forge/noarch       Cached
  + cffi                      1.15.1  py311h409f033_3      conda-forge/linux-64     Cached
  + charset-normalizer         3.1.0  pyhd8ed1ab_0         conda-forge/noarch       Cached
  + cryptography              40.0.1  py311h9b4c7bb_0      conda-forge/linux-64     Cached
  + cyipopt                    1.2.0  py311hd28d000_1      conda-forge/linux-64     Cached
  + idna                         3.4  pyhd8ed1ab_0         conda-forge/noarch       Cached
  + ipopt                    3.14.11  hf9e1ecf_0           conda-forge/linux-64     Cached
  + jax                        0.4.8  pyhd8ed1ab_0         conda-forge/noarch       Cached
  + jaxlib                     0.4.7  cpu_py311h9f877bd_0  conda-forge/linux-64     Cached
  + ld_impl_linux-64            2.40  h41732ed_0           conda-forge/linux-64     Cached
  + libabseil             20230125.0  cxx17_hcb278e6_1     conda-forge/linux-64     Cached
  + libblas                    3.9.0  16_linux64_openblas  conda-forge/linux-64     Cached
  + libcblas                   3.9.0  16_linux64_openblas  conda-forge/linux-64     Cached
  + libedit             3.1.20191231  he28a2e2_2           conda-forge/linux-64     Cached
  + libexpat                   2.5.0  hcb278e6_1           conda-forge/linux-64     Cached
  + libffi                     3.4.2  h7f98852_5           conda-forge/linux-64     Cached
  + libgcc-ng                 12.2.0  h65d4601_19          conda-forge/linux-64     Cached
  + libgfortran-ng            12.2.0  h69a702a_19          conda-forge/linux-64     Cached
  + libgfortran5              12.2.0  h337968e_19          conda-forge/linux-64     Cached
  + libgomp                   12.2.0  h65d4601_19          conda-forge/linux-64     Cached
  + libgrpc                   1.52.1  hcf146ea_1           conda-forge/linux-64     Cached
  + libiconv                    1.17  h166bdaf_0           conda-forge/linux-64     Cached
  + liblapack                  3.9.0  16_linux64_openblas  conda-forge/linux-64     Cached
  + libnsl                     2.0.0  h7f98852_0           conda-forge/linux-64     Cached
  + libopenblas               0.3.21  pthreads_h78a6416_3  conda-forge/linux-64     Cached
  + libprotobuf              3.21.12  h3eb15da_0           conda-forge/linux-64     Cached
  + libsqlite                 3.40.0  h753d276_0           conda-forge/linux-64     Cached
  + libstdcxx-ng              12.2.0  h46fd767_19          conda-forge/linux-64     Cached
  + libuuid                   2.38.1  h0b41bf4_0           conda-forge/linux-64     Cached
  + libzlib                   1.2.13  h166bdaf_4           conda-forge/linux-64     Cached
  + metis                      5.1.0  h58526e2_1006        conda-forge/linux-64     Cached
  + ml_dtypes                  0.0.4  py311h2872171_0      conda-forge/linux-64     Cached
  + mumps-include              5.2.1  ha770c72_11          conda-forge/linux-64     Cached
  + mumps-seq                  5.2.1  h2104b81_11          conda-forge/linux-64     Cached
  + ncurses                      6.3  h27087fc_1           conda-forge/linux-64     Cached
  + numpy                     1.24.2  py311h8e6699e_0      conda-forge/linux-64     Cached
  + openssl                    3.1.0  h0b41bf4_0           conda-forge/linux-64     Cached
  + opt_einsum                 3.3.0  pyhd8ed1ab_1         conda-forge/noarch       Cached
  + packaging                   23.0  pyhd8ed1ab_0         conda-forge/noarch       Cached
  + pip                       23.0.1  pyhd8ed1ab_0         conda-forge/noarch       Cached
  + platformdirs               3.2.0  pyhd8ed1ab_0         conda-forge/noarch       Cached
  + pooch                      1.7.0  pyha770c72_3         conda-forge/noarch       Cached
  + pycparser                   2.21  pyhd8ed1ab_0         conda-forge/noarch       Cached
  + pyopenssl                 23.1.1  pyhd8ed1ab_0         conda-forge/noarch       Cached
  + pysocks                    1.7.1  pyha2e5f31_6         conda-forge/noarch       Cached
  + python                    3.11.2  h2755cc3_0_cpython   conda-forge/linux-64     Cached
  + python_abi                  3.11  3_cp311              conda-forge/linux-64     Cached
  + re2                   2023.02.02  hcb278e6_0           conda-forge/linux-64     Cached
  + readline                     8.2  h8228510_1           conda-forge/linux-64     Cached
  + requests                  2.28.2  pyhd8ed1ab_1         conda-forge/noarch       Cached
  + scipy                     1.10.1  py311h8e6699e_0      conda-forge/linux-64     Cached
  + scotch                     6.0.9  hb2e6521_2           conda-forge/linux-64     Cached
  + setuptools                67.6.1  pyhd8ed1ab_0         conda-forge/noarch       Cached
  + tk                        8.6.12  h27826a3_0           conda-forge/linux-64     Cached
  + typing-extensions          4.5.0  hd8ed1ab_0           conda-forge/noarch       Cached
  + typing_extensions          4.5.0  pyha770c72_0         conda-forge/noarch       Cached
  + tzdata                     2023c  h71feb2d_0           conda-forge/noarch       Cached
  + unixodbc                  2.3.10  h583eb01_0           conda-forge/linux-64     Cached
  + urllib3                  1.26.15  pyhd8ed1ab_0         conda-forge/noarch       Cached
  + wheel                     0.40.0  pyhd8ed1ab_0         conda-forge/noarch       Cached
  + xz                         5.2.6  h166bdaf_0           conda-forge/linux-64     Cached
  + zlib                      1.2.13  h166bdaf_4           conda-forge/linux-64     Cached

  Summary:

  Install: 69 packages

  Total download: 0 B

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

Downloading and Extracting Packages

Preparing transaction: done
Verifying transaction: done
Executing transaction: done

To activate this environment, use

     $ mamba activate cyipopt-jax

To deactivate an active environment, use

     $ mamba deactivate
moorepants commented 1 year ago

I tried it with conda (not mamba) on linux and it also worked.

moorepants commented 1 year ago

I'm failing to see what we would have in our dependency pins that would cause an issue:

https://github.com/conda-forge/cyipopt-feedstock/blob/main/recipe/meta.yaml#L17

Maybe this is something that Jax has changed in their windows builds. Maybe this is jax's feedstock's issue, not an issue here?

I guess that they could have changed something that makes it incompatible with our 2 month old builds and if we make a new build, then it would possibly work, but that would just cover the the problem and we'd be in a cat and mouse game.

mdhaber commented 1 year ago

I just tried again, and strangly, conda failed.

Collecting package metadata (current_repodata.json): done
Solving environment: failed with initial frozen solve. Retrying with flexible solve.
Solving environment: failed with repodata from current_repodata.json, will retry with next repodata source.
Collecting package metadata (repodata.json): done
Solving environment: failed with initial frozen solve. Retrying with flexible solve.
Solving environment: |
Found conflicts! Looking for incompatible packages.
This can take several minutes.  Press CTRL-C to abort.
Examining python=3.11:  25%|███████████████▎                                             | 1/4 [00:11<00:33, 11.16s/it]|
Examining @/win-64::__win==0=0:  50%|██████████████████████████                          | 2/4 [00:11<00:11,  5.58s/it]/
failed

UnsatisfiableError: The following specifications were found to be incompatible with each other:

Output in format: Requested package -> Available versions

I'll try with mamba, and I'll try on other machines.

mdhaber commented 1 year ago

Turns out jax has trouble on Windows by itself; it's not a cyipopt problem.