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

Ensure that the mamba/conda version being used is not too old #577

Open
2 tasks done
r-molins-mrp opened this issue Jan 4, 2024 · 6 comments
Open
2 tasks done

Ensure that the mamba/conda version being used is not too old #577

r-molins-mrp opened this issue Jan 4, 2024 · 6 comments

Comments

@r-molins-mrp
Copy link

r-molins-mrp commented Jan 4, 2024

Previous title: conda-lock -f environment.yml returns JSONDecodeError and fails

Checklist

  • I added a descriptive title
  • I searched open reports and couldn't find a duplicate

What happened?

When trying to run conda-lock -f environment.yml

with the following environment.yml file:

channels:
  - conda-forge
  - defaults

dependencies:
  - python<3.12

  - jupyter
  - notebook
  - pandas
  - matplotlib
  - smopy
  - bokeh
  - conda-lock
  - tectonic
  - pytables
  - windrose
  - scipy
  - seaborn

it returns:

Locking dependencies for ['linux-64', 'osx-64', 'osx-arm64', 'win-64']...
INFO:conda_lock.conda_solver:linux-64 using specs ['python <3.12', 'jupyter', 'notebook', 'pandas', 'matplotlib', 'smopy', 'bokeh', 'conda-lock', 'tectonic', 'pytables', 'windrose', 'scipy', 'seaborn']
Traceback (most recent call last):
File "/home/rmolins/mambaforge/envs/operational-analysis/bin/conda-lock", line 10, in
sys.exit(main())
^^^^^^
File "/home/rmolins/mambaforge/envs/operational-analysis/lib/python3.11/site-packages/click/core.py", line 1157, in call
return self.main(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/rmolins/mambaforge/envs/operational-analysis/lib/python3.11/site-packages/click/core.py", line 1078, in main
rv = self.invoke(ctx)
^^^^^^^^^^^^^^^^
File "/home/rmolins/mambaforge/envs/operational-analysis/lib/python3.11/site-packages/click/core.py", line 1688, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/rmolins/mambaforge/envs/operational-analysis/lib/python3.11/site-packages/click/core.py", line 1434, in invoke
return ctx.invoke(self.callback, **ctx.params)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/rmolins/mambaforge/envs/operational-analysis/lib/python3.11/site-packages/click/core.py", line 783, in invoke
return __callback(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/rmolins/mambaforge/envs/operational-analysis/lib/python3.11/site-packages/click/decorators.py", line 33, in new_func
return f(get_current_context(), *args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/rmolins/mambaforge/envs/operational-analysis/lib/python3.11/site-packages/conda_lock/conda_lock.py", line 1388, in lock
lock_func(
File "/home/rmolins/mambaforge/envs/operational-analysis/lib/python3.11/site-packages/conda_lock/conda_lock.py", line 1096, in run_lock
make_lock_files(
File "/home/rmolins/mambaforge/envs/operational-analysis/lib/python3.11/site-packages/conda_lock/conda_lock.py", line 393, in make_lock_files
fresh_lock_content = create_lockfile_from_spec(
^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/rmolins/mambaforge/envs/operational-analysis/lib/python3.11/site-packages/conda_lock/conda_lock.py", line 824, in create_lockfile_from_spec
deps = _solve_for_arch(
^^^^^^^^^^^^^^^^
File "/home/rmolins/mambaforge/envs/operational-analysis/lib/python3.11/site-packages/conda_lock/conda_lock.py", line 743, in _solve_for_arch
conda_deps = solve_conda(
^^^^^^^^^^^^
File "/home/rmolins/mambaforge/envs/operational-analysis/lib/python3.11/site-packages/conda_lock/conda_solver.py", line 157, in solve_conda
dry_run_install = solve_specs_for_arch(
^^^^^^^^^^^^^^^^^^^^^
File "/home/rmolins/mambaforge/envs/operational-analysis/lib/python3.11/site-packages/conda_lock/conda_solver.py", line 392, in solve_specs_for_arch
dryrun_install: DryRunInstall = json.loads(extract_json_object(proc.stdout))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/rmolins/mambaforge/envs/operational-analysis/lib/python3.11/json/init.py", line 346, in loads
return _default_decoder.decode(s)
^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/rmolins/mambaforge/envs/operational-analysis/lib/python3.11/json/decoder.py", line 337, in decode
obj, end = self.raw_decode(s, idx=_w(s, 0).end())
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/rmolins/mambaforge/envs/operational-analysis/lib/python3.11/json/decoder.py", line 355, in raw_decode
raise JSONDecodeError("Expecting value", s, err.value) from None
json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)

And fails - the lock file is not created.

Conda Info

active environment : operational-analysis
    active env location : /home/rmolins/mambaforge/envs/operational-analysis
            shell level : 1
       user config file : /home/rmolins/.condarc
 populated config files : /home/rmolins/mambaforge/.condarc
                          /home/rmolins/.condarc
          conda version : 23.11.0
    conda-build version : not installed
         python version : 3.12.0.final.0
                 solver : libmamba (default)
       virtual packages : __archspec=1=icelake
                          __conda=23.11.0=0
                          __glibc=2.31=0
                          __linux=5.15.133.1=0
                          __unix=0=0
       base environment : /home/rmolins/mambaforge  (writable)
      conda av data dir : /home/rmolins/mambaforge/etc/conda
  conda av metadata url : None
           channel URLs : https://conda.anaconda.org/conda-forge/linux-64
                          https://conda.anaconda.org/conda-forge/noarch
                          https://repo.anaconda.com/pkgs/main/linux-64
                          https://repo.anaconda.com/pkgs/main/noarch
                          https://repo.anaconda.com/pkgs/r/linux-64
                          https://repo.anaconda.com/pkgs/r/noarch
          package cache : /home/rmolins/mambaforge/pkgs
                          /home/rmolins/.conda/pkgs
       envs directories : /home/rmolins/mambaforge/envs
                          /home/rmolins/.conda/envs
               platform : linux-64
             user-agent : conda/23.11.0 requests/2.31.0 CPython/3.12.0 Linux/5.15.133.1-microsoft-standard-WSL2 ubuntu/20.04.3 glibc/2.31 solver/libmamba conda-libmamba-solver/23.12.0 libmambapy/1.5.3
                UID:GID : 1000:1000
             netrc file : None
           offline mode : False

Conda Config

==> /home/rmolins/mambaforge/.condarc <==
channels:
  - conda-forge

==> /home/rmolins/.condarc <==
channels:
  - conda-forge
  - defaults
solver: libmamba

Conda list

# packages in environment at /home/rmolins/mambaforge/envs/operational-analysis:
#
# Name                    Version                   Build  Channel
_libgcc_mutex             0.1                 conda_forge    conda-forge
_openmp_mutex             4.5                       2_gnu    conda-forge
alsa-lib                  1.2.10               hd590300_0    conda-forge
annotated-types           0.6.0              pyhd8ed1ab_0    conda-forge
anyio                     4.2.0              pyhd8ed1ab_0    conda-forge
appdirs                   1.4.4              pyh9f0ad1d_0    conda-forge
argon2-cffi               23.1.0             pyhd8ed1ab_0    conda-forge
argon2-cffi-bindings      21.2.0          py311h459d7ec_4    conda-forge
arrow                     1.3.0              pyhd8ed1ab_0    conda-forge
asttokens                 2.4.1              pyhd8ed1ab_0    conda-forge
async-lru                 2.0.4              pyhd8ed1ab_0    conda-forge
attr                      2.5.1                h166bdaf_1    conda-forge
attrs                     23.2.0             pyh71513ae_0    conda-forge
babel                     2.14.0             pyhd8ed1ab_0    conda-forge
beautifulsoup4            4.12.2             pyha770c72_0    conda-forge
bleach                    6.1.0              pyhd8ed1ab_0    conda-forge
blosc                     1.21.5               h0f2a231_0    conda-forge
bokeh                     3.3.2              pyhd8ed1ab_0    conda-forge
brotli                    1.1.0                hd590300_1    conda-forge
brotli-bin                1.1.0                hd590300_1    conda-forge
brotli-python             1.1.0           py311hb755f60_1    conda-forge
bzip2                     1.0.8                hd590300_5    conda-forge
c-ares                    1.24.0               hd590300_0    conda-forge
c-blosc2                  2.12.0               hb4ffafa_0    conda-forge
ca-certificates           2023.11.17           hbcca054_0    conda-forge
cachecontrol              0.13.1             pyhd8ed1ab_0    conda-forge
cachecontrol-with-filecache 0.13.1             pyhd8ed1ab_0    conda-forge
cached-property           1.5.2                hd8ed1ab_1    conda-forge
cached_property           1.5.2              pyha770c72_1    conda-forge
cachy                     0.3.0              pyhd8ed1ab_1    conda-forge
cairo                     1.18.0               h3faef2a_0    conda-forge
certifi                   2023.11.17         pyhd8ed1ab_0    conda-forge
cffi                      1.16.0          py311hb3a22ac_0    conda-forge
charset-normalizer        3.3.2              pyhd8ed1ab_0    conda-forge
click                     8.1.7           unix_pyh707e725_0    conda-forge
click-default-group       1.2.4              pyhd8ed1ab_0    conda-forge
clikit                    0.6.2              pyhd8ed1ab_2    conda-forge
comm                      0.2.1              pyhd8ed1ab_0    conda-forge
conda-lock                2.5.1              pyhd8ed1ab_0    conda-forge
contourpy                 1.2.0           py311h9547e67_0    conda-forge
crashtest                 0.4.1              pyhd8ed1ab_0    conda-forge
cryptography              41.0.7          py311hcb13ee4_1    conda-forge
cycler                    0.12.1             pyhd8ed1ab_0    conda-forge
dbus                      1.13.6               h5008d03_3    conda-forge
debugpy                   1.8.0           py311hb755f60_1    conda-forge
decorator                 5.1.1              pyhd8ed1ab_0    conda-forge
defusedxml                0.7.1              pyhd8ed1ab_0    conda-forge
distlib                   0.3.8              pyhd8ed1ab_0    conda-forge
ensureconda               1.4.3              pyhd8ed1ab_0    conda-forge
entrypoints               0.4                pyhd8ed1ab_0    conda-forge
exceptiongroup            1.2.0              pyhd8ed1ab_0    conda-forge
executing                 2.0.1              pyhd8ed1ab_0    conda-forge
expat                     2.5.0                hcb278e6_1    conda-forge
filelock                  3.13.1             pyhd8ed1ab_0    conda-forge
font-ttf-dejavu-sans-mono 2.37                 hab24e00_0    conda-forge
font-ttf-inconsolata      3.000                h77eed37_0    conda-forge
font-ttf-source-code-pro  2.038                h77eed37_0    conda-forge
font-ttf-ubuntu           0.83                 h77eed37_1    conda-forge
fontconfig                2.14.2               h14ed4e7_0    conda-forge
fonts-conda-ecosystem     1                             0    conda-forge
fonts-conda-forge         1                             0    conda-forge
fonttools                 4.47.0          py311h459d7ec_0    conda-forge
fqdn                      1.5.1              pyhd8ed1ab_0    conda-forge
freetype                  2.12.1               h267a509_2    conda-forge
gettext                   0.21.1               h27087fc_0    conda-forge
gitdb                     4.0.11             pyhd8ed1ab_0    conda-forge
gitpython                 3.1.40             pyhd8ed1ab_0    conda-forge
glib                      2.78.3               hfc55251_0    conda-forge
glib-tools                2.78.3               hfc55251_0    conda-forge
gmp                       6.3.0                h59595ed_0    conda-forge
graphite2                 1.3.13            h58526e2_1001    conda-forge
gst-plugins-base          1.22.8               h8e1006c_0    conda-forge
gstreamer                 1.22.8               h98fc4e7_0    conda-forge
harfbuzz                  8.3.0                h3d44ed6_0    conda-forge
hdf5                      1.14.3          nompi_h4f84152_100    conda-forge
html5lib                  1.1                pyh9f0ad1d_0    conda-forge
icu                       73.2                 h59595ed_0    conda-forge
idna                      3.6                pyhd8ed1ab_0    conda-forge
importlib-metadata        7.0.1              pyha770c72_0    conda-forge
importlib_metadata        7.0.1                hd8ed1ab_0    conda-forge
importlib_resources       6.1.1              pyhd8ed1ab_0    conda-forge
ipykernel                 6.28.0             pyhd33586a_0    conda-forge
ipython                   8.19.0             pyh707e725_0    conda-forge
ipywidgets                8.1.1              pyhd8ed1ab_0    conda-forge
isoduration               20.11.0            pyhd8ed1ab_0    conda-forge
jaraco.classes            3.3.0              pyhd8ed1ab_0    conda-forge
jedi                      0.19.1             pyhd8ed1ab_0    conda-forge
jeepney                   0.8.0              pyhd8ed1ab_0    conda-forge
jinja2                    3.1.2              pyhd8ed1ab_1    conda-forge
json5                     0.9.14             pyhd8ed1ab_0    conda-forge
jsonpointer               2.4             py311h38be061_3    conda-forge
jsonschema                4.20.0             pyhd8ed1ab_0    conda-forge
jsonschema-specifications 2023.12.1          pyhd8ed1ab_0    conda-forge
jsonschema-with-format-nongpl 4.20.0             pyhd8ed1ab_0    conda-forge
jupyter                   1.0.0             pyhd8ed1ab_10    conda-forge
jupyter-lsp               2.2.1              pyhd8ed1ab_0    conda-forge
jupyter_client            8.6.0              pyhd8ed1ab_0    conda-forge
jupyter_console           6.6.3              pyhd8ed1ab_0    conda-forge
jupyter_core              5.7.0           py311h38be061_0    conda-forge
jupyter_events            0.9.0              pyhd8ed1ab_0    conda-forge
jupyter_server            2.12.2             pyhd8ed1ab_0    conda-forge
jupyter_server_terminals  0.5.1              pyhd8ed1ab_0    conda-forge
jupyterlab                4.0.10             pyhd8ed1ab_0    conda-forge
jupyterlab_pygments       0.3.0              pyhd8ed1ab_0    conda-forge
jupyterlab_server         2.25.2             pyhd8ed1ab_0    conda-forge
jupyterlab_widgets        3.0.9              pyhd8ed1ab_0    conda-forge
keyring                   24.3.0          py311h38be061_0    conda-forge
keyutils                  1.6.1                h166bdaf_0    conda-forge
kiwisolver                1.4.5           py311h9547e67_1    conda-forge
krb5                      1.21.2               h659d440_0    conda-forge
lame                      3.100             h166bdaf_1003    conda-forge
lcms2                     2.16                 hb7c19ff_0    conda-forge
ld_impl_linux-64          2.40                 h41732ed_0    conda-forge
lerc                      4.0.0                h27087fc_0    conda-forge
libaec                    1.1.2                h59595ed_1    conda-forge
libblas                   3.9.0           20_linux64_openblas    conda-forge
libbrotlicommon           1.1.0                hd590300_1    conda-forge
libbrotlidec              1.1.0                hd590300_1    conda-forge
libbrotlienc              1.1.0                hd590300_1    conda-forge
libcap                    2.69                 h0f662aa_0    conda-forge
libcblas                  3.9.0           20_linux64_openblas    conda-forge
libclang                  15.0.7          default_hb11cfb5_4    conda-forge
libclang13                15.0.7          default_ha2b6cf4_4    conda-forge
libcups                   2.3.3                h4637d8d_4    conda-forge
libcurl                   8.5.0                hca28451_0    conda-forge
libdeflate                1.19                 hd590300_0    conda-forge
libedit                   3.1.20191231         he28a2e2_2    conda-forge
libev                     4.33                 hd590300_2    conda-forge
libevent                  2.1.12               hf998b51_1    conda-forge
libexpat                  2.5.0                hcb278e6_1    conda-forge
libffi                    3.4.2                h7f98852_5    conda-forge
libflac                   1.4.3                h59595ed_0    conda-forge
libgcc-ng                 13.2.0               h807b86a_3    conda-forge
libgcrypt                 1.10.3               hd590300_0    conda-forge
libgfortran-ng            13.2.0               h69a702a_3    conda-forge
libgfortran5              13.2.0               ha4646dd_3    conda-forge
libglib                   2.78.3               h783c2da_0    conda-forge
libgomp                   13.2.0               h807b86a_3    conda-forge
libgpg-error              1.47                 h71f35ed_0    conda-forge
libiconv                  1.17                 hd590300_2    conda-forge
libjpeg-turbo             3.0.0                hd590300_1    conda-forge
liblapack                 3.9.0           20_linux64_openblas    conda-forge
libllvm15                 15.0.7               hb3ce162_4    conda-forge
libnghttp2                1.58.0               h47da74e_1    conda-forge
libnsl                    2.0.1                hd590300_0    conda-forge
libogg                    1.3.4                h7f98852_1    conda-forge
libopenblas               0.3.25          pthreads_h413a1c8_0    conda-forge
libopus                   1.3.1                h7f98852_1    conda-forge
libpng                    1.6.39               h753d276_0    conda-forge
libpq                     16.1                 h33b98f1_7    conda-forge
libsndfile                1.2.2                hc60ed4a_1    conda-forge
libsodium                 1.0.18               h36c2ea0_1    conda-forge
libsqlite                 3.44.2               h2797004_0    conda-forge
libssh2                   1.11.0               h0841786_0    conda-forge
libstdcxx-ng              13.2.0               h7e041cc_3    conda-forge
libsystemd0               255                  h3516f8a_0    conda-forge
libtiff                   4.6.0                ha9c0a0a_2    conda-forge
libuuid                   2.38.1               h0b41bf4_0    conda-forge
libvorbis                 1.3.7                h9c3ff4c_0    conda-forge
libwebp-base              1.3.2                hd590300_0    conda-forge
libxcb                    1.15                 h0b41bf4_0    conda-forge
libxcrypt                 4.4.36               hd590300_1    conda-forge
libxkbcommon              1.6.0                hd429924_1    conda-forge
libxml2                   2.12.3               h232c23b_0    conda-forge
libzlib                   1.2.13               hd590300_5    conda-forge
lz4-c                     1.9.4                hcb278e6_0    conda-forge
lzo                       2.10              h516909a_1000    conda-forge
markupsafe                2.1.3           py311h459d7ec_1    conda-forge
matplotlib                3.8.2           py311h38be061_0    conda-forge
matplotlib-base           3.8.2           py311h54ef318_0    conda-forge
matplotlib-inline         0.1.6              pyhd8ed1ab_0    conda-forge
mistune                   3.0.2              pyhd8ed1ab_0    conda-forge
more-itertools            10.1.0             pyhd8ed1ab_0    conda-forge
mpg123                    1.32.3               h59595ed_0    conda-forge
msgpack-python            1.0.7           py311h9547e67_0    conda-forge
munkres                   1.1.4              pyh9f0ad1d_0    conda-forge
mysql-common              8.0.33               hf1915f5_6    conda-forge
mysql-libs                8.0.33               hca2cd23_6    conda-forge
nbclient                  0.8.0              pyhd8ed1ab_0    conda-forge
nbconvert                 7.14.0             pyhd8ed1ab_0    conda-forge
nbconvert-core            7.14.0             pyhd8ed1ab_0    conda-forge
nbconvert-pandoc          7.14.0             pyhd8ed1ab_0    conda-forge
nbformat                  5.9.2              pyhd8ed1ab_0    conda-forge
ncurses                   6.4                  h59595ed_2    conda-forge
nest-asyncio              1.5.8              pyhd8ed1ab_0    conda-forge
nomkl                     1.0                  h5ca1d4c_0    conda-forge
notebook                  7.0.6              pyhd8ed1ab_0    conda-forge
notebook-shim             0.2.3              pyhd8ed1ab_0    conda-forge
nspr                      4.35                 h27087fc_0    conda-forge
nss                       3.96                 h1d7d5a4_0    conda-forge
numexpr                   2.8.8           py311h039bad6_100    conda-forge
numpy                     1.26.3          py311h64a7726_0    conda-forge
openjpeg                  2.5.0                h488ebb8_3    conda-forge
openssl                   3.2.0                hd590300_1    conda-forge
overrides                 7.4.0              pyhd8ed1ab_0    conda-forge
packaging                 23.2               pyhd8ed1ab_0    conda-forge
pandas                    2.1.4           py311h320fe9a_0    conda-forge
pandoc                    3.1.3                h32600fe_0    conda-forge
pandocfilters             1.5.0              pyhd8ed1ab_0    conda-forge
parso                     0.8.3              pyhd8ed1ab_0    conda-forge
pastel                    0.2.1              pyhd8ed1ab_0    conda-forge
patsy                     0.5.5              pyhd8ed1ab_0    conda-forge
pcre2                     10.42                hcad00b1_0    conda-forge
pexpect                   4.8.0              pyh1a96a4e_2    conda-forge
pickleshare               0.7.5                   py_1003    conda-forge
pillow                    10.2.0          py311ha6c5da5_0    conda-forge
pip                       23.3.2             pyhd8ed1ab_0    conda-forge
pixman                    0.42.2               h59595ed_0    conda-forge
pkginfo                   1.9.6              pyhd8ed1ab_0    conda-forge
pkgutil-resolve-name      1.3.10             pyhd8ed1ab_1    conda-forge
platformdirs              4.1.0              pyhd8ed1ab_0    conda-forge
ply                       3.11                       py_1    conda-forge
prometheus_client         0.19.0             pyhd8ed1ab_0    conda-forge
prompt-toolkit            3.0.42             pyha770c72_0    conda-forge
prompt_toolkit            3.0.42               hd8ed1ab_0    conda-forge
psutil                    5.9.7           py311h459d7ec_0    conda-forge
pthread-stubs             0.4               h36c2ea0_1001    conda-forge
ptyprocess                0.7.0              pyhd3deb0d_0    conda-forge
pulseaudio-client         16.1                 hb77b528_5    conda-forge
pure_eval                 0.2.2              pyhd8ed1ab_0    conda-forge
py-cpuinfo                9.0.0              pyhd8ed1ab_0    conda-forge
pycparser                 2.21               pyhd8ed1ab_0    conda-forge
pydantic                  2.5.3              pyhd8ed1ab_0    conda-forge
pydantic-core             2.14.6          py311h46250e7_1    conda-forge
pygments                  2.17.2             pyhd8ed1ab_0    conda-forge
pylev                     1.4.0              pyhd8ed1ab_0    conda-forge
pyparsing                 3.1.1              pyhd8ed1ab_0    conda-forge
pyqt                      5.15.9          py311hf0fb5b6_5    conda-forge
pyqt5-sip                 12.12.2         py311hb755f60_5    conda-forge
pysocks                   1.7.1              pyha2e5f31_6    conda-forge
pytables                  3.9.2           py311h10c7f7f_1    conda-forge
python                    3.11.7          hab00c5b_1_cpython    conda-forge
python-dateutil           2.8.2              pyhd8ed1ab_0    conda-forge
python-fastjsonschema     2.19.1             pyhd8ed1ab_0    conda-forge
python-json-logger        2.0.7              pyhd8ed1ab_0    conda-forge
python-tzdata             2023.4             pyhd8ed1ab_0    conda-forge
python_abi                3.11                    4_cp311    conda-forge
pytz                      2023.3.post1       pyhd8ed1ab_0    conda-forge
pyyaml                    6.0.1           py311h459d7ec_1    conda-forge
pyzmq                     25.1.2          py311h34ded2d_0    conda-forge
qt-main                   5.15.8              h450f30e_18    conda-forge
qtconsole-base            5.5.1              pyha770c72_0    conda-forge
qtpy                      2.4.1              pyhd8ed1ab_0    conda-forge
readline                  8.2                  h8228510_1    conda-forge
referencing               0.32.0             pyhd8ed1ab_0    conda-forge
requests                  2.31.0             pyhd8ed1ab_0    conda-forge
rfc3339-validator         0.1.4              pyhd8ed1ab_0    conda-forge
rfc3986-validator         0.1.1              pyh9f0ad1d_0    conda-forge
rpds-py                   0.16.2          py311h46250e7_0    conda-forge
ruamel.yaml               0.18.5          py311h459d7ec_0    conda-forge
ruamel.yaml.clib          0.2.7           py311h459d7ec_2    conda-forge
scipy                     1.11.4          py311h64a7726_0    conda-forge
seaborn                   0.13.1               hd8ed1ab_0    conda-forge
seaborn-base              0.13.1             pyhd8ed1ab_0    conda-forge
secretstorage             3.3.3           py311h38be061_2    conda-forge
send2trash                1.8.2              pyh41d4057_0    conda-forge
setuptools                69.0.3             pyhd8ed1ab_0    conda-forge
sip                       6.7.12          py311hb755f60_0    conda-forge
six                       1.16.0             pyh6c4a22f_0    conda-forge
smmap                     5.0.0              pyhd8ed1ab_0    conda-forge
smopy                     0.0.8              pyhd8ed1ab_0    conda-forge
snappy                    1.1.10               h9fff704_0    conda-forge
sniffio                   1.3.0              pyhd8ed1ab_0    conda-forge
soupsieve                 2.5                pyhd8ed1ab_1    conda-forge
stack_data                0.6.2              pyhd8ed1ab_0    conda-forge
statsmodels               0.14.1          py311h1f0f07a_0    conda-forge
tectonic                  0.14.1               hffe7e2f_2    conda-forge
terminado                 0.18.0             pyh0d859eb_0    conda-forge
tinycss2                  1.2.1              pyhd8ed1ab_0    conda-forge
tk                        8.6.13          noxft_h4845f30_101    conda-forge
toml                      0.10.2             pyhd8ed1ab_0    conda-forge
tomli                     2.0.1              pyhd8ed1ab_0    conda-forge
tomlkit                   0.12.3             pyha770c72_0    conda-forge
toolz                     0.12.0             pyhd8ed1ab_0    conda-forge
tornado                   6.3.3           py311h459d7ec_1    conda-forge
traitlets                 5.14.1             pyhd8ed1ab_0    conda-forge
types-python-dateutil     2.8.19.14          pyhd8ed1ab_0    conda-forge
typing-extensions         4.9.0                hd8ed1ab_0    conda-forge
typing_extensions         4.9.0              pyha770c72_0    conda-forge
typing_utils              0.1.0              pyhd8ed1ab_0    conda-forge
tzdata                    2023d                h0c530f3_0    conda-forge
uri-template              1.3.0              pyhd8ed1ab_0    conda-forge
urllib3                   1.26.18            pyhd8ed1ab_0    conda-forge
virtualenv                20.25.0            pyhd8ed1ab_0    conda-forge
wcwidth                   0.2.12             pyhd8ed1ab_0    conda-forge
webcolors                 1.13               pyhd8ed1ab_0    conda-forge
webencodings              0.5.1              pyhd8ed1ab_2    conda-forge
websocket-client          1.7.0              pyhd8ed1ab_0    conda-forge
wheel                     0.42.0             pyhd8ed1ab_0    conda-forge
widgetsnbextension        4.0.9              pyhd8ed1ab_0    conda-forge
windrose                  1.9.0              pyhd8ed1ab_0    conda-forge
xcb-util                  0.4.0                hd590300_1    conda-forge
xcb-util-image            0.4.0                h8ee46fc_1    conda-forge
xcb-util-keysyms          0.4.0                h8ee46fc_1    conda-forge
xcb-util-renderutil       0.3.9                hd590300_1    conda-forge
xcb-util-wm               0.4.1                h8ee46fc_1    conda-forge
xkeyboard-config          2.40                 hd590300_0    conda-forge
xorg-kbproto              1.0.7             h7f98852_1002    conda-forge
xorg-libice               1.1.1                hd590300_0    conda-forge
xorg-libsm                1.2.4                h7391055_0    conda-forge
xorg-libx11               1.8.7                h8ee46fc_0    conda-forge
xorg-libxau               1.0.11               hd590300_0    conda-forge
xorg-libxdmcp             1.1.3                h7f98852_0    conda-forge
xorg-libxext              1.3.4                h0b41bf4_2    conda-forge
xorg-libxrender           0.9.11               hd590300_0    conda-forge
xorg-renderproto          0.11.1            h7f98852_1002    conda-forge
xorg-xextproto            7.3.0             h0b41bf4_1003    conda-forge
xorg-xf86vidmodeproto     2.3.1             h7f98852_1002    conda-forge
xorg-xproto               7.0.31            h7f98852_1007    conda-forge
xyzservices               2023.10.1          pyhd8ed1ab_0    conda-forge
xz                        5.2.6                h166bdaf_0    conda-forge
yaml                      0.2.5                h7f98852_2    conda-forge
zeromq                    4.3.5                h59595ed_0    conda-forge
zipp                      3.17.0             pyhd8ed1ab_0    conda-forge
zlib                      1.2.13               hd590300_5    conda-forge
zlib-ng                   2.0.7                h0b41bf4_0    conda-forge
zstd                      1.5.5                hfc55251_0    conda-forge

Additional Context

No response

@maresb
Copy link
Contributor

maresb commented Jan 5, 2024

Thanks for the report! I have been unable to reproduce this issue locally.

I suspect it could have to do with the Conda executable. Unfortunately the stack trace doesn't provide me with enough info to understand what's going on. (We should improve this.)

Could you please edit /home/rmolins/mambaforge/envs/operational-analysis/lib/python3.11/site-packages/conda_lock/conda_solver.py and change line 390 to

    print_proc(proc)

This should let us figure out what's going on.

@r-molins-mrp
Copy link
Author

Sure; I have modified that line so now my conda_solver.py looks like:
image

So now if I run conda-lock -f environment.yml it returns (I don't see much difference)

Locking dependencies for ['linux-64', 'osx-64', 'osx-arm64', 'win-64']...
INFO:conda_lock.conda_solver:linux-64 using specs ['python <3.12', 'jupyter', 'notebook', 'pandas', 'matplotlib', 'smopy', 'bokeh', 'conda-lock', 'tectonic', 'pytables', 'windrose', 'scipy', 'seaborn']
Command: ['/home/rmolins/mambaforge/condabin/mamba', 'create', '--prefix', '/tmp/tmpy2_a0c8g/prefix', '--dry-run', '--json', '--override-channels', '--channel', 'conda-forge', '--channel', 'defaults', '--channel', 'file:///tmp/tmpepak700k', 'python <3.12', 'jupyter', 'notebook', 'pandas', 'matplotlib', 'smopy', 'bokeh', 'conda-lock', 'tectonic', 'pytables', 'windrose', 'scipy', 'seaborn']
STDOUT:
Currently, only install, create, list, search, run, info, clean, remove, update, repoquery, activate and deactivate are supported through mamba.

Traceback (most recent call last):
File "/home/rmolins/mambaforge/envs/operational-analysis/bin/conda-lock", line 10, in
sys.exit(main())
^^^^^^
File "/home/rmolins/mambaforge/envs/operational-analysis/lib/python3.11/site-packages/click/core.py", line 1157, in call
return self.main(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/rmolins/mambaforge/envs/operational-analysis/lib/python3.11/site-packages/click/core.py", line 1078, in main
rv = self.invoke(ctx)
^^^^^^^^^^^^^^^^
File "/home/rmolins/mambaforge/envs/operational-analysis/lib/python3.11/site-packages/click/core.py", line 1688, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/rmolins/mambaforge/envs/operational-analysis/lib/python3.11/site-packages/click/core.py", line 1434, in invoke
return ctx.invoke(self.callback, **ctx.params)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/rmolins/mambaforge/envs/operational-analysis/lib/python3.11/site-packages/click/core.py", line 783, in invoke
return __callback(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/rmolins/mambaforge/envs/operational-analysis/lib/python3.11/site-packages/click/decorators.py", line 33, in new_func
return f(get_current_context(), *args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/rmolins/mambaforge/envs/operational-analysis/lib/python3.11/site-packages/conda_lock/conda_lock.py", line 1388, in lock
lock_func(
File "/home/rmolins/mambaforge/envs/operational-analysis/lib/python3.11/site-packages/conda_lock/conda_lock.py", line 1096, in run_lock
make_lock_files(
File "/home/rmolins/mambaforge/envs/operational-analysis/lib/python3.11/site-packages/conda_lock/conda_lock.py", line 393, in make_lock_files
fresh_lock_content = create_lockfile_from_spec(
^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/rmolins/mambaforge/envs/operational-analysis/lib/python3.11/site-packages/conda_lock/conda_lock.py", line 824, in create_lockfile_from_spec
deps = _solve_for_arch(
^^^^^^^^^^^^^^^^
File "/home/rmolins/mambaforge/envs/operational-analysis/lib/python3.11/site-packages/conda_lock/conda_lock.py", line 743, in _solve_for_arch
conda_deps = solve_conda(
^^^^^^^^^^^^
File "/home/rmolins/mambaforge/envs/operational-analysis/lib/python3.11/site-packages/conda_lock/conda_solver.py", line 157, in solve_conda
dry_run_install = solve_specs_for_arch(
^^^^^^^^^^^^^^^^^^^^^
File "/home/rmolins/mambaforge/envs/operational-analysis/lib/python3.11/site-packages/conda_lock/conda_solver.py", line 392, in solve_specs_for_arch
dryrun_install: DryRunInstall = json.loads(extract_json_object(proc.stdout))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/rmolins/mambaforge/envs/operational-analysis/lib/python3.11/json/init.py", line 346, in loads
return _default_decoder.decode(s)
^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/rmolins/mambaforge/envs/operational-analysis/lib/python3.11/json/decoder.py", line 337, in decode
obj, end = self.raw_decode(s, idx=_w(s, 0).end())
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/rmolins/mambaforge/envs/operational-analysis/lib/python3.11/json/decoder.py", line 355, in raw_decode
raise JSONDecodeError("Expecting value", s, err.value) from None
json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)

Let me know if you need anything else.

@maresb
Copy link
Contributor

maresb commented Jan 5, 2024

That helps a lot!

Here's what we gained:

Command: ['/home/rmolins/mambaforge/condabin/mamba', 'create', '--prefix', '/tmp/tmpy2_a0c8g/prefix', '--dry-run', '--json', '--override-channels', '--channel', 'conda-forge', '--channel', 'defaults', '--channel', 'file:///tmp/tmpepak700k', 'python <3.12', 'jupyter', 'notebook', 'pandas', 'matplotlib', 'smopy', 'bokeh', 'conda-lock', 'tectonic', 'pytables', 'windrose', 'scipy', 'seaborn']
STDOUT:
Currently, only install, create, list, search, run, info, clean, remove, update, repoquery, activate and deactivate are supported through mamba.

Something seems screwed up with Mamba. Could you please try running:

/home/rmolins/mambaforge/condabin/mamba --version

I hope it's an old Mamba version, and upgrading Mamba will fix the issue.

Note to self: we should check the version of Mamba before using it, and encourage the user to upgrade in case they're using something ancient.

@r-molins-mrp
Copy link
Author

Ok great; /home/rmolins/mambaforge/condabin/mamba --version returns

mamba 1.5.3
conda 23.11.0

I'm far from being an expert with Python environments so I wouldn't be surprised if mamba is messed up in my set-up. I'm investigating.

@r-molins-mrp
Copy link
Author

So I have updated mamba via conda using conda update mamba I did note this is apparently not recommended in mamba doc, but at least now I have mamba 1.5.6.

And now doing conda-lock -f environment.yml works and generate the lock file, so problem solved!

It could have been nice to have some checks on the version of mamba indeed, but thanks a lot for your help @maresb!

@maresb
Copy link
Contributor

maresb commented Jan 5, 2024

Thanks for taking the time to make the report @r-molins-mrp. Also I'm glad I could fix your problem.

I'll rework this issue into a todo...

@maresb maresb changed the title conda-lock -f environment.yml returns JSONDecodeError and fails Ensure that the mamba/conda version being used is not too old Jan 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants