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

QUERY: When using environment type mamba, asv attempts to reinstall Python #1401

Open
nickodell opened this issue Apr 30, 2024 · 3 comments
Open

Comments

@nickodell
Copy link

nickodell commented Apr 30, 2024

Description of problem

Hi, I'm attempting to use asv to benchmark a change to SciPy. Specifically, my goal is to run the scipy.optimize benchmarks against this change to measure if computing the numdiff with less memory causes a regression in terms of CPU usage.

In order to do this, I set up mamba in the manner recommended by the developer quickstart guide, then attempted to run

python3 dev.py bench --compare main

Initially, I got this error:

Couldn't load asv.plugins._mamba_helpers because
No module named 'libmambapy'
· Unknown environment type 'mamba'. Allowed values based on existing plugins are ['existing', 'conda', 'virtualenv'].

I asked about this in SciPy's slack channel, and @HaoZeke suggested installing conda-build plus libmambapy. I ran mamba install conda-build && mamba install libmambapy to install this.

This solved the previous error, but now I have this error:

(scipy-dev) nodell@scipy-dev:~/scipy$ python3 dev.py bench --compare main
💻  ninja -C /home/nodell/scipy/build -j6
ninja: Entering directory `/home/nodell/scipy/build'
[2/2] Generating scipy/generate-version with a custom command
fatal: bad revision '^v1.12.0'
Build OK
💻  meson install -C build --only-changed
Installing, see meson-install.log...
Installation OK
SciPy from development installed path at: /home/nodell/scipy/build-install/lib/python3.11/site-packages
********************************************************************************
WARNING: you have uncommitted changes --- these will NOT be benchmarked!
********************************************************************************
pkgs/r/noarch                                                 No change
pkgs/r/linux-64                                               No change
pkgs/main/noarch                                              No change
pkgs/main/linux-64                                            No change
Mamba failed to solve:
 - python=3.11
 - wheel
 - pip
 - numpy
 - Cython
 - pytest
 - pythran
 - pybind11
 - meson-python

with channels:
Could not solve for environment specs
The following package could not be installed
└─ python 3.11**  is not installable because it requires
   └─ libgcc-ng >=11.2.0 , which requires
      └─ __glibc >=2.17 , which is missing on the system.

·· Failure creating environment for mamba-py3.11-Cython-meson-python-numpy-pybind11-pytest-pythran
Traceback (most recent call last):
  File "/home/nodell/.miniforge3/envs/scipy-dev/bin/asv", line 10, in <module>
    sys.exit(main())
             ^^^^^^
  File "/home/nodell/.miniforge3/envs/scipy-dev/lib/python3.11/site-packages/asv/main.py", line 29, in main
    result = args.func(args)
             ^^^^^^^^^^^^^^^
  File "/home/nodell/.miniforge3/envs/scipy-dev/lib/python3.11/site-packages/asv/commands/__init__.py", line 49, in run_from_args
    return cls.run_from_conf_args(conf, args)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/nodell/.miniforge3/envs/scipy-dev/lib/python3.11/site-packages/asv/commands/continuous.py", line 64, in run_from_conf_args
    return cls.run(
           ^^^^^^^^
  File "/home/nodell/.miniforge3/envs/scipy-dev/lib/python3.11/site-packages/asv/commands/continuous.py", line 103, in run
    result = Run.run(
             ^^^^^^^^
  File "/home/nodell/.miniforge3/envs/scipy-dev/lib/python3.11/site-packages/asv/commands/run.py", line 278, in run
    Setup.perform_setup(environments, parallel=parallel)
  File "/home/nodell/.miniforge3/envs/scipy-dev/lib/python3.11/site-packages/asv/commands/setup.py", line 82, in perform_setup
    list(map(_create, environments))
  File "/home/nodell/.miniforge3/envs/scipy-dev/lib/python3.11/site-packages/asv/commands/setup.py", line 14, in _create
    env.create()
  File "/home/nodell/.miniforge3/envs/scipy-dev/lib/python3.11/site-packages/asv/environment.py", line 750, in create
    self._setup()
  File "/home/nodell/.miniforge3/envs/scipy-dev/lib/python3.11/site-packages/asv/plugins/mamba.py", line 154, in _setup
    transaction = solver.solve(mamba_pkgs)
                  ^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/nodell/.miniforge3/envs/scipy-dev/lib/python3.11/site-packages/asv/plugins/_mamba_helpers.py", line 252, in solve
    raise RuntimeError("Solver could not find solution." + error_string)
RuntimeError: Solver could not find solution.Mamba failed to solve:
 - python=3.11
 - wheel
 - pip
 - numpy
 - Cython
 - pytest
 - pythran
 - pybind11
 - meson-python

with channels:
Could not solve for environment specs
The following package could not be installed
└─ python 3.11**  is not installable because it requires
   └─ libgcc-ng >=11.2.0 , which requires
      └─ __glibc >=2.17 , which is missing on the system.

There are two weird things about that error message:

  1. I have Python 3.11, so it shouldn't need to reinstall it.
  2. I have glibc 2.35, which should be good enough.

asv command line

The SciPy script dev.py runs asv with the following arguments:

asv continuous --show-stderr --factor 1.05 --quick 4ee0de31b758f81be85435a0ad72d315a840441d 30306d1e73a10702e8677a74b6667f14c97458b1

Version information

I am using:

  • Ubuntu 22.04.4
  • Python 3.11.9
  • asv 0.6.3
  • mamba 1.5.8

For all other packages, a full mamba package version list is attached: mamba_packages.log

@HaoZeke HaoZeke changed the title When using environment type mamba, asv attempts to reinstall Python QUERY: When using environment type mamba, asv attempts to reinstall Python Jul 1, 2024
@HaoZeke
Copy link
Member

HaoZeke commented Jul 1, 2024

Thanks for the detailed issue. The environments do try to reinstall Python (except for using existing) but the rest of the error is interesting, will reproduce and check more later, sorry for the late response!

@nickodell
Copy link
Author

Thanks for the detailed issue. The environments do try to reinstall Python (except for using existing) but the rest of the error is interesting, will reproduce and check more later, sorry for the late response!

Ok, thanks for clarifying that. I appreciate your help! Please let me know if you need any additional info.

@lobpcg
Copy link

lobpcg commented Jul 18, 2024

try running asv directly specifying the environment Existing" ,e.g.,
scipy/benchmarks $ asv run -E existing

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

3 participants