Conda install -c conda-forge jupyter jupyterlab on Python=3.6

Hello,
I’m using Macbook M1, and I would like to install PyTorch in a python=3.6 environment (not 3.8).
You could find the steps here:

[Installing PyTorch on Apple M1 chip with GPU Acceleration | by Nikos Kafritsas | Towards Data Science](https://Installing PyTorch on Apple M1 chip with GPU Acceleration)

In the third step I use conda install -c conda-forge jupyter jupyterlab to install Jupiter notebook in the terminal.

But it gets stuck at this point:

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: |

Could you please help me how can I solve this?

Thanks.

What does conda info show?

If you’re running conda in the native (osx-arm64) mode you won’t be able to install some old packages because they’re not compiled for that architecture.

You could try taking advantage of Rosetta to emulate osx-arm64 but the performance will be worse

If the error messages are unhelpful, or the installation seems to be stuck, you can also try mamba
https://mamba.readthedocs.io/en/latest/installation.html
which is faster than conda

Yep, to expound further:

As for osx-arm64: yeah, you get what you pay for. You’ll be stuck with running old pythons under rosetta. 3.6 is EOL, so no amount of asking is going to get you any support, and it’s highly unlikely 3.7 will be made available.

I’d say try to get your tutorial working under 3.8, maybe make a PR.

More generally:

I generally can’t recommend the jupyter metapackage. It hauls along a few extra 100mb of complex dependencies (e.g. qt) which might be confounding things. And remember: none of these things have been tested natively on osx-arm64 because there are no free CI M1 assets for open source maintainers to test against.

Further, start with mambaforge, and never install anything in the base environment it gives you. Use mamba, as it halts faster (either with a working env, or with more useful errors).

pytorch is a beast to build, and the pytorch channels is one of the few I can recommend over conda-forge.

For each new environment, create and check in an environment.yml.

name: my-py36-jupyter-env
channels:
  - conda-forge
  - nodefaults 
dependencies:
  - python >=3.6,<3.7   # or whatever
  - jupyterlab >=3,<4
  - pytorch
  # or you can try with the `{channel}::` prefix 
  # - pytorch::pytorch

Keep it up-to-date with:

mamba env update --file environment.yml

Best of luck!