Skip to content

Unable to successfully install vcf2gwas in new conda environment - numpy dependency version problems #45

Open
@TobyBaril

Description

@TobyBaril

Hi,

I am following the instructions on the installation page. The environment is created properly with no conflicts, but I think there is an issue with the conda recipe, as an incompatible version of NumPy is installed, and I cannot install the correct version to satisfy the dependency:

vcf2gwas -v test

vcf2gwas v0.8.8 

Initialising..

Copying example input files to current working directory..
Copying README and LICENSE files..
/data/toby/mambaforge/envs/vcf2gwas/lib/python3.9/site-packages/seaborn/utils.py:10: UserWarning: A NumPy version >=1.22.4 and <2.3.0 is required for this version of SciPy (detected version 1.20.3)
  from scipy import stats
Traceback (most recent call last):
  File "/data/toby/mambaforge/envs/vcf2gwas/lib/python3.9/site-packages/vcf2gwas/starter.py", line 23, in <module>
    from vcf2gwas.utils import *
  File "/data/toby/mambaforge/envs/vcf2gwas/lib/python3.9/site-packages/vcf2gwas/utils.py", line 54, in <module>
    import seaborn as sns
  File "/data/toby/mambaforge/envs/vcf2gwas/lib/python3.9/site-packages/seaborn/__init__.py", line 2, in <module>
    from .rcmod import *  # noqa: F401,F403
  File "/data/toby/mambaforge/envs/vcf2gwas/lib/python3.9/site-packages/seaborn/rcmod.py", line 7, in <module>
    from . import palettes
  File "/data/toby/mambaforge/envs/vcf2gwas/lib/python3.9/site-packages/seaborn/palettes.py", line 9, in <module>
    from .utils import desaturate, get_color_cycle
  File "/data/toby/mambaforge/envs/vcf2gwas/lib/python3.9/site-packages/seaborn/utils.py", line 10, in <module>
    from scipy import stats
  File "/data/toby/mambaforge/envs/vcf2gwas/lib/python3.9/site-packages/scipy/__init__.py", line 134, in __getattr__
    return _importlib.import_module(f'scipy.{name}')
  File "/data/toby/mambaforge/envs/vcf2gwas/lib/python3.9/importlib/__init__.py", line 127, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "/data/toby/mambaforge/envs/vcf2gwas/lib/python3.9/site-packages/scipy/stats/__init__.py", line 606, in <module>
    from ._stats_py import *
  File "/data/toby/mambaforge/envs/vcf2gwas/lib/python3.9/site-packages/scipy/stats/_stats_py.py", line 37, in <module>
    from scipy import sparse
  File "/data/toby/mambaforge/envs/vcf2gwas/lib/python3.9/site-packages/scipy/__init__.py", line 134, in __getattr__
    return _importlib.import_module(f'scipy.{name}')
  File "/data/toby/mambaforge/envs/vcf2gwas/lib/python3.9/importlib/__init__.py", line 127, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "/data/toby/mambaforge/envs/vcf2gwas/lib/python3.9/site-packages/scipy/sparse/__init__.py", line 294, in <module>
    from ._base import *
  File "/data/toby/mambaforge/envs/vcf2gwas/lib/python3.9/site-packages/scipy/sparse/_base.py", line 5, in <module>
    from scipy._lib._util import VisibleDeprecationWarning
  File "/data/toby/mambaforge/envs/vcf2gwas/lib/python3.9/site-packages/scipy/_lib/_util.py", line 18, in <module>
    from scipy._lib._array_api import array_namespace
  File "/data/toby/mambaforge/envs/vcf2gwas/lib/python3.9/site-packages/scipy/_lib/_array_api.py", line 17, in <module>
    from scipy._lib.array_api_compat import (
  File "/data/toby/mambaforge/envs/vcf2gwas/lib/python3.9/site-packages/scipy/_lib/array_api_compat/numpy/__init__.py", line 16, in <module>
    __import__(__package__ + '.linalg')
  File "/data/toby/mambaforge/envs/vcf2gwas/lib/python3.9/site-packages/scipy/_lib/array_api_compat/numpy/linalg.py", line 2, in <module>
    from numpy.linalg import __all__ as linalg_all
ImportError: cannot import name '__all__' from 'numpy.linalg' (/data/toby/mambaforge/envs/vcf2gwas/lib/python3.9/site-packages/numpy/linalg/__init__.py)

Activity

TobyBaril

TobyBaril commented on May 23, 2024

@TobyBaril
Author

As an extra note, it seems the recipe specifies a compatible version (numpy=1.23), but the environment consistently installs v1.20.3 for some reason...

tottlefields

tottlefields commented on Jul 2, 2024

@tottlefields

I am having the same issue. I love this package and would really like to get it to work for me again, please!

TobyBaril

TobyBaril commented on May 8, 2025

@TobyBaril
Author

A long time later but activating the env and then installing numpy 1.23 manually with pip works!

pip install numpy==1.23

It will throw a warning that it could not successfully parse the requirements of vcf2gwas which I think is what is causing the issues in the first place, but the test then completes successfully!

WARNING: Error parsing dependencies of vcf2gwas: Expected matching RIGHT_PARENTHESIS for LEFT_PARENTHESIS, after version specifier
    numpy (==1.20*)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

      Development

      No branches or pull requests

        Participants

        @tottlefields@TobyBaril

        Issue actions

          Unable to successfully install vcf2gwas in new conda environment - numpy dependency version problems · Issue #45 · frankvogt/vcf2gwas