google / yggdrasil-decision-forests

A library to train, evaluate, interpret, and productionize decision forest models such as Random Forest and Gradient Boosted Decision Trees.
https://ydf.readthedocs.io/
Apache License 2.0
447 stars 49 forks source link

import ydf returns error: ydf.so (no such file) and ydf.so (not a mach-o file) #88

Closed cassjpark closed 1 month ago

cassjpark commented 2 months ago

Hi! I'm really excited about getting started with YDF but I'm having trouble importing it. I'm running the import statement in a jupyter notebook. I'm sorry if I've missed a clear answer to this error.

YDF version: 0.0.7 (I tried to get a more recent version, but was unsuccessful) Python version: 3.10.14

import ydf

full error:

ImportError                               Traceback (most recent call last)
Cell In[3], line 1
----> 1 import ydf

File ~/.pyenv/versions/3.10.14/envs/plankton310/lib/python3.10/site-packages/ydf/__init__.py:23
     20 from ydf.version import version as __version__
     22 # Dataset
---> 23 from ydf.dataset.dataset import create_vertical_dataset
     24 from ydf.dataset.dataspec import Column
     25 from ydf.dataset.dataspec import Semantic

File ~/.pyenv/versions/3.10.14/envs/plankton310/lib/python3.10/site-packages/ydf/dataset/dataset.py:23
     20 import numpy as np
     22 from yggdrasil_decision_forests.dataset import data_spec_pb2
---> 23 from ydf.cc import ydf
     24 from ydf.dataset import dataspec
     25 from ydf.dataset.io import dataset_io

ImportError: dlopen(/Users/macbook/.pyenv/versions/3.10.14/envs/plankton310/lib/python3.10/site-packages/ydf/cc/ydf.so, 0x0002): 
tried: '/Users/macbook/.pyenv/versions/3.10.14/envs/plankton310/lib/python3.10/site-packages/ydf/cc/ydf.so' (not a mach-o file), 
'/System/Volumes/Preboot/Cryptexes/OS/Users/macbook/.pyenv/versions/3.10.14/envs/plankton310/lib/python3.10/site-packages/ydf/cc/ydf.so' (no such file), 
'/Users/macbook/.pyenv/versions/3.10.14/envs/plankton310/lib/python3.10/site-packages/ydf/cc/ydf.so' (not a mach-o file)
achoum commented 1 month ago

This is annoying :). Can you share the following details. Thanks an cheers.

1.

What version of macos are you using?

Note: ydf 0.0.3 is compatible with macos12 arm64. The next versions are compatible with macos14 arm64.

2.

What processor are you using (e.g., Intel something, M1, M2)? This information can be found in here.

Note: We are not releasing any version of ydf compatible with intel on mac.

3.

Can you share the error you see when trying to install a more recent version of ydf?

cassjpark commented 1 month ago

Note: We are not releasing any version of ydf compatible with intel on mac.

Oop! That's it! My bad - so sorry for the trouble!