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

Incompatible packages reinstalling Minian #232

Open
anna-teruel opened this issue Jan 29, 2023 · 5 comments
Open

Incompatible packages reinstalling Minian #232

anna-teruel opened this issue Jan 29, 2023 · 5 comments

Comments

@anna-teruel
Copy link

Hi all!
I have a couple of questions/issues to discuss over here (I need help!!!!).

The first question is quite simple. I have been using Minian and already got some results (A, C, S matrix). However, I don't get what matrix A is representing. Could anybody briefly explain what each row and column in matrix A is representing?

Secondly, although Minian was perfectly working on my laptop, I decided to format my laptop and reinstall everything again. I had no issues installing conda, nor with other envs such as DeepLabCut. But, when I try to install Minian I get the following conflicts:

A) If I try to install the env using conda:

(minian) annateruel@MacBook-MacBook-Pro-de-Anna minian % conda install -y -c conda-forge minian

Collecting package metadata (current_repodata.json): done
Solving environment: failed with initial frozen solve. Retrying with flexible solve.
Collecting package metadata (repodata.json): done
Solving environment: failed with initial frozen solve. Retrying with flexible solve.

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

  - minian

Current channels:

  - https://conda.anaconda.org/conda-forge/osx-arm64
  - https://conda.anaconda.org/conda-forge/noarch
  - https://repo.anaconda.com/pkgs/main/osx-arm64
  - https://repo.anaconda.com/pkgs/main/noarch
  - https://repo.anaconda.com/pkgs/r/osx-arm64
  - https://repo.anaconda.com/pkgs/r/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.

B) If I install from source: too long to post, I attach a file.

error.docx

Information about my laptop: it's a 'macOS-13.0-arm64-arm-64bit' M1, thus I installed Anaconda3-2022.10-MacOSX-arm64.sh. I first tried to create the env with miniconda but then decided to change to anaconda just in case. But I get the same error anyway. I have been checking similar issues in other forums but I didn't get the right thing to make it work.

Could anybody help me? Perhaps it's a simple question, but I don't know what it's going on. THANK YOU!

@anna-teruel
Copy link
Author

Update: I know little about this, but I assume the problem is due to arm64. I assume the minian package is only included in the conda-forge channel for 64x, not in conda-forge/osx-arm64.

Is there an easy and not time consuming way to update this and include the minian package in osx-arm64 for M1 users like me? Although I am new to this, I am willing to help.

I look forward to a answer. Thank you!

@nikolaskaralis
Copy link

nikolaskaralis commented Feb 14, 2023

Same issue here (in most systems I tried).
Note: I am trying on Intel PCs, not M1 mac.

Some more info:
conda takes infinite time for resolving the environment.
I tried with mamba, which is much faster and more informative.

I believe there is an issue/incompatibility with the dependencies.

Any clue?

See the log below:

Looking for: ['minian']

pkgs/main/noarch [====================] (00m:00s) Done
pkgs/r/win-64 [====================] (00m:00s) Done
pkgs/msys2/noarch [====================] (00m:00s) Done
pkgs/r/noarch [====================] (00m:00s) Done
pkgs/msys2/win-64 [====================] (00m:00s) Done
pkgs/main/win-64 [====================] (00m:01s) Done
conda-forge/noarch [====================] (00m:04s) Done
conda-forge/win-64 [====================] (00m:08s) Done

Pinned packages:

  • python 3.9.*

Encountered problems while solving:

  • package minian-0.2.5-py38_0 requires python >=3.8,<3.9.0a0, but none of the providers can be installed

@anna-teruel
Copy link
Author

Hi @nikolaskaralis
In the end, I managed to solve it. In my case, I installed two versions of miniconda (for arm64 and x86-64) and run minian in x86-64.
I also noticed it took very long time following installation instructions from minian readthedocs. Thus I installed it with Mamba. I asked Federico, from Miniscope team, and he suggested running following steps:

  1. conda create -y -n minainWorkshop python=3.8.5
  2. conda activate minainWorkshop
  3. conda install -y -c conda-forge mamba
  4. mamba install -y -c conda-forge minian
  5. pip install jinja2==2.11.2

I am not sure if you have tried this already, but it worked for me.
Good luck!

@nikolaskaralis
Copy link

HI @anna-teruel ,

thanks a lot for your response.
So based on this, I managed to get it to work.

For those reading this thread in the future, the problem is the following:
It seems there is a strong dependency on the particular python version.
So the trick is to indeed specify python=3.8.5
I had tried earlier the same with python=3.8 and it doesn't work.

The last command about jinja2 doesn't work for me (dependency issue).
I will see if it is necessary.

And mamba helps a lot (it is a drop-in replacement for conda that is much faster).

@droumis
Copy link

droumis commented May 26, 2023

If you are on an M1 (osx-arm64) system and need to install minian (only available for osx-64), here is one solution:

conda create -n osx-64 # create empty env for non-native platform
conda activate osx-64
conda config --env --set subdir osx-64 # set this environment to only install osx-64 packages (not osx-arm64)
conda install minian

An alternative would be to manage two (osx-64, osx-arm64) versions of miniconda on the same system.

Hopefully, a project maintainer will build an osx-arm64 version of minian in the future, but the pins definitely need to be adjusted.

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

3 participants