kesslerlib/kessler

pykep error - Running Python 3.8.13 in Mac with Apple Silicon

Opened this issue · 9 comments

Hello, I have been trying to install Kessler in a new Conda environment with Python 3.8 (running on Mac with Apple Silicon). However, I get the following error message:

Collecting numpy
  Using cached numpy-1.22.3-cp38-cp38-macosx_11_0_arm64.whl (12.7 MB)
Collecting matplotlib
  Using cached matplotlib-3.5.1-cp38-cp38-macosx_11_0_arm64.whl (7.2 MB)
Collecting torch>=1.5.1
  Using cached torch-1.11.0-cp38-none-macosx_11_0_arm64.whl (43.1 MB)
ERROR: Could not find a version that satisfies the requirement pykep>=2.5 (from kessler) (from versions: none)
ERROR: No matching distribution found for pykep>=2.5 

I have tried to pip install pykep but it seems is not available for osx-arm64.

Could anyone advise please?

Thank you in advance!

Sceki commented

Hi!

Which python version are you using?

Sceki commented

Sorry, just noticed in the title :) 3.8.13. I am using Python 3.8.12 on Mac with Apple Silicon and having no issues; can you try to install Pykep via conda separately?

Thanks @Sceki for your suggestion !. Unfortunately, that does not work either... This is the error I get:

$ conda config --add channels conda-forge 
$ conda config --set channel_priority strict
$ conda install pykep
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:

  - pykep

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.
Sceki commented

I have never encountered this, sorry to hear! But I believe it is probably dependant on pykep package?! I think you might want to report this as an issue to the pykep team: meanwhile I will investigate as well if I can reproduce it

Thanks @Sceki for your support! I have raised this issue in the pykep repo... Apparently the issue is the ARM architecture but the root cause is not fully identified yet

Sceki commented

@JJavierRosales have you tried this?

Thanks @Sceki, I did try but did not work either. I think the root cause of my problem is different though, because in the question raised in stack overflow the packages were available for osx-arm64 which is not the case for pykep.

Apparently the conda recipe of pykep needs to be explicitly updated to enable support for ARM architecture. We are working on it in the pykep repo

All, pykep is now available for the osx-arm64 architecture and I have managed to successfully install kessler on my machine. HOWEVER, I had to manually install the library and then remove pykep requirement from the array install_requires in setup.py because the version information provided by the library is a dictionary in the form

>>> pykep.__version__
{'major': 2, 'minor': 6}

which setuptools does not seem to reconcile with properly... Other than that, everything seems to work !

Sceki commented

I see! Happy that you managed to make it work and thanks for letting us know, will look into this :)