Skip to content

error in create environment with cNMF_benchmarking_pipeline/Inference/torch-cNMF/environment.yml #1

@ShanshanHe-44

Description

@ShanshanHe-44

Hi Alexander,

Thanks for the latest update. I tried to re-install the tor-cnmf env but keep getting error;

  • Fix: Remove name: so prefix: is used;
  • move compiled packages (scipy, matplotlib, numpy, pyyaml) to conda dependencies;
  • install pure-Python pip packages separately with PIP_CACHE_DIR/TMPDIR set to the shared filesystem

I record the error below.

  1. python version:
  • solution: 3.9 -> 3.11
  1. nmf-torch and torch-cnmf
  • solution: comment out, need to install manually once the environment has settled.
Pip subprocess error:
ERROR: Ignored the following versions that require a different python version: 0.1.7 Requires-Python >=3.10; 0.11.0 Requires-Python >=3.10; 0.11.0rc3 Requires-Python >=3.10; 0.11.1 Requires-Python >=3.10; 
ERROR: Could not find a version that satisfies the requirement nmf-torch==0.1.dev108+g218c29c08.d20260402 (from versions: 0.1.0, 0.1.1)
ERROR: No matching distribution found for nmf-torch==0.1.dev108+g218c29c08.d20260402

  1. scipy install failed, same as matplotlib, etc.

The pip: section in the YAML is installing scipy from PyPI, but it can't find OpenBLAS. This happens because pip builds scipy from source and doesn't see the conda-installed openblas.
The fix: scipy should be a conda dependency (not pip), since conda handles the BLAS linkage correctly. The conda section already has all the BLAS/OpenBLAS libs but scipy itself is missing from it.

  • solution: add some pkgs to the conda dependencies
 Configuring scipy_config.h using configuration
      Program f2py found: YES (/tmp/pip-build-env-sm7uyo6w/overlay/bin/f2py)
      Run-time dependency scipy-openblas found: NO  (tried pkg-config)
      Run-time dependency openblas found: NO  (tried pkg-config and cmake)
      Run-time dependency openblas found: NO  (tried pkg-config)

      ../scipy/meson.build:285:9: ERROR: Dependency "OpenBLAS" not found (tried pkg-config)

      A full log can be found at /tmp/pip-install-go9noa2o/scipy_cc2e426d0816434694d7180af4bbc62c/.mesonpy-8abl31m2/meson-logs/meson-log.txt
      [end of output]

  note: This error originates from a subprocess, and is likely not a problem with pip.
error: metadata-generation-failed
× Encountered error while generating package metadata.
╰─> See above for output.
note: This is an issue with the package mentioned above, not pip.
hint: See above for details.
failed
CondaEnvException: Pip failed

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions