Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

conda install issue #379

Closed
brendanofallon opened this issue Jul 27, 2023 · 13 comments
Closed

conda install issue #379

brendanofallon opened this issue Jul 27, 2023 · 13 comments

Comments

@brendanofallon
Copy link

HI there, I'm running into a strange issue trying to install omero-py via conda on RHEL 9 and Ubuntu 20.04. But the install command recommended in the documentation never works, for instance:

$ conda install -c conda-forge omero-py

Retrieving notices: ...working... done
Collecting package metadata (current_repodata.json): done
Solving environment: unsuccessful initial attempt using frozen solve. Retrying with flexible solve.
Solving environment: unsuccessful attempt using repodata from current_repodata.json, retrying with next repodata source.
Collecting package metadata (repodata.json): \ Killed

The OS always kills the conda install process midway through the install, and looks like the conda process is allocating way too much memory (just eyeballing memory usage on top, it increases rapidly while the command is running, until the OS finally just kills it). This happens repeatedly, every time I try that command, on both distros above. I'm not really sure if this is an omero-py issue, but conda appears to function normally for other packages I've tried to installed. My conda version is 23.5.2

Notably, installing from the bioconda channel (conda install -c bioconda omero-py) works fine, except that version appears to be older and requires libssl1.0, which is no longer supported (or even available) on RHEL 9.
Let me know if I can provide any more info

@manics
Copy link
Member

manics commented Jul 27, 2023

Are you using Python 3.11 by any chance? zeroc-ice 3.6 isn't available for 3.11 #360 (comment)
conda won't downgrade core packages like Python by default, instead it gets into a spiral of incompatible nested dependencies.

@brendanofallon
Copy link
Author

brendanofallon commented Jul 27, 2023

Hi, I'm using python 3.8.17 - but I just figured out that the omero-py from the 'ome' conda channel installs just fine with no issues (whew!). So to sum up: installing using the conda-forge channel runs into a weird conda issue and breaks, using the bioconda channel has a version which requires a pretty old libssl1.0 which isn't available on some newer linux distros, but the one from the ome channel worked just fine with no issues. The documentation at https://omero.readthedocs.io/en/stable/users/cli/installation.html recommends conda-forge. So maybe this is just a matter of standardizing the packages from different channels and updating the docs

@jburel
Copy link
Member

jburel commented Jul 27, 2023

Did you follow the notes from the README i.e.

conda create -n myenv -c ome python=3.8 zeroc-ice36-python
conda activate myenv
conda install -c conda-forge omero-py

@DrKenHo-crick
Copy link

Using CenOS 7 - the recommend install above and on README just doesn't work.

The above install method gives me error when I import omero.
ImportError: /home/ho/.local/lib/python3.8/site-packages/IcePy.cpython-38-x86_64-li│
nux-gnu.so: undefined symbol: sk_pop

I think it is to do with SSL version?

@DrKenHo-crick
Copy link

Using a docker container running Centos7

$docker run -it centos:7 /bin/bash
[root@65f202abd498 /]#  yum update -y
[root@65f202abd498 /]#  yum upgrade -y
[root@65f202abd498 /]#  yum install wget -y
[root@65f202abd498 /]#  wget https://repo.anaconda.com/archive/Anaconda3-2021.05-Linux-x86_64.sh
[root@65f202abd498 /]#  bash Anaconda3-2021.05-Linux-x86_64.sh
[root@65f202abd498 ~]# source ~/.bashrc
(base) [root@65f202abd498 ~]#  conda create -n omeropy -c ome python=3.8 zeroc-ice36-python
(base) [root@65f202abd498 ~]#  conda activate omeropy
(omeropy) [root@65f202abd498 ~]# conda install -c conda-forge omero-py
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.

CondaError: KeyboardInterrupt

(omeropy) [root@65f202abd498 ~]# conda install -c ome omero-py
Preparing transaction: done
Verifying transaction: done
Executing transaction: done
(omeropy) [root@65f202abd498 ~]# python
Python 3.8.18 (default, Sep 11 2023, 13:20:55)
[GCC 11.2.0] :: Anaconda, Inc. on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import omero
>>>

It seems that using -c conda-forge failed.
Was it becasuse of the older conda that I used?
==> WARNING: A newer version of conda exists. <==
current version: 4.10.1
latest version: 23.7.4{

@jburel
Copy link
Member

jburel commented Oct 3, 2023

Thanks for the report
The conda-forge channel will fail when attempting to install Ice will fail. It will install newer version of Ice (3.7)
I will check the conda-forge channel for omero-py

@DrKenHo-crick
Copy link

My earlier report is based on running on our cluster using slurm/srun. It still gives me the error and it seems to be different from centos:7 install.

@jburel
Copy link
Member

jburel commented Oct 3, 2023

I have started to use mamba instead of Conda. I found it much faster and if failure easier to find the source of the problem

@DrKenHo-crick
Copy link

Oh, thanks for the tip. I shall try mamba. I have also sorted out the error. It was to do with sys path on Python.
It actually search the module and uses a locally installed ice.py and not using the newly created conda env. By using python sys.remove the search path, the module load ok.

@will-moore
Copy link
Member

When installing as per the instructions, I find that the Collecting package metadata step takes over 10 mins.

$ conda create -n omeropy38 -c ome python=3.8 zeroc-ice36-python
$ conda activate omeropy38
$ conda install -c conda-forge omero-py
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
...

However, using pip install omero-py works much faster in a conda environment created the same way.

@psobolewskiPhD
Copy link

psobolewskiPhD commented Feb 9, 2024

Why does the README here still use -c ome for zeroc-ice given the deprecation message here:
https://github.com/ome/conda-zeroc-ice36-python

Using libmamba-solver (the default in conda now since Nov 2023 https://conda.org/blog/2023-11-06-conda-23-10-0-release):
mamba create --name omero-py -c conda-forge python=3.8 omero-py
installs in 19 s on my arm64 Mac.

@joshmoore
Copy link
Member

@brendanofallon: is this now working for you?

Why does the README here still use -c ome for zeroc-ice given the deprecation message here:

Just an oversight, @psobolewskiPhD: #397

@jburel
Copy link
Member

jburel commented Apr 29, 2024

Fixed in #407

@jburel jburel closed this as completed Apr 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants