Skip to content

Inconsistent numpy versions in the current installation via conda #216

@sskimb

Description

@sskimb

I have been using MetaXcan (downloaded on 2024.05.06) for several years.
I need to reinstall MetaXcan on a fresh Ubuntu (actually WSL2).
I cloned the package from github (on 2025.06.30) and tried to install using conda as recommended.

The current conda_env.yaml requires numpy 1.26 and scipy 1.12, as well as bgen-reader 4.0.8.

The scipy 1.12 requires numpy<1.29.0,>=1.22.4. numpy 1.26 satisfies this requirement.

While bgen-reader 4.0.8 requires numpy (>=1.17.0) and cbgen (>=1.0.1), the latter requires numpy (>=2.0,<3.0).

Toward the end of installation, conda installs numpy 2.0.2, which is incompatible with scipy 1.12.

Thank you for your consideration in advance.

The following is the error messages:

MetaXcan/software/metax/gwas/GWAS.py:5: UserWarning: A NumPy version >=1.22.4 and <1.29.0 is required for this version of SciPy (detected version 2.0.2)
  import scipy.stats as stats
Traceback (most recent call last):
  File "MetaXcan/software/SPrediXcan.py", line 13, in <module>
    from metax.gwas import Utilities as GWASUtilities
  File "MetaXcan/software/metax/gwas/Utilities.py", line 7, in <module>
    from . import GWAS
  File "MetaXcan/software/metax/gwas/GWAS.py", line 5, in <module>
    import scipy.stats as stats
  File "miniconda3/envs/imlabtools/lib/python3.9/site-packages/scipy/stats/__init__.py", line 605, in <module>
    from ._stats_py import *
  File "miniconda3/envs/imlabtools/lib/python3.9/site-packages/scipy/stats/_stats_py.py", line 37, in <module>
    from scipy.spatial.distance import cdist
  File "miniconda3/envs/imlabtools/lib/python3.9/site-packages/scipy/spatial/__init__.py", line 110, in <module>
    from ._kdtree import *
  File "miniconda3/envs/imlabtools/lib/python3.9/site-packages/scipy/spatial/_kdtree.py", line 4, in <module>
    from ._ckdtree import cKDTree, cKDTreeNode
  File "_ckdtree.pyx", line 1, in init scipy.spatial._ckdtree
ValueError: numpy.dtype size changed, may indicate binary incompatibility. Expected 96 from C header, got 88 from PyObject

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