zengxiaofei / HapHiC

HapHiC: a fast, reference-independent, allele-aware scaffolding tool based on Hi-C data
https://www.nature.com/articles/s41477-024-01755-3
BSD 3-Clause "New" or "Revised" License
141 stars 10 forks source link

403 FORBIDDEN occurred when installing dependencies using conda #43

Closed zhang121a closed 3 months ago

zhang121a commented 3 months ago

Hello,I encountered an error while installing dependencies for HapHiC on the cluster using the command conda env create -f HapHiC/conda_env/environment_py312.yml: `Retrieving notices: ...working... done Channels:

UnavailableInvalidChannel: HTTP 403 FORBIDDEN for channel intel https://conda.anaconda.org/intel

The channel is not accessible or is invalid.

You will need to adjust your conda configuration to proceed. Use conda config --show channels to view your configuration's current state, and use conda config --show-sources to view config file locations. ` In order to successfully install, I tried using micromamba and adding "https://software.repos.intel.com/python/conda", but encountered similar 403 errors. Even searching for HapHiC directly using micromamba did not yield any results. How can I resolve this issue?

zengxiaofei commented 3 months ago

It's an issue caused by intel. Please upgrade HapHiC to the latest version, I have fixed this problem by updating the .yml files. Please refer to #40 and #38.

zhang121a commented 3 months ago

Thank you so much for such a quick reply! I've successfully installed HapHic! Also during the installation I encountered a situation where pip couldn't install pysam, but was able to find it with mamba, so I removed it from the yml file and installed pysam manually with mamba after successfully installing the rest of the parts. Will this have any impact? You didn't install directly with conda, which makes me wonder if there are other considerations.

zengxiaofei commented 3 months ago

You didn't install directly with conda, which makes me wonder if there are other considerations.

Because I want to control the versions of all packages to maintain HapHiC's reproducibility and provide timely updates for them at the same time.

Also during the installation I encountered a situation where pip couldn't install pysam, but was able to find it with mamba, so I removed it from the yml file and installed pysam manually with mamba after successfully installing the rest of the parts.

Could you please show me the error message?

zengxiaofei commented 3 months ago

Also during the installation I encountered a situation where pip couldn't install pysam, but was able to find it with mamba, so I removed it from the yml file and installed pysam manually with mamba after successfully installing the rest of the parts.

It seems the issue could be related to having a low GCC version. Consider installing the environment for Python 3.11 instead.

zhang121a commented 3 months ago

Of course, the error message is so long and mixed with other outputs, and the final part I think is an error message like this: ` gcc -pthread -B /public/work/env/mamba/envs/haphic/compiler_compat -fno-strict-overflow -DNDEBUG -O2 -Wall -fPIC -O2 -isystem /public/work/env/mamba/envs/haphic/include -fPIC -O2 -isystem /public/work/env/mamba/envs/haphic/include -fPIC -I/tmp/pip-install-jdeo9wc9/pysam_7bf34e81219f453cada20a7807dce25c/pysam -I/tmp/pip-install-jdeo9wc9/pysam_7bf34e81219f453cada20a7807dce25c/htslib -I/tmp/pip-install-jdeo9wc9/pysam_7bf34e81219f453cada20a7807dce25c/samtools -I/tmp/pip-install-jdeo9wc9/pysam_7bf34e81219f453cada20a7807dce25c/samtools/lz4 -I/tmp/pip-install-jdeo9wc9/pysam_7bf34e81219f453cada20a7807dce25c/bcftools -I/tmp/pip-install-jdeo9wc9/pysam_7bf34e81219f453cada20a7807dce25c -I/public/work/env/mamba/envs/haphic/include/python3.12 -c pysam/libchtslib.c -o build/temp.linux-x86_64-cpython-312/pysam/libchtslib.o -Wno-unused -Wno-strict-prototypes -Wno-sign-compare -Wno-error=declaration-after-statement In file included from pysam/libchtslib.c:2154:0: /public/work/env/mamba/envs/haphic/include/python3.12/internal/pycore_frame.h: In function ‘_PyFrame_Initialize’: /public/work/env/mamba/envs/haphic/include/python3.12/internal/pycore_frame.h:134:5: error: ‘for’ loop initial declarations are only allowed in C99 mode for (int i = null_locals_from; i < code->co_nlocalsplus; i++) { ^ /public/work/env/mamba/envs/haphic/include/python3.12/internal/pycore_frame.h:134:5: note: use option -std=c99 or -std=gnu99 to compile your code error: command '/usr/bin/gcc' failed with exit code 1 [end of output]

note: This error originates from a subprocess, and is likely not a problem with pip. ERROR: Failed building wheel for pysam Failed to build pysam ERROR: ERROR: Failed to build installable wheels for some pyproject.toml based projects (pysam) critical libmamba pip failed to install packages ` I don't understand what this error message means, but it does seem to be related to GCC. I'll try to change the python version tomorrow.

zhang121a commented 3 months ago

Also during the installation I encountered a situation where pip couldn't install pysam, but was able to find it with mamba, so I removed it from the yml file and installed pysam manually with mamba after successfully installing the rest of the parts.

It seems the issue could be related to having a low GCC version. Consider installing the environment for Python 3.11 instead.

I'm sorry I was late in replying. After using python 3.11, the installation was successful, and no error was reported. Thanks again for your help!