TGSAI / mdio-python

Cloud native, scalable storage engine for various types of energy data.
https://mdio.dev/
Apache License 2.0
35 stars 13 forks source link

Installation issue on 3.10.6 on macOS #59

Closed pikumar closed 2 years ago

pikumar commented 2 years ago

I think I can install skbuild manually and fix this, but was wondering if this was going to be an issue for others?



└──> python3 -m pip install multidimio
Collecting multidimio
  Downloading multidimio-0.2.0-py3-none-any.whl (60 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 60.2/60.2 kB 1.0 MB/s eta 0:00:00
Requirement already satisfied: click>=8.1.3 in /opt/homebrew/lib/python3.10/site-packages (from multidimio) (8.1.3)
Collecting zarr<3.0.0,>=2.12.0
  Downloading zarr-2.12.0-py3-none-any.whl (185 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 185.8/185.8 kB 3.0 MB/s eta 0:00:00
Collecting click-params<0.4.0,>=0.3.0
  Downloading click_params-0.3.0-py3-none-any.whl (12 kB)
Collecting numba<0.56.0,>=0.55.2
  Downloading numba-0.55.2-cp310-cp310-macosx_11_0_arm64.whl (2.3 MB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 2.3/2.3 MB 15.1 MB/s eta 0:00:00
Collecting segyio<2.0.0,>=1.9.3
  Downloading segyio-1.9.6.tar.gz (1.1 MB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 1.1/1.1 MB 17.2 MB/s eta 0:00:00
  Preparing metadata (setup.py) ... error
  error: subprocess-exited-with-error

  × python setup.py egg_info did not run successfully.
  │ exit code: 1
  ╰─> [6 lines of output]
      Traceback (most recent call last):
        File "<string>", line 2, in <module>
        File "<pip-setuptools-caller>", line 34, in <module>
        File "/private/var/folders/tm/v4szwz995hg06nhvxjlvv7th0000gn/T/pip-install-q00euj7_/segyio_cbb75c3d7b1a4aaeb6b361e8b4253d68/setup.py", line 3, in <module>
          import skbuild
      ModuleNotFoundError: No module named 'skbuild'
      [end of output]

  note: This error originates from a subprocess, and is likely not a problem with pip.
error: metadata-generation-failed

× Encountered error while generating package metadata.
╰─> See above for output.

note: This is an issue with the package mentioned above, not pip.
hint: See above for details.```
tasansal commented 2 years ago

Hi Piyush!

It sounds like a segyio issue, it is trying to build it from the source. Kinda surprised it is not getting a wheel.

What CPU architecture are you on? Maybe segyio doesn't have wheels for that.

I had a similar issue with OS X ARM64 (M1) architecture and opened this issue https://github.com/equinor/segyio/issues/534

EDIT: Looking at it you are on OS X ARM64. Yes that is expected. Unfortunately won't be able to fix until the segyio team provides an OS X ARM64 build. In the meantime you can install the build dependencies for segyio manually.

Another solution is to run the x86_64 version of Python with Rosetta 2 emulator. That works fine, but it will probably run a little slower.

pikumar commented 2 years ago

Thanks Altay. Indeed I am on an M2 Air. Hoping that segyio fixes this soon. Will keep my fingers crossed.

tasansal commented 2 years ago

No problem, closing the issue for now since it is resolved!

Thanks @pikumar

AmirMardan commented 1 year ago

I had the same problem on M1 Max and created an environment using conda and set the architecture to x86_64 using the following lines of code.

CONDA_SUBDIR=osx-64 conda create -n myenv_x86 python=3.9
conda activate myenv_x86
conda config --env --set subdir osx-64
tasansal commented 1 year ago

@AmirMardan, thanks for the workaround. I guess that this runs the x86_64 version using Rosetta 2. While it may work, it probably won't perform as fast as the native :)

The last time I checked on my Mac, segyio was compiling on ARM64 ok; hence mdio should work ok as well. Are you seeing a similar issue with the latest segyio ?

AmirMardan commented 1 year ago

Yes, I had the same problem and I had to create another environment with osx-64 to make it work.

tasansal commented 11 months ago

segyio 1.9.12+ now works with ARM64 on Mac OS.

https://github.com/equinor/segyio/pull/568

pikumar commented 11 months ago

Just confirming that on an M2 mac air, with Python 3.11.6 - pip install worked flawlessly. Thanks.