schneebergerlab / syri

Synteny and Rearrangement Identifier
https://schneebergerlab.github.io/syri/
MIT License
306 stars 36 forks source link

conda install #134

Closed jaudall closed 2 years ago

jaudall commented 2 years ago

figured it out. Nothing to see here. Delete this thread.

mnshgl0110 commented 2 years ago

Hi @jaudall. Could you please share the solution here? It would be very helpful for users who encounter the same/similar issue in future. Thanks.

jaudall commented 2 years ago

Well, I thought I had it worked out. Below are my 2 attempts to install through conda in a clean environment. Not that between the two attempts I used conda env remove --prefix /project/cotton_genomics/syriX so it would be a clean install the second time. Unfortunately, conda's errors for library issues are not helpful.

I also cannot get it to install using git. There is something likely messed up in my conda libraries. I wouldn't be surprised if it does work for other people. I first tried to install from the page listed in the publication https://schneebergerlab.github.io/syri/install.html. But it seems that is not the current method (i.e. github). It worked, but somehow used python3.7. Not knowing, I tried to install plotsr install into the same environment, but python needs to be 3.8 ... then I tried github and ran into python version troubles. Currently, it compiles and installs using the setup.py in github distribution, but when I run it it can't find scipy module. Then when that's fixed by install scipy, it can't find the psutil module. then when that's fixed, it can't find an unknown module.

Still stuck. The errors below are not unique to syri. Google suggested that it was somehow an issue of channel switching in the package install. Others suggested using -c conda-forge, but syri isn't there. Thanks for any help.

conda create --prefix /project/cotton_genomics/syriX -c bioconda syri Collecting package metadata (current_repodata.json): done Solving environment: failed with repodata from current_repodata.json, will retry with next repodata source. Collecting package metadata (repodata.json): done Solving environment: - Found conflicts! Looking for incompatible packages. This can take several minutes. Press CTRL-C to abort. failed

UnsatisfiableError:

conda create --prefix /project/cotton_genomics/syriX conda activate /project/cotton_genomics/syriX conda install -c bioconda syri 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

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

Output in format: Requested package -> Available versionsThe following specifications were found to be incompatible with your system:

Your installed version is: 2.17

mnshgl0110 commented 2 years ago

The following command creates a new environment and installs syri (along with all the dependencies):

conda create -n syri_env -c bioconda syri

I tested it today and it is working. The glibc version error seems to be arising because of older conda versions. Probably, updating conda should solve this specific problem.

jaudall commented 2 years ago

Thanks for testing it. I don't doubt that it works. My unfortunate introduction to syri through the paper caused me to install old libraries that seems to have crossed a few conda wires in my local version.

As you suggest, my latest attempt below:

conda env remove --prefix /project/cotton_genomics/syriX

Remove all packages in environment /project/cotton_genomics/syriX:

conda create -n syriX -c bioconda syri Collecting package metadata (current_repodata.json): done Solving environment: failed with repodata from current_repodata.json, will retry with next repodata source. Collecting package metadata (repodata.json): done Solving environment: | Found conflicts! Looking for incompatible packages. This can take several minutes. Press CTRL-C to abort. failed

UnsatisfiableError:

I updated my conda, and that did update several packages. conda update --all --yes then installing syri, no luck.

I also tried conda config --set channel_priority false Then installing syri, and I'm back to the UnsatisfiableError: with glibc 2.17

mnshgl0110 commented 2 years ago

what conda version are you using?

jaudall commented 2 years ago

4.12.0 It is clearly a conda issue at this point. This error has been seen in several other packages. It seems not to be enough to start with a clean environment, but in the upgrade from python 3.7 to later something happened to my conda install.

mnshgl0110 commented 2 years ago

Hmm... I am out of good ideas right now. The current (and not so ideal solution) that I could think of is to try removing numpy and pandas (as probably they are the ones affecting consistency), and then try the conda create -n syriX -c bioconda syri command again. Or as you also think that this is a conda issue, reinstalling conda (or a second copy) could fix this and probable future issues as well.

jaudall commented 2 years ago

Here's what ultimately worked:

conda create -n syri_env -c defaults -c bioconda -c conda-forge Cython=0.29.23 numpy=1.21.2 scipy=1.6.2 pandas=1.2.4 python-igraph=0.9.1 psutil=5.8.0 pysam=0.16.0.1 matplotlib=3.3.4

conda activate syri_env

git clone https://github.com/schneebergerlab/syri.git

cd syri

python setup.py install

Note: I did this with the newer gcc/10.2.0 loaded, so if the 'python setup.py install' step fails for you, try loading gcc/10.2.0 and run it again.

mnshgl0110 commented 2 years ago

Great that you figured it out and thanks a lot for sharing your solution here. I am sure this would be helpful to many people.