tseemann / nullarbor

:floppy_disk: :page_with_curl: "Reads to report" for public health and clinical microbiology
GNU General Public License v2.0
134 stars 37 forks source link

Installing Nullabor 2.0 conflicts with existing Python 3.7.1 #232

Closed sharbie88 closed 5 years ago

sharbie88 commented 5 years ago

I'm using conda/bioconda to install Nullabor and have a couple of problems that appear to be centred around python 3.7.1.

Firstly, I have frozen/flexible environment issues that appear at the start of every installation attempt. (I haven't included them in every copy below, as they're repeated every time.)

Secondly, I have unsatisfiable errors related to my Python installation. I attempted to resolve the samtools issue within - apparently it's looking for openssl=1.0, but finding 1.1.1 - but that didn't work. I also attempted to install centrifuge, but this also had (besides the frozen/flexible environment issues above) python problems.

Ubuntu 18.04 ~/.condarc is channels: -conda-forge -bioconda -defaults channel_priority: false

conda is 4.7.11 pip is 19.2.2 samtools 1.9 conda-forge::python-3.7.3-h33d41f4_1

Firstly: frozen/flexible issues and nullabor install:

Collecting package metadata (current_repodata.json): done
Solving environment: failed with initial frozen solve. Retrying with flexible solve.
Solving environment: failed with repodata from current_repodata.json, will retry with next repodata source.
Collecting package metadata (repodata.json): done
Solving environment: failed with initial 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 

Secondly, nullabor/python problems:

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

  - nullarbor -> python[version='2.7.*|3.5.*|3.6.*|<3|>=2.7,<2.8.0a0|>=3.5,<3.6.0a0|>=3.6,<3.7.0a0']

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.  Your current python version
is (python=3.7).  Note that conda will not change your python version to a different minor version
unless you explicitly specify that.

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

Package certifi conflicts for:
nullarbor -> centrifuge -> python[version='>=3.5,<3.6.0a0'] -> pip -> setuptools -> certifi[version='>=2016.09']
python=3.7 -> pip -> setuptools -> certifi[version='>=2016.09']
Package wheel conflicts for:
nullarbor -> centrifuge -> python[version='>=3.5,<3.6.0a0'] -> pip -> wheel
python=3.7 -> pip -> wheel
Package setuptools conflicts for:
python=3.7 -> pip -> setuptools
nullarbor -> centrifuge -> python[version='>=3.5,<3.6.0a0'] -> pip -> setuptools
Package pip conflicts for:
nullarbor -> centrifuge -> python[version='>=3.5,<3.6.0a0'] -> pip
python=3.7 -> pip
Package ca-certificates conflicts for:
python=3.7 -> openssl[version='>=1.1.1c,<1.1.2a'] -> ca-certificates
nullarbor -> samtools[version='>=1.8'] -> openssl[version='>=1.0.2p,<1.0.3a'] -> ca-certificates

I tried to overcome the samtools 1.1.1 v 1.0 issue using the following, but it mustn't have worked

conda install -c bioconda samtools openssl=1.0

next attempt at nullabor installation produced:

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

  - nullarbor -> python[version='2.7.*|3.5.*|3.6.*|<3|>=2.7,<2.8.0a0|>=3.5,<3.6.0a0|>=3.6,<3.7.0a0']

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.  Your current python version
is (python=3.7).  Note that conda will not change your python version to a different minor version
unless you explicitly specify that.

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

Package pip conflicts for:
nullarbor -> centrifuge -> python[version='>=3.5,<3.6.0a0'] -> pip
python=3.7 -> pip
Package ca-certificates conflicts for:
nullarbor -> samtools[version='>=1.8'] -> openssl[version='>=1.0.2r,<1.0.3a'] -> ca-certificates
python=3.7 -> openssl[version='>=1.0.2p,<1.0.3a'] -> ca-certificates
Package setuptools conflicts for:
python=3.7 -> pip -> setuptools
nullarbor -> centrifuge -> python[version='>=3.5,<3.6.0a0'] -> pip -> setuptools
Package wheel conflicts for:
nullarbor -> centrifuge -> python[version='>=3.5,<3.6.0a0'] -> pip -> wheel
python=3.7 -> pip -> wheel
Package certifi conflicts for:
nullarbor -> centrifuge -> python[version='>=3.5,<3.6.0a0'] -> pip -> setuptools -> certifi[version='>=2016.09']
python=3.7 -> pip -> setuptools -> certifi[version='>=2016.09']

I realised I didn't have centrifuge so used conda to install and got:

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

  - centrifuge -> python[version='2.7.*|3.4.*|3.5.*|3.6.*|<3|>=2.7,<2.8.0a0|>=3.5,<3.6.0a0|>=3.6,<3.7.0a0']

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.  Your current python version
is (python=3.7).  Note that conda will not change your python version to a different minor version
unless you explicitly specify that.

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

Package setuptools conflicts for:
centrifuge -> python=3.5 -> pip -> setuptools
python=3.7 -> pip -> setuptools
Package wheel conflicts for:
python=3.7 -> pip -> wheel
centrifuge -> python=3.5 -> pip -> wheel
Package pip conflicts for:
centrifuge -> python=3.5 -> pip
python=3.7 -> pip
Package ca-certificates conflicts for:
python=3.7 -> openssl[version='>=1.1.1a,<1.1.2a'] -> ca-certificates
centrifuge -> python=3.5 -> openssl=1.0 -> ca-certificates
Package certifi conflicts for:
python=3.7 -> pip -> setuptools -> certifi[version='>=2016.09']
centrifuge -> python=3.5 -> pip -> setuptools -> certifi[version='>=2016.09']
tseemann commented 5 years ago

(I am unsure what "frozen/flexible environment issues" means)

Are you running it in its own environment?

conda create -n nullarbor_env nullarbor
conda activate nullarbor_env
nullarbor.pl --check
sharbie88 commented 5 years ago

The frozen/flexible issues were part of the "solving environment" problems. But the dedicated environment solved the issues above - thank you.

One last issue exists, however: ERROR: Please set KRAKEN_DEFAULT_DB appropriately. I pasted the following instructions into my $HOME/.bashrc, however, the error remains.

export KRAKEN_DEFAULT_DB=$HOME/minikraken_20171019_4GB
export CENTRIFUGE_DEFAULT_DB=$HOME/centrifuge-db/p_compressed+h+v

Note that I also have kraken2-2.0.7-beta in my Home folder.

tseemann commented 5 years ago

You need to actually run the commands. When you log in, bash runs the .bashrc file for you. Try logging out and in again.

(And I assume you downloaded and installed the databases too)

sharbie88 commented 5 years ago

Thanks. I logged out and back in. I have kraken2-2.0.7-beta in my Home folder and MiniKraken2 databases in home/sharb/bio folder. So I changed the .bashrc instruction to export KRAKEN_DEFAULT_DB=$HOME/bio/MiniKraken2 Rerunning nullarbor.pl --check found MiniKraken2, but now returns

ERROR: Can not find file /home/sharb/bio/MiniKraken2/database.idx required by kraken

tseemann commented 5 years ago

You are mixing Kraken1 and Kraken2 up - they are separate tools and have different databases.

You will need to install both, and set both:

export KRAKEN_DEFAULT_DB=$HOME/bio/MiniKraken
export KRAKEN2_DEFAULT_DB=$HOME/bio/MiniKraken2

You get the v1 one here: https://ccb.jhu.edu/software/kraken/dl/minikraken_20171101_4GB_dustmasked.tgz And the v2 one here: ftp://ftp.ccb.jhu.edu/pub/data/kraken2_dbs/minikraken2_v2_8GB_201904_UPDATE.tgz

I agree is it confusing - because the databases have v1 and v2 too!

Eventually I will make it easier to get up and running.

sharbie88 commented 5 years ago

medal achieved!! Thanks heaps.