Shamir-Lab / SCAPP

SCAPP is a plasmid assembly tool. This tool is described in our paper: https://microbiomejournal.biomedcentral.com/articles/10.1186/s40168-021-01068-z
MIT License
29 stars 6 forks source link

Installation Failed using Conda #33

Closed lhuang3s closed 1 year ago

lhuang3s commented 1 year ago

Hi,

I tried to install the software using Conda, but failed because conda could not solve the environment. Then I tried to install it via conda using the yaml file provided, but also failed with the error message:

ERROR: No matching distribution found for numpy==1.22.0

I noticed that the installation requires the python=3.7 but numpy 1.22.0 only work on python >=3.8

Then I change the python version requirement in the yaml to 3.8 and tried again, and get the following error:

error in pysam setup command: use_2to3 is invalid.

It seems like there are some dependency conflicts in the installation. Is there a way to solve this problem? Thank you!

dpellow commented 1 year ago

OK. The conda installation should ensure that the dependencies work, so I think the first priority is to understand why conda didn't work for you. Can you give more details about what you tried and what the error was?

lhuang3s commented 1 year ago

I follow the installation guide with Conda. First I tried

conda create -y -name scapp conda install -c bioconda scapp

But after several failed solutions for the environment, and continuing solving the environment forever, I switch to the second conda installation method:

wget https://raw.githubusercontent.com/Shamir-Lab/SCAPP/master/install_scapp.yaml conda env create -f install_scapp.yaml

This time I got the error message:

ERROR: No matching distribution found for numpy==1.22.0

dpellow commented 1 year ago

OK is the error after the first line or the second? It sounds like it doesn't get to the install, is that correct? What python version is it using? Can you try to explicitly use python3.7: conda create --name scapp python=3.7. Post the full error that occurs if there is one.

lhuang3s commented 1 year ago

Sorry for the confusion! The error was actually at the end after installing several dependencies. The full error log after running conda env create -f install_scapp.yaml is put below:

Collecting package metadata (repodata.json): done Solving environment: done

Downloading and Extracting Packages

Preparing transaction: done
Verifying transaction: done Executing transaction: done Installing pip dependencies: \ Ran pip subprocess with arguments: ['/home/quintara/miniconda3/envs/scapp/bin/python', '-m', 'pip', 'install', '-U', '-r', '/home/quintara/Desktop/condaenv.055xg9nh.requirements.txt', '--exists-action=b'] Pip subprocess output: Collecting git+https://github.com/Shamir-Lab/PlasClass.git (from -r /home/quintara/Desktop/condaenv.055xg9nh.requirements.txt (line 1)) Cloning https://github.com/Shamir-Lab/PlasClass.git to /tmp/pip-req-build-tiau_zyk Resolved https://github.com/Shamir-Lab/PlasClass.git to commit 3937ba181ebd5d6fc425178eccf7f4798007b1c6 Preparing metadata (setup.py): started Preparing metadata (setup.py): finished with status 'done' Collecting git+https://github.com/Shamir-Lab/SCAPP.git (from -r /home/quintara/Desktop/condaenv.055xg9nh.requirements.txt (line 2)) Cloning https://github.com/Shamir-Lab/SCAPP.git to /tmp/pip-req-build-73f_sips Resolved https://github.com/Shamir-Lab/SCAPP.git to commit cef54e2a4c010b89ec8c6cc4de29f97d26371fe9 Preparing metadata (setup.py): started Preparing metadata (setup.py): finished with status 'done' Collecting scipy==1.3.2 Using cached scipy-1.3.2-cp37-cp37m-manylinux1_x86_64.whl (25.2 MB) Collecting scikit-learn==0.21.3 Using cached scikit_learn-0.21.3-cp37-cp37m-manylinux1_x86_64.whl (6.7 MB) Collecting joblib==1.2.0 Using cached joblib-1.2.0-py3-none-any.whl (297 kB)

Pip subprocess error: Running command git clone --filter=blob:none --quiet https://github.com/Shamir-Lab/PlasClass.git /tmp/pip-req-build-tiau_zyk Running command git clone --filter=blob:none --quiet https://github.com/Shamir-Lab/SCAPP.git /tmp/pip-req-build-73f_sips ERROR: Ignored the following versions that require a different python version: 1.1.0 Requires-Python >=3.8; 1.1.1 Requires-Python >=3.8; 1.1.2 Requires-Python >=3.8; 1.1.3 Requires-Python >=3.8; 1.10.0 Requires-Python <3.12,>=3.8; 1.10.0rc1 Requires-Python <3.12,>=3.8; 1.10.0rc2 Requires-Python <3.12,>=3.8; 1.2.0 Requires-Python >=3.8; 1.2.0rc1 Requires-Python >=3.8; 1.2.1 Requires-Python >=3.8; 1.22.0 Requires-Python >=3.8; 1.22.1 Requires-Python >=3.8; 1.22.2 Requires-Python >=3.8; 1.22.3 Requires-Python >=3.8; 1.22.4 Requires-Python >=3.8; 1.23.0 Requires-Python >=3.8; 1.23.0rc1 Requires-Python >=3.8; 1.23.0rc2 Requires-Python >=3.8; 1.23.0rc3 Requires-Python >=3.8; 1.23.1 Requires-Python >=3.8; 1.23.2 Requires-Python >=3.8; 1.23.3 Requires-Python >=3.8; 1.23.4 Requires-Python >=3.8; 1.23.5 Requires-Python >=3.8; 1.24.0 Requires-Python >=3.8; 1.24.0rc1 Requires-Python >=3.8; 1.24.0rc2 Requires-Python >=3.8; 1.24.1 Requires-Python >=3.8; 1.24.2 Requires-Python >=3.8; 1.8.0 Requires-Python >=3.8,<3.11; 1.8.0rc1 Requires-Python >=3.8,<3.11; 1.8.0rc2 Requires-Python >=3.8,<3.11; 1.8.0rc3 Requires-Python >=3.8,<3.11; 1.8.0rc4 Requires-Python >=3.8,<3.11; 1.8.1 Requires-Python >=3.8,<3.11; 1.9.0 Requires-Python >=3.8,<3.12; 1.9.0rc1 Requires-Python >=3.8,<3.12; 1.9.0rc2 Requires-Python >=3.8,<3.12; 1.9.0rc3 Requires-Python >=3.8,<3.12; 1.9.1 Requires-Python >=3.8,<3.12; 1.9.2 Requires-Python >=3.8; 1.9.3 Requires-Python >=3.8 ERROR: Could not find a version that satisfies the requirement numpy==1.22.0 (from plasclass-dpellow) (from versions: 1.3.0, 1.4.1, 1.5.0, 1.5.1, 1.6.0, 1.6.1, 1.6.2, 1.7.0, 1.7.1, 1.7.2, 1.8.0, 1.8.1, 1.8.2, 1.9.0, 1.9.1, 1.9.2, 1.9.3, 1.10.0.post2, 1.10.1, 1.10.2, 1.10.4, 1.11.0, 1.11.1, 1.11.2, 1.11.3, 1.12.0, 1.12.1, 1.13.0, 1.13.1, 1.13.3, 1.14.0, 1.14.1, 1.14.2, 1.14.3, 1.14.4, 1.14.5, 1.14.6, 1.15.0, 1.15.1, 1.15.2, 1.15.3, 1.15.4, 1.16.0, 1.16.1, 1.16.2, 1.16.3, 1.16.4, 1.16.5, 1.16.6, 1.17.0, 1.17.1, 1.17.2, 1.17.3, 1.17.4, 1.17.5, 1.18.0, 1.18.1, 1.18.2, 1.18.3, 1.18.4, 1.18.5, 1.19.0, 1.19.1, 1.19.2, 1.19.3, 1.19.4, 1.19.5, 1.20.0, 1.20.1, 1.20.2, 1.20.3, 1.21.0, 1.21.1, 1.21.2, 1.21.3, 1.21.4, 1.21.5, 1.21.6) ERROR: No matching distribution found for numpy==1.22.0

failed

CondaEnvException: Pip failed

dpellow commented 1 year ago

OK, please try to install in a python3.7 environment from bioconda and let me know what happens.

conda create --name scapp python=3.7
conda activate scapp
conda install -c bioconda scapp

Let me know if there is an error, at which stage and what the error message is. Hope that helps

lhuang3s commented 1 year ago

The installation was successful, just need to wait a bit longer for solving the environment. Thank you so much!

conda install -c bioconda scapp

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: done The following packages will be downloaded:

package                    |            build
---------------------------|-----------------
decorator-5.1.1            |     pyhd8ed1ab_0          12 KB  conda-forge
joblib-0.14.1              |     pyh9f0ad1d_0         198 KB  conda-forge
libdeflate-1.0             |       h14c3975_1          43 KB  bioconda
libgfortran-ng-7.5.0       |      h14aa051_20          23 KB  conda-forge
libgfortran4-7.5.0         |      h14aa051_20         1.2 MB  conda-forge
libopenblas-0.3.12         |pthreads_hb3c22a3_1         8.2 MB  conda-forge
networkx-2.4               |             py_1         1.2 MB  conda-forge
numpy-1.17.5               |   py37haa41c4c_1         5.3 MB  conda-forge
plasclass-0.1.1            |     pyhdfd78af_0         1.3 MB  bioconda
pysam-0.15.3               |   py37hda2845c_1         2.5 MB  bioconda
python_abi-3.7             |          3_cp37m           6 KB  conda-forge
scapp-0.1.4                |             py_0        26.0 MB  bioconda
scikit-learn-0.21.3        |   py37hcdab131_0         6.7 MB  conda-forge
scipy-1.3.2                |   py37h921218d_0        18.0 MB  conda-forge
wget-1.20.3                |       ha35d2d1_1         815 KB  conda-forge
------------------------------------------------------------
                                       Total:        71.6 MB

The following NEW packages will be INSTALLED:

blast bioconda/linux-64::blast-2.13.0-hf3cf87c_0 bwa bioconda/linux-64::bwa-0.7.17-h7132678_9 bzip2 conda-forge/linux-64::bzip2-1.0.8-h7f98852_4 c-ares conda-forge/linux-64::c-ares-1.18.1-h7f98852_0 curl conda-forge/linux-64::curl-7.87.0-hdc1c0ab_0 decorator conda-forge/noarch::decorator-5.1.1-pyhd8ed1ab_0 entrez-direct bioconda/linux-64::entrez-direct-16.2-he881be0_1 gettext conda-forge/linux-64::gettext-0.21.1-h27087fc_0 joblib conda-forge/noarch::joblib-0.14.1-pyh9f0ad1d_0 keyutils conda-forge/linux-64::keyutils-1.6.1-h166bdaf_0 krb5 conda-forge/linux-64::krb5-1.20.1-h81ceb04_0 libblas conda-forge/linux-64::libblas-3.9.0-8_openblas libcblas conda-forge/linux-64::libcblas-3.9.0-8_openblas libcurl conda-forge/linux-64::libcurl-7.87.0-hdc1c0ab_0 libdeflate bioconda/linux-64::libdeflate-1.0-h14c3975_1 libedit conda-forge/linux-64::libedit-3.1.20191231-he28a2e2_2 libev conda-forge/linux-64::libev-4.33-h516909a_1 libgfortran-ng conda-forge/linux-64::libgfortran-ng-7.5.0-h14aa051_20 libgfortran4 conda-forge/linux-64::libgfortran4-7.5.0-h14aa051_20 libidn2 conda-forge/linux-64::libidn2-2.3.4-h166bdaf_0 liblapack conda-forge/linux-64::liblapack-3.9.0-8_openblas libnghttp2 conda-forge/linux-64::libnghttp2-1.51.0-hff17c54_0 libopenblas conda-forge/linux-64::libopenblas-0.3.12-pthreads_hb3c22a3_1 libssh2 conda-forge/linux-64::libssh2-1.10.0-hf14f497_3 libunistring conda-forge/linux-64::libunistring-0.9.10-h7f98852_0 networkx conda-forge/noarch::networkx-2.4-py_1 numpy conda-forge/linux-64::numpy-1.17.5-py37haa41c4c_1 pcre conda-forge/linux-64::pcre-8.45-h9c3ff4c_0 perl conda-forge/linux-64::perl-5.26.2-h36c2ea0_1008 perl-archive-tar bioconda/linux-64::perl-archive-tar-2.32-pl526_0 perl-carp bioconda/linux-64::perl-carp-1.38-pl526_3 perl-common-sense bioconda/linux-64::perl-common-sense-3.74-pl526_2 perl-compress-raw~ bioconda/linux-64::perl-compress-raw-bzip2-2.087-pl526he1b5a44_0 perl-compress-raw~ bioconda/linux-64::perl-compress-raw-zlib-2.087-pl526hc9558a2_0 perl-exporter bioconda/linux-64::perl-exporter-5.72-pl526_1 perl-extutils-mak~ bioconda/linux-64::perl-extutils-makemaker-7.36-pl526_1 perl-io-compress bioconda/linux-64::perl-io-compress-2.087-pl526he1b5a44_0 perl-io-zlib bioconda/linux-64::perl-io-zlib-1.10-pl526_2 perl-json bioconda/linux-64::perl-json-4.02-pl526_0 perl-json-xs bioconda/linux-64::perl-json-xs-2.34-pl526_1 perl-list-moreuti~ bioconda/linux-64::perl-list-moreutils-0.15-pl526_1 perl-pathtools bioconda/linux-64::perl-pathtools-3.75-pl526h14c3975_1 perl-scalar-list-~ bioconda/linux-64::perl-scalar-list-utils-1.52-pl526h516909a_0 plasclass bioconda/noarch::plasclass-0.1.1-pyhdfd78af_0 pysam bioconda/linux-64::pysam-0.15.3-py37hda2845c_1 python_abi conda-forge/linux-64::python_abi-3.7-3_cp37m samtools bioconda/linux-64::samtools-1.6-h3f2fef4_8 scapp bioconda/noarch::scapp-0.1.4-py_0 scikit-learn conda-forge/linux-64::scikit-learn-0.21.3-py37hcdab131_0 scipy conda-forge/linux-64::scipy-1.3.2-py37h921218d_0 wget conda-forge/linux-64::wget-1.20.3-ha35d2d1_1 zlib conda-forge/linux-64::zlib-1.2.13-h166bdaf_4

Proceed ([y]/n)? y

Downloading and Extracting Packages

Preparing transaction: done
Verifying transaction: done
Executing transaction: done

dpellow commented 1 year ago

Great to hear that it worked, let us know if there are any other issues