BenLangmead / bowtie2

A fast and sensitive gapped read aligner
GNU General Public License v3.0
638 stars 160 forks source link

Support for Python 3.11 via Anaconda #448

Open matthewfallan opened 8 months ago

matthewfallan commented 8 months ago

I would please like Bowtie2 from Anaconda to support Python 3.11.

I attempted to install Bowtie 2.5.1 in a Conda environment with Python 3.11:

conda create -y -n foo python=3.11
conda activate foo
conda install -y -c conda-forge -c bioconda bowtie2

These commands produced the following error:

Collecting package metadata (current_repodata.json): done
Solving environment: unsuccessful initial attempt using frozen solve. Retrying with flexible solve.
Solving environment: unsuccessful attempt using repodata from current_repodata.json, retrying with next repodata source.
Collecting package metadata (repodata.json): done
Solving environment: unsuccessful initial attempt using frozen solve. Retrying with flexible solve.
Solving environment: | 
Found conflicts! Looking for incompatible packages.
This can take several minutes.  Press CTRL-C to abort.
failed                                                                                                                            

UnsatisfiableError: The following specifications were found
to be incompatible with the existing python installation in your environment:

Specifications:

  - bowtie2 -> python[version='2.7.*|3.5.*|3.6.*|>=2.7,<2.8.0a0|>=3.10,<3.11.0a0|>=3.8,<3.9.0a0|>=3.9,<3.10.0a0|>=3.6,<3.7.0a0|>=3.7,<3.8.0a0|>=3.5,<3.6.0a0|3.4.*']
  - bowtie2 -> python[version='3.10.*|3.8.*|3.9.*|3.7.*']

Your python: python=3.11

If python is on the left-most side of the chain, that's the version you've asked for.
When python appears to the right, that indicates that the thing on the left is somehow
not available for the python version you are constrained to. Note that conda will not
change your python version to a different minor version unless you explicitly specify
that.

I can successfully install Bowtie 2.5.1 using an identical command with the Python version changed to 3.10:

conda create -y -n bar python=3.10
conda activate bar
conda install -y -c conda-forge -c bioconda bowtie2

If I then try to upgrade to Python 3.11 using conda install -y -c conda-forge -c bioconda python=3.11, I get a very long error message listing all the incompatibilities and beginning with the following text:

Collecting package metadata (current_repodata.json): done
Solving environment: unsuccessful initial attempt using frozen solve. Retrying with flexible solve.
Solving environment: unsuccessful attempt using repodata from current_repodata.json, retrying with next repodata source.
Collecting package metadata (repodata.json): done
Solving environment: unsuccessful initial attempt using frozen solve. Retrying with flexible solve.
Solving environment: / 
Found conflicts! Looking for incompatible packages.
This can take several minutes.  Press CTRL-C to abort.
failed                                                                                                                         /  

UnsatisfiableError: The following specifications were found to be incompatible with a past
explicit spec that is not an explicit spec in this operation (python):

  - python=3.11

The following specifications were found to be incompatible with each other:

Output in format: Requested package -> Available versions

Package libzlib conflicts for:
sqlite -> zlib[version='>=1.2.12,<1.3.0a0'] -> libzlib[version='1.2.11|1.2.11|1.2.11|1.2.12|1.2.12|1.2.12|1.2.12|1.2.12|1.2.13',build='h6c3fc93_0|h8a1eda9_5|hfd90126_4|hfd90126_4|hfd90126_3|hfe4f2af_2|hfe4f2af_1|h6c3fc93_1014|h9173be1_1013|h9173be1_1012']
python=3.11 -> libzlib[version='>=1.2.13,<1.3.0a0']
zstd -> libzlib[version='>=1.2.11,<1.3.0a0|>=1.2.12,<1.3.0a0|>=1.2.13,<1.3.0a0']
zstd -> zlib[version='>=1.2.11,<1.3.0a0'] -> libzlib[version='1.2.11|1.2.11|1.2.11|1.2.12|1.2.12|1.2.12|1.2.12|1.2.12|1.2.13',build='h6c3fc93_0|h8a1eda9_5|hfd90126_4|hfd90126_4|hfd90126_3|hfe4f2af_2|hfe4f2af_1|h6c3fc93_1014|h9173be1_1013|h9173be1_1012']
libzlib
python=3.11 -> tk[version='>=8.6.12,<8.7.0a0'] -> libzlib[version='1.2.13|1.2.13|>=1.2.11,<1.3.0a0|>=1.2.12,<1.3.0a0',build='h8a1eda9_5|hfd90126_4']
sqlite -> libzlib[version='>=1.2.11,<1.3.0a0|>=1.2.12,<1.3.0a0|>=1.2.13,<1.3.0a0']
bowtie2 -> zlib -> libzlib[version='1.2.11|1.2.11|1.2.11|1.2.12|1.2.12|1.2.12|1.2.12|1.2.12|1.2.13',build='h6c3fc93_0|h8a1eda9_5|hfd90126_4|hfd90126_4|hfd90126_3|hfe4f2af_2|hfe4f2af_1|h6c3fc93_1014|h9173be1_1013|h9173be1_1012']
tk -> libzlib[version='>=1.2.11,<1.3.0a0|>=1.2.13,<1.3.0a0']
python_abi -> python=3.11 -> libzlib[version='>=1.2.11,<1.3.0a0|>=1.2.12,<1.3.0a0|>=1.2.13,<1.3.0a0']
bowtie2 -> libzlib[version='>=1.2.11,<1.3.0a0|>=1.2.12,<1.3.0a0|>=1.2.13,<1.3.0a0']
pip -> python[version='>=3.7'] -> libzlib[version='>=1.2.11,<1.3.0a0|>=1.2.12,<1.3.0a0|>=1.2.13,<1.3.0a0']
wheel -> python[version='>=3.7'] -> libzlib[version='>=1.2.11,<1.3.0a0|>=1.2.12,<1.3.0a0|>=1.2.13,<1.3.0a0']
zlib -> libzlib[version='1.2.11|1.2.11|1.2.11|1.2.12|1.2.12|1.2.12|1.2.12|1.2.12|1.2.13',build='h6c3fc93_0|h8a1eda9_5|hfd90126_4|hfd90126_4|hfd90126_3|hfe4f2af_2|hfe4f2af_1|h6c3fc93_1014|h9173be1_1013|h9173be1_1012']
tk -> zlib[version='>=1.2.11,<1.3.0a0'] -> libzlib[version='1.2.11|1.2.11|1.2.11|1.2.12|1.2.12|1.2.12|1.2.12|1.2.12|1.2.13',build='h6c3fc93_0|h8a1eda9_5|hfd90126_4|hfd90126_4|hfd90126_3|hfe4f2af_2|hfe4f2af_1|h6c3fc93_1014|h9173be1_1013|h9173be1_1012']

I am using a MacBook Pro with an Intel 8-Core i9 processor running macOS 13.5.2.

Given that Python 3.11.0 was released nearly a year ago (2022-10-24) and 3.12.0 was released last week (2023-10-02), it would be great if Bowtie2 could be compatible with the newer versions of Python. Personally, I have been developing a piece of software or analyzing next-generation sequencing data in Python that relies on Bowtie2. Currently, Python 3.10 is the only version of Python that the software is compatible with through Anaconda because of its dependence on Bowtie2. Thank you for your consideration, and of course for developing Bowtie2, which is the short read aligner of choice for the lab in which I work.

tfaitova1 commented 8 months ago

Same here please!

lisa-sousa commented 4 months ago

same here.

wangjiawen2013 commented 1 month ago

same here

matthewfallan commented 1 month ago

Bowtie2 version 2.5.4 (released 2024-05-23) now claims to be compatible with any version of Python.

The dependencies (listed in the Conda file pkgs/bowtie2-2.5.*/info/index.json) have changed from specifying Python 3.10 to no version of Python. Although I'm wondering if this lack of specification is a bug, as it would permit using even versions of Python that are no longer supported (including Python 2). The dependencies on python_abi and on zlib have also been removed.

Version 2.5.3:

"depends": [
    "libcxx >=14",
    "libzlib >=1.2.13,<1.3.0a0",
    "perl",
    "python >=3.10,<3.11.0a0",
    "python_abi 3.10.* *_cp310",
    "tbb >=2021.11.0",
    "zlib",
    "zstd >=1.5.5,<1.6.0a0"
  ],

Version 2.5.4:

  "depends": [
    "libcxx >=14",
    "libzlib >=1.2.13,<1.3.0a0",
    "llvm-openmp >=15.0.7",
    "perl",
    "python",
    "tbb >=2021.12.0",
    "zstd >=1.5.6,<1.6.0a0"
  ],

In any case, installing Bowtie2 version 2.5.4 into a Conda environment with Python 3.11 or 3.12 now succeeds (using the same commands as I wrote in my original post, but changing Python 3.11 to 3.12 and specifying the Bowtie2 version):

conda create -y -n foo python=3.12
conda activate foo
conda install -y -c conda-forge -c bioconda bowtie2=2.5.4