pipeless-ai / pipeless

An open-source computer vision framework to build and deploy apps in minutes
https://pipeless.ai
Apache License 2.0
707 stars 32 forks source link

Error: Library not loaded: @rpath/libpython3.11.dylib #147

Open paakhim10 opened 3 months ago

paakhim10 commented 3 months ago

The above file, post-installation of Pipeless following the guidelines, is unavailable in the .pipeless directory. The only files in the directory are: _deviceid, ibonnxruntime.1.16.0.dylib, libonnxruntime.dylib.

My system has Python installed already; further, I downgraded it to 3.11 for compatibility with Pipeless. What is the solution to this?

miguelaeh commented 3 months ago

Hi @paakhim10 ,

Could you share some logs or more context about the error?

Also, Pipeless is compatible with Python 3.12 in macOS. I assume you are using macOS since you mention the dylib files.

paakhim10 commented 3 months ago

Hi @miguelaeh! Thanks so much for responding. pipeless_log.txt This is the terminal log file. For context, the prior Python packages are Conda installed, I am not sure if it interferes with Pipeless installation.

miguelaeh commented 3 months ago

Hi @paakhim10 ,

I think it is not related to Python packages but with the Python installation. libpython3.11 is basically the main Python interpreter library.

You can try to build it from source as described in the following link. In this way Pipeless will take whatever Python you have installed in your system: https://www.pipeless.ai/docs/docs/v1/getting-started/installation#macos

paakhim10 commented 3 months ago

I had tried that earlier because of the same reasoning, but that's when I was encountering the error. I've now run the project using the docker image, and the dylib error is resolved. Thank you, @miguelaeh!

paakhim10 commented 3 months ago

Hi, @miguelaeh The docker image method is encountering errors with the server connection. Could you look into the following code and explain why the dylib error occurs? curl https://raw.githubusercontent.com/pipeless-ai/pipeless/main/install.sh | bash This installs Pipeless successfully with the following warning:

warning: trait EventType is never used
 --> src/events.rs:8:7
  |
8 | trait EventType {}
  |       ^^^^^^^^^
  |
  = note: #[warn(dead_code)] on by default

warning: pipeless-ai (lib) generated 1 warning
    Finished release profile [optimized] target(s) in 1m 13s
Pipeless was properly built
strip: changes being made to the file will invalidate the code signature in: /private/var/folders/tn/5qwnwx_j20b_5qhwx5vg07840000gn/T/tmp.O6rTKnzFSS/pipeless/target/release/pipeless
[cctools-port]: generating fake signature for '/private/var/folders/tn/5qwnwx_j20b_5qhwx5vg07840000gn/T/tmp.O6rTKnzFSS/pipeless/target/release/pipeless.strip'

✅ Pipeless installed successfully!

Execute the following commands to load the Pipeless binary:

    export PATH="${PATH}:${HOME}/.pipeless"
[cctools-port]: generating fake signature for '/Users/paakhim10/.pipeless/pipeless'

On executing pipeless:

(base) paakhim10@Paakhis-MacBook-Air ~ % pipeless
dyld[21163]: Library not loaded: @rpath/libpython3.11.dylib
  Referenced from: <18C153A2-4CC2-3D23-A4DD-75BAEC6E9BED> /Users/paakhim10/.pipeless/pipeless
  Reason: tried: '/Users/paakhim10/.pipeless/libpython3.11.dylib' (no such file), '/Users/paakhim10/.pipeless/libpython3.11.dylib' (no such file)
zsh: abort      pipeless

I've tried building it through different methods and used the docker container images for building my project as well, but I can not get any example to run on my system. Thank you so much!

miguelaeh commented 3 months ago

Can you elaborate on how did you install Python? Can you try including your Python installation on the rpath? It seems to be a problem locating the Python library in your system.

The warning during the build is not related. You can either add your libpython to the rpath or create a symlink at /Users/paakhim10/.pipeless/libpython3.11.dylib'.