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

ImportError: cannot import name 'gc_fraction' from 'Bio.SeqUtils' #273

Open
ammaraziz opened this issue Nov 8, 2024 · 0 comments
Open

Comments

@ammaraziz
Copy link

Hi,

While trying to install iss, I ran into this issue:

Traceback (most recent call last):
  File "/Users/aaziz/miniforge3/envs/test/bin/iss", line 6, in <module>
    from iss.app import main
  File "/Users/aaziz/miniforge3/envs/test/lib/python3.7/site-packages/iss/app.py", line 13, in <module>
    from iss.generator import (
  File "/Users/aaziz/miniforge3/envs/test/lib/python3.7/site-packages/iss/generator.py", line 14, in <module>
    from Bio.SeqUtils import gc_fraction
ImportError: cannot import name 'gc_fraction' from 'Bio.SeqUtils' (/Users/aaziz/miniforge3/envs/test/lib/python3.7/site-packages/Bio/SeqUtils/__init__.py)

The version of biopython was:

biopython          1.79

It's pinned:

install_requires=["numpy", "scipy", "biopython>=1.79", "pysam>=0.15.1", "requests"],

Reinstalling it in a fresh conda envrionment, I have no issue running the iss generate command:

  + biopython                   1.84  py312hbd25219_0     conda-forge/osx-64        3MB
  + brotli-python              1.1.0  py312h5861a67_2     conda-forge/osx-64     Cached
  + bzip2                      1.0.8  hfdf4475_7          conda-forge/osx-64     Cached
  + c-ares                    1.34.2  h32b1619_0          conda-forge/osx-64     Cached
  + ca-certificates        2024.8.30  h8857fd0_0          conda-forge/osx-64     Cached
  + certifi                2024.8.30  pyhd8ed1ab_0        conda-forge/noarch     Cached
  + cffi                      1.17.1  py312hf857d28_0     conda-forge/osx-64     Cached
  + charset-normalizer         3.4.0  pyhd8ed1ab_0        conda-forge/noarch     Cached
  + future                     1.0.0  pyhd8ed1ab_0        conda-forge/noarch      364kB
  + h2                         4.1.0  pyhd8ed1ab_0        conda-forge/noarch     Cached
  + hpack                      4.0.0  pyh9f0ad1d_0        conda-forge/noarch     Cached
  + hyperframe                 6.0.1  pyhd8ed1ab_0        conda-forge/noarch     Cached
  + idna                        3.10  pyhd8ed1ab_0        conda-forge/noarch     Cached
  + insilicoseq                2.0.1  pyh7cba7a3_0        bioconda/noarch        Cached
  + joblib                     1.4.2  pyhd8ed1ab_0        conda-forge/noarch      220kB
  + krb5                      1.21.3  h37d8d59_0          conda-forge/osx-64     Cached
  + libblas                    3.9.0  25_osx64_openblas   conda-forge/osx-64       16kB
  + libcblas                   3.9.0  25_osx64_openblas   conda-forge/osx-64       16kB
  + libcurl                   8.10.1  h58e7537_0          conda-forge/osx-64      403kB
  + libcxx                    19.1.3  hf95d169_0          conda-forge/osx-64     Cached
  + libdeflate                  1.21  hfdf4475_0          conda-forge/osx-64     Cached
  + libedit             3.1.20191231  h0678c8f_2          conda-forge/osx-64     Cached
  + libev                       4.33  h10d778d_2          conda-forge/osx-64     Cached
  + libexpat                   2.6.4  h240833e_0          conda-forge/osx-64       71kB
  + libffi                     3.4.2  h0d85af4_5          conda-forge/osx-64     Cached
  + libgfortran                5.0.0  13_2_0_h97931a8_3   conda-forge/osx-64      110kB
  + libgfortran5              13.2.0  h2873a65_3          conda-forge/osx-64     Cached
  + liblapack                  3.9.0  25_osx64_openblas   conda-forge/osx-64       16kB
  + libnghttp2                1.64.0  hc7306c3_0          conda-forge/osx-64      607kB
  + libopenblas               0.3.28  openmp_hbf64a52_1   conda-forge/osx-64     Cached
  + libsqlite                 3.47.0  h2f8c449_1          conda-forge/osx-64      915kB
  + libssh2                   1.11.0  hd019ec5_0          conda-forge/osx-64     Cached
  + libzlib                    1.3.1  hd23fc13_2          conda-forge/osx-64       57kB
  + llvm-openmp               19.1.3  hf78d878_0          conda-forge/osx-64     Cached
  + ncurses                      6.5  hf036a51_1          conda-forge/osx-64     Cached
  + numpy                      2.1.3  py312hfc93d17_0     conda-forge/osx-64        8MB
  + openssl                    3.3.2  hd23fc13_0          conda-forge/osx-64     Cached
  + pip                       24.3.1  pyh8b19718_0        conda-forge/noarch     Cached
  + pycparser                   2.22  pyhd8ed1ab_0        conda-forge/noarch     Cached
  + pysam                     0.22.1  py312h7023193_2     bioconda/osx-64        Cached
  + pysocks                    1.7.1  pyha2e5f31_6        conda-forge/noarch     Cached
  + python                    3.12.7  h8f8b54e_0_cpython  conda-forge/osx-64       14MB
  + python_abi                  3.12  5_cp312             conda-forge/osx-64        6kB
  + readline                     8.2  h9e318b2_1          conda-forge/osx-64     Cached
  + requests                  2.32.3  pyhd8ed1ab_0        conda-forge/noarch     Cached
  + scipy                     1.14.1  py312h888eae2_1     conda-forge/osx-64       16MB
  + setuptools                75.3.0  pyhd8ed1ab_0        conda-forge/noarch     Cached
  + tk                        8.6.13  h1abcd95_1          conda-forge/osx-64     Cached
  + tzdata                     2024b  hc8b5060_0          conda-forge/noarch     Cached
  + urllib3                    2.2.3  pyhd8ed1ab_0        conda-forge/noarch     Cached
  + wheel                     0.44.0  pyhd8ed1ab_0        conda-forge/noarch     Cached
  + xz                         5.2.6  h775f41a_0          conda-forge/osx-64     Cached
  + zstandard                 0.23.0  py312h7122b0e_1     conda-forge/osx-64     Cached
  + zstd                       1.5.6  h915ae27_0          conda-forge/osx-64     Cached

biopython versions are crazy, maybe a more strict version pinning would avoid the above issue.

Thanks!

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

1 participant