franciscozorrilla / metaGEM

:gem: An easy-to-use workflow for generating context specific genome-scale metabolic models and predicting metabolic interactions within microbial communities directly from metagenomic data
https://franciscozorrilla.github.io/metaGEM/
MIT License
203 stars 42 forks source link

Install Problem #115

Closed LiZhihua1982 closed 1 year ago

LiZhihua1982 commented 1 year ago

(mamba) lizhihua@lizhihua-T640:/media/lizhihua/software/metaGEM$ mamba env create --prefix ./envs/metagem -f envs/metaGEM_env.yml && source activate envs/metagem && pip install --user memote carveme smetana && echo conda-forge/linux-64 ??.?MB @ ??.?MB/s 0 failed 7.1s

>>>>>>>>>>>>>>>>>>>>>> ERROR REPORT <<<<<<<<<<<<<<<<<<<<<<

Traceback (most recent call last):
  File "/home/lizhihua/miniconda3/envs/mamba/lib/python3.11/site-packages/conda/exceptions.py", line 1129, in __call__
    return func(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^
  File "/home/lizhihua/miniconda3/envs/mamba/lib/python3.11/site-packages/conda_env/cli/main.py", line 80, in do_call
    exit_code = getattr(module, func_name)(args, parser)
                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/lizhihua/miniconda3/envs/mamba/lib/python3.11/site-packages/conda/notices/core.py", line 72, in wrapper
    return_value = func(*args, **kwargs)
                   ^^^^^^^^^^^^^^^^^^^^^
  File "/home/lizhihua/miniconda3/envs/mamba/lib/python3.11/site-packages/conda_env/cli/main_create.py", line 156, in execute
    result[installer_type] = installer.install(prefix, pkg_specs, args, env)
                             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/lizhihua/miniconda3/envs/mamba/lib/python3.11/site-packages/mamba/mamba_env.py", line 55, in mamba_install
    index = load_channels(pool, channel_urls, repos, prepend=False)
            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/lizhihua/miniconda3/envs/mamba/lib/python3.11/site-packages/mamba/utils.py", line 129, in load_channels
    index = get_index(
            ^^^^^^^^^^
  File "/home/lizhihua/miniconda3/envs/mamba/lib/python3.11/site-packages/mamba/utils.py", line 110, in get_index
    is_downloaded = dlist.download(api.MAMBA_DOWNLOAD_FAILFAST)
                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
RuntimeError: Download error (28) Timeout was reached [https://conda.anaconda.org/conda-forge/noarch/repodata.json]
Failed to connect to conda.anaconda.org port 443 after 7059 ms: Couldn't connect to server

$ /home/lizhihua/miniconda3/envs/mamba/bin/mamba create --prefix ./envs/metagem -f envs/metaGEM_env.yml

environment variables: CIO_TEST= CONDA_AUTO_UPDATE_CONDA=false CONDA_DEFAULT_ENV=mamba CONDA_EXE=/home/lizhihua/miniconda3/bin/conda CONDA_PREFIX=/home/lizhihua/miniconda3/envs/mamba CONDA_PREFIX_1=/home/lizhihua/miniconda3 CONDA_PROMPT_MODIFIER=(mamba) CONDA_PYTHON_EXE=/home/lizhihua/miniconda3/bin/python CONDA_ROOT=/home/lizhihua/miniconda3/envs/mamba CONDA_SHLVL=2 CURL_CA_BUNDLE= PATH=/home/lizhihua/miniconda3/envs/mamba/bin:/home/lizhihua/miniconda3/con dabin:/usr/local/bin:/usr/local/bin:yes:yes:yes:yes:/usr/local/bin:/ho me/lizhihua/.local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/b in:/sbin:/bin:/usr/games:/usr/local/games:/media/lizhihua/software/gen e_annotation/GeneMark-EX/V4.46/gm_et_linux_64:/snap/bin REQUESTS_CA_BUNDLE= SSL_CERT_FILE= WINDOWPATH=2

 active environment : base
active env location : /home/lizhihua/miniconda3/envs/mamba
        shell level : 2
   user config file : /home/lizhihua/.condarc

populated config files : /home/lizhihua/.condarc conda version : 22.9.0 conda-build version : not installed python version : 3.11.0.final.0 virtual packages : linux=4.15.0=0 glibc=2.27=0 unix=0=0 archspec=1=x86_64 base environment : /home/lizhihua/miniconda3/envs/mamba (writable) conda av data dir : /home/lizhihua/miniconda3/envs/mamba/etc/conda conda av metadata url : None channel URLs : https://conda.anaconda.org/imp/linux-64 https://conda.anaconda.org/imp/noarch https://conda.anaconda.org/bioconda/linux-64 https://conda.anaconda.org/bioconda/noarch https://conda.anaconda.org/conda-forge/linux-64 https://conda.anaconda.org/conda-forge/noarch https://repo.anaconda.com/pkgs/main/linux-64 https://repo.anaconda.com/pkgs/main/noarch https://repo.anaconda.com/pkgs/r/linux-64 https://repo.anaconda.com/pkgs/r/noarch https://mirrors.ustc.edu.cn/anaconda/pkgs/free/linux-64 https://mirrors.ustc.edu.cn/anaconda/pkgs/free/noarch https://conda.anaconda.org/r/linux-64 https://conda.anaconda.org/r/noarch package cache : /home/lizhihua/miniconda3/envs/mamba/pkgs /home/lizhihua/.conda/pkgs envs directories : /home/lizhihua/miniconda3/envs/mamba/envs /home/lizhihua/.conda/envs platform : linux-64 user-agent : conda/22.9.0 requests/2.28.1 CPython/3.11.0 Linux/4.15.0-197-generic ubuntu/18.04 glibc/2.27 UID:GID : 1000:1000 netrc file : None offline mode : False

An unexpected error has occurred. Conda has prepared the above report.

(mamba) lizhihua@lizhihua-T640:/media/lizhihua/software/metaGEM$ mamba env create --prefix ./envs/metawrap -f envs/metaWRAP_env.yml ursky/linux-64 ??.?MB @ ??.?MB/s 0 failed 7.1s

>>>>>>>>>>>>>>>>>>>>>> ERROR REPORT <<<<<<<<<<<<<<<<<<<<<<

Traceback (most recent call last):
  File "/home/lizhihua/miniconda3/envs/mamba/lib/python3.11/site-packages/conda/exceptions.py", line 1129, in __call__
    return func(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^
  File "/home/lizhihua/miniconda3/envs/mamba/lib/python3.11/site-packages/conda_env/cli/main.py", line 80, in do_call
    exit_code = getattr(module, func_name)(args, parser)
                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/lizhihua/miniconda3/envs/mamba/lib/python3.11/site-packages/conda/notices/core.py", line 72, in wrapper
    return_value = func(*args, **kwargs)
                   ^^^^^^^^^^^^^^^^^^^^^
  File "/home/lizhihua/miniconda3/envs/mamba/lib/python3.11/site-packages/conda_env/cli/main_create.py", line 156, in execute
    result[installer_type] = installer.install(prefix, pkg_specs, args, env)
                             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/lizhihua/miniconda3/envs/mamba/lib/python3.11/site-packages/mamba/mamba_env.py", line 55, in mamba_install
    index = load_channels(pool, channel_urls, repos, prepend=False)
            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/lizhihua/miniconda3/envs/mamba/lib/python3.11/site-packages/mamba/utils.py", line 129, in load_channels
    index = get_index(
            ^^^^^^^^^^
  File "/home/lizhihua/miniconda3/envs/mamba/lib/python3.11/site-packages/mamba/utils.py", line 110, in get_index
    is_downloaded = dlist.download(api.MAMBA_DOWNLOAD_FAILFAST)
                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
RuntimeError: Download error (28) Timeout was reached [https://conda.anaconda.org/ursky/noarch/repodata.json]
Failed to connect to conda.anaconda.org port 443 after 7052 ms: Couldn't connect to server

$ /home/lizhihua/miniconda3/envs/mamba/bin/mamba create --prefix ./envs/metawrap -f envs/metaWRAP_env.yml

environment variables: CIO_TEST= CONDA_AUTO_UPDATE_CONDA=false CONDA_DEFAULT_ENV=mamba CONDA_EXE=/home/lizhihua/miniconda3/bin/conda CONDA_PREFIX=/home/lizhihua/miniconda3/envs/mamba CONDA_PREFIX_1=/home/lizhihua/miniconda3 CONDA_PROMPT_MODIFIER=(mamba) CONDA_PYTHON_EXE=/home/lizhihua/miniconda3/bin/python CONDA_ROOT=/home/lizhihua/miniconda3/envs/mamba CONDA_SHLVL=2 CURL_CA_BUNDLE= PATH=/home/lizhihua/miniconda3/envs/mamba/bin:/home/lizhihua/miniconda3/con dabin:/usr/local/bin:/usr/local/bin:yes:yes:yes:yes:/usr/local/bin:/ho me/lizhihua/.local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/b in:/sbin:/bin:/usr/games:/usr/local/games:/media/lizhihua/software/gen e_annotation/GeneMark-EX/V4.46/gm_et_linux_64:/snap/bin REQUESTS_CA_BUNDLE= SSL_CERT_FILE= WINDOWPATH=2

 active environment : base
active env location : /home/lizhihua/miniconda3/envs/mamba
        shell level : 2
   user config file : /home/lizhihua/.condarc

populated config files : /home/lizhihua/.condarc conda version : 22.9.0 conda-build version : not installed python version : 3.11.0.final.0 virtual packages : linux=4.15.0=0 glibc=2.27=0 unix=0=0 archspec=1=x86_64 base environment : /home/lizhihua/miniconda3/envs/mamba (writable) conda av data dir : /home/lizhihua/miniconda3/envs/mamba/etc/conda conda av metadata url : None channel URLs : https://conda.anaconda.org/imp/linux-64 https://conda.anaconda.org/imp/noarch https://conda.anaconda.org/bioconda/linux-64 https://conda.anaconda.org/bioconda/noarch https://conda.anaconda.org/conda-forge/linux-64 https://conda.anaconda.org/conda-forge/noarch https://repo.anaconda.com/pkgs/main/linux-64 https://repo.anaconda.com/pkgs/main/noarch https://repo.anaconda.com/pkgs/r/linux-64 https://repo.anaconda.com/pkgs/r/noarch https://mirrors.ustc.edu.cn/anaconda/pkgs/free/linux-64 https://mirrors.ustc.edu.cn/anaconda/pkgs/free/noarch https://conda.anaconda.org/r/linux-64 https://conda.anaconda.org/r/noarch package cache : /home/lizhihua/miniconda3/envs/mamba/pkgs /home/lizhihua/.conda/pkgs envs directories : /home/lizhihua/miniconda3/envs/mamba/envs /home/lizhihua/.conda/envs platform : linux-64 user-agent : conda/22.9.0 requests/2.28.1 CPython/3.11.0 Linux/4.15.0-197-generic ubuntu/18.04 glibc/2.27 UID:GID : 1000:1000 netrc file : None offline mode : False

An unexpected error has occurred. Conda has prepared the above report.

LiZhihua1982 commented 1 year ago
  1. CPLEX Unfortunately CPLEX cannot be automatically installed in the env_setup.sh script, you must install this dependency manually within the metagem conda environment. GEM reconstruction and GEM community simulations require the IBM CPLEX solver, which is free to download with an academic license. Refer to the CarveMe and SMETANA installation instructions for further information or troubleshooting. Note: CPLEX v.12.8 is recommended.

I have downloaded the cplex from cplex_entserv128.linux-x86-64.bin and install

=============================================================================== Choose Install Folder

Choose a destination folder for this installation.

Where would you like to install?

Default Install Folder: /opt/ibm/ILOG/CPLEX_Enterprise_Server128

ENTER AN ABSOLUTE PATH, OR PRESS TO ACCEPT THE DEFAULT : /media/lizhihua/software/metaGEM/envs/metagem/bin/

INSTALL FOLDER IS: /media/lizhihua/software/me IS THIS CORRECT? (Y/N): N

ENTER AN ABSOLUTE PATH, OR PRESS TO ACCEPT THE DEFAULT : /media/lizhihua/software/metaGEM/envs/metagem/bin/

INSTALL FOLDER IS: /media/lizhihua/software/metaGEM/envs/metagem/bin IS THIS CORRECT? (Y/N): y

=============================================================================== Pre-Installation Summary

Please Review the Following Before Continuing:

Product Name: IBM ILOG CPLEX Enterprise Server 12.8.0

Install Folder: /media/lizhihua/software/metaGEM/envs/metagem/bin

Disk Space Information (for Installation Target): Required: 1,890.6 MegaBytes Available: 397,812.63 MegaBytes

PRESS TO CONTINUE:

=============================================================================== Installing...

[==================|==================|==================|==================] [------------------|------------------|------------------|------------------]

=============================================================================== Please Wait

=============================================================================== Please Wait

=============================================================================== Install Complete

The installation of IBM ILOG CPLEX Enterprise Server 12.8.0 is complete, but some errors occurred during the install. Please see the installation log for details in:
/media/lizhihua/software/metaGEM/envs/metagem/bin/Uninstall/Logs/. Press "ENTER" to quit the installer.

LiZhihua1982 commented 1 year ago

Summary

Installation: Successful null /media/lizhihua/software/metaGEM/envs/metagem/bin/Uninstall/Logs/.
223 Successes 1 Warnings 0 NonFatalErrors 0 FatalErrors So I think it is successes

franciscozorrilla commented 1 year ago

Hi Li,

Sorry to hear you are having problems with the installation.

Failed to connect to conda.anaconda.org port 443 after 7059 ms: Couldn't connect to server

Based on this repeated error message it appears that you are having some connection issues. Have a look on google/github issues, I think this is a problem with windows. Make sure your connection is working and that you are able to download/install conda packages as expected.

Regarding CPLEX, also make sure you set up the python API as detailed here.

Best, Francisco

LiZhihua1982 commented 1 year ago

Hi, Francisco, Thank you very much! Another issue: (base) lizhihua@lizhihua-T640:/media/lizhihua/software/metaGEM$ snakemake -s Snakefile --use-conda --rerun-incomplete --cores 28 -p NameError in line 395 of /media/lizhihua/software/metaGEM/Snakefile: name 'directory' is not defined File "/media/lizhihua/software/metaGEM/Snakefile", line 395, in

rule crossMapSeries: input: contigs = rules.megahit.output, reads = f'{config["path"]["root"]}/{config["folder"]["qfiltered"]}' output: concoct = directory(f'{config["path"]["root"]}/{config["folder"]["concoct"]}/{{IDs}}/cov'), metabat = directory(f'{config["path"]["root"]}/{config["folder"]["metabat"]}/{{IDs}}/cov'), maxbin = directory(f'{config["path"]["root"]}/{config["folder"]["maxbin"]}/{{IDs}}/cov') benchmark:

franciscozorrilla commented 1 year ago

Hi Li,

I have not seen that issue either, but a quick google search of your error message suggests that the error is because there are folders missing.

Try running the createFolders rule to generate them, e.g.

bash metaGEM.sh --task createFolders

In the future if you have unrelated issues please open a new one 👍

Best, Francisco