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

How to install on M1 mac in python 3.9 environment? #324

Closed
hiroalchem opened this issue Mar 24, 2022 · 16 comments
Closed

How to install on M1 mac in python 3.9 environment? #324

hiroalchem opened this issue Mar 24, 2022 · 16 comments

Comments

@hiroalchem
Copy link

I tried to install it in the following way
conda create -n omero -c ome python=3.9 zeroc-ice36-python omero-py
I get the following error and cannot install, what should I do?

PackagesNotFoundError: The following packages are not available from current channels:

  - zeroc-ice36-python

Current channels:

  - https://conda.anaconda.org/ome/osx-arm64
  - https://conda.anaconda.org/ome/noarch
  - https://conda.anaconda.org/conda-forge/osx-arm64
  - https://conda.anaconda.org/conda-forge/noarch

To search for alternate channels that may provide the conda package you're
looking for, navigate to

    https://anaconda.org

and use the search bar at the top of the page.
@will-moore
Copy link
Member

This is probably not much help, but that command worked fine for me:

$ which conda
/Users/wmoore/opt/anaconda3/condabin/conda
$ conda --version
conda 4.10.3

$ conda create -n omero2 -c ome python=3.9 zeroc-ice36-python omero-py
...
The following NEW packages will be INSTALLED:
...
zeroc-ice36-python ome/osx-64::zeroc-ice36-python-3.6.5-py39h141701c_7
...
$ conda activate omero2
...
$ omero login      # worked OK

$ pip freeze | grep zeroc
zeroc-ice @ file:///usr/local/miniconda/conda-bld/zeroc-ice36-python_1606217156867/work

I forget how I installed conda or whether I chose Anaconda or Miniconda (both appear above) but I think it was Anaconda
https://www.anaconda.com/products/individual#Downloads

@manics
Copy link
Member

manics commented Mar 24, 2022

https://github.com/ome/conda-zeroc-ice36-python will need an osx-arm64 build to support M1 Macs

@hiroalchem
Copy link
Author

@will-moore Thanks.
So, as @manics pointed out, it is still an M1 mac issue and needs to be built, right?
Is the conda-zeroc-ice36-python going to have an osx-arm64 build ready? Or should I build it myself? If there is a way to do this, I would be very grateful if someone could tell me how to do it.

@will-moore
Copy link
Member

I don't know what @manics means. I just know that I have an M1 Mac and the commands above worked for me without having to "build" anything.

Screenshot 2022-03-25 at 10 24 43

Did you install conda via Anaconda or miniconda. I think I used Anaconda.

@manics
Copy link
Member

manics commented Mar 25, 2022

Sorry, I think @will-moore is right, it's possible to run cross-architecture binaries, see e.g. https://towardsdatascience.com/using-conda-on-an-m1-mac-b2df5608a141

@jburel
Copy link
Member

jburel commented Mar 25, 2022

I tested it again and it works for me too on M1
The command can actually be simplified i.e. conda create -n omero -c ome python=3.9 omero-py

@hiroalchem
Copy link
Author

I have not been able to get it to work yet, could it be the Rosseta environment?

@jburel
Copy link
Member

jburel commented Mar 25, 2022

I have installed Anaconda. There is also https://github.com/conda-forge/miniforge#miniforge3 (I have not tried it).
What are you using?

@hiroalchem
Copy link
Author

I have installed miniforge3.
I am not using Rosetta, is that the reason?

conda create -n omero -c ome python=3.9 omero-py
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: The following specifications were found to be incompatible with each other:

Output in format: Requested package -> Available versions

Package python conflicts for:
python=3.9
omero-py -> python=3
omero-py -> appdirs -> python[version='>=3.10,<3.11.0a0|>=3.10,<3.11.0a0|>=3.8,<3.9.0a0|>=3.9,<3.10.0a0|>=3.9,<3.10.0a0|>=3.6',build=*_cpython]

@jburel
Copy link
Member

jburel commented Mar 28, 2022

It could be, we are also new to M1.
We are using Rosetta.

@hiroalchem
Copy link
Author

It worked well in the Rosetta environment. Thank you very much. However, due to other libraries, I want to run it in the M1 mac native environment. Is there any way to do this?

@hiroalchem
Copy link
Author

After installing ice with brew, I installed zeroc-ice with pip and was able to install it in a native environment on M1 mac. However, in this case version 3.7.7 was installed. omero-py specifies version <3.7, is there a problem with 3.7?

@jburel
Copy link
Member

jburel commented Apr 2, 2022

There is no problem with Ice 3.7 as such. We do not support it. So unfortunately the setup using ice 3.7 won't work.

@imagesc-bot
Copy link

This issue has been mentioned on Image.sc Forum. There might be relevant details there:

https://forum.image.sc/t/unable-to-install-zeroc-ice-when-using-omero-py-in-m1-macs-native-environment/65311/3

@will-moore
Copy link
Member

@hiroalchem You say you've been using miniforge3. Have you tried Anaconda (https://www.anaconda.com/products/individual#Downloads)?

@hiroalchem
Copy link
Author

Thank you @manics, I was able to install from conda-forge.

@sbesson sbesson closed this as completed Apr 14, 2022
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

6 participants