KoslickiLab / YACHT

A mathematically characterized hypothesis test for organism presence/absence in a metagenome
MIT License
29 stars 7 forks source link

install issue #30

Closed dkoslicki closed 1 year ago

dkoslicki commented 1 year ago

When running $ bash setup.sh, I got:

Requirement already satisfied: python-dateutil>=2.7 in /home/faculty/dmk333/miniforge3/envs/yacht_env/lib/python3.12/site-packages (from matplotlib->sourmash<5,>=4.8.3->pyo3-branchwater==0.8.1->-r /home/faculty/dmk333/YACHT/env/condaenv.c08zj4t8.requirements.txt (line 2)) (2.8.2)
Requirement already satisfied: six>=1.5 in /home/faculty/dmk333/miniforge3/envs/yacht_env/lib/python3.12/site-packages (from python-dateutil>=2.7->matplotlib->sourmash<5,>=4.8.3->pyo3-branchwater==0.8.1->-r /home/faculty/dmk333/YACHT/env/condaenv.c08zj4t8.requirements.txt (line 2)) (1.16.0)
Building wheels for collected packages: pyo3-branchwater
  Building wheel for pyo3-branchwater (pyproject.toml): started
  Building wheel for pyo3-branchwater (pyproject.toml): finished with status 'done'
  Created wheel for pyo3-branchwater: filename=pyo3_branchwater-0.8.1-cp312-cp312-linux_x86_64.whl size=5525277 sha256=7cbcb1d9259da09cd5f083c90c43606b66dbc3e02bfc554af39ad4e11535c92b
  Stored in directory: /tmp/pip-ephem-wheel-cache-q92xlz_6/wheels/fd/d3/6e/8aa8a30984f3497f55d5c4e25017373cc9d6f16cd7e793328c
Successfully built pyo3-branchwater
Installing collected packages: et-xmlfile, openpyxl, pyo3-branchwater
Successfully installed et-xmlfile-1.1.0 openpyxl-3.1.2 pyo3-branchwater-0.8.1
                                                                                                                                                   done
#
# To activate this environment, use
#
#     $ conda activate yacht_env
#
# To deactivate an active environment, use
#
#     $ conda deactivate

There was a problem creating the environment 'yacht_env'. Please check the error messages above.

so mamba thought everything installed successfully, but setup.sh did not.

dkoslicki commented 1 year ago

Just a warning, but:

$ bash setup.sh
Warning: you have pip-installed dependencies in your environment file, but you do not list pip itself as one of your conda dependencies.  Conda may not use the correct pip to install your packages, and they may end up in the wrong place.  Please add an explicit pip dependency.  I'm adding one for you, but still nagging you.
dkoslicki commented 1 year ago

Same error even after update with @chunyuma 's change:

Building wheels for collected packages: pyo3-branchwater
  Building wheel for pyo3-branchwater (pyproject.toml): started
  Building wheel for pyo3-branchwater (pyproject.toml): finished with status 'done'
  Created wheel for pyo3-branchwater: filename=pyo3_branchwater-0.8.1-cp312-cp312-linux_x86_64.whl size=5525277 sha256=1f5a7e7c387f13231c9bfd1ee2a8e45f8d348df7ce9684cc4b4420feda73f170
  Stored in directory: /tmp/pip-ephem-wheel-cache-eqliiv9_/wheels/fd/d3/6e/8aa8a30984f3497f55d5c4e25017373cc9d6f16cd7e793328c
Successfully built pyo3-branchwater
Installing collected packages: et-xmlfile, openpyxl, pyo3-branchwater
Successfully installed et-xmlfile-1.1.0 openpyxl-3.1.2 pyo3-branchwater-0.8.1
                                                                                                                                                   done
#
# To activate this environment, use
#
#     $ conda activate yacht_env
#
# To deactivate an active environment, use
#
#     $ conda deactivate

There was a problem creating the environment 'yacht_env'. Please check the error messages above.
chunyuma commented 1 year ago

Hi @dkoslicki, could you mind helping me run the following bash script? I would like to see the output to figure out what happens:

ENV_NAME="yacht_env"
match_env=$(conda info --envs | grep -w $ENV_NAME)
echo $match_env
if [ ! -z "$match_env" ]; then
    echo yes
else
    echo no
fi
dkoslicki commented 1 year ago
:~/pycharm/YACHT/tests$ ENV_NAME="yacht_env"
match_env=$(conda info --envs | grep -w $ENV_NAME)
echo $match_env
if [ ! -z "$match_env" ]; then
    echo yes
else
    echo no
fi
yacht_env profiling __pycache__ testdata test_unit.py test_utils.py test_workflow.py /home/faculty/dmk333/miniforge3/envs/yacht_env
yes
dkoslicki commented 1 year ago

No idea why it's outputting more than just yacht_env

chunyuma commented 1 year ago

Hi @dkoslicki, I have no idea either. It may be due to conda info --envs. I have modified the setup.sh script. Please try it again to see if it works. If not, could you please try the following command lines again to see what prints out?

ENV_NAME="yacht_env"
check=$(conda env list | cut -d" " -f 1 | grep -w $ENV_NAME | wc -l)
echo $check
if [ $check -eq 1 ]; then
    echo yes
else
    echo no
fi
dkoslicki commented 1 year ago

That worked (same for a rouge 1)!

$ ENV_NAME="yacht_env"
check=$(conda env list | cut -d" " -f 1 | grep -w $ENV_NAME | wc -l)
echo $check
if [ $check -eq 1 ]; then
    echo yes
else
    echo no
fi
1
yes
chunyuma commented 1 year ago

ok, thanks! I think we can close this issue now.