Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Quickstart livebook fails to install instructor_ex #86

Open
ospaarmann opened this issue Dec 7, 2024 · 1 comment
Open

Quickstart livebook fails to install instructor_ex #86

ospaarmann opened this issue Dec 7, 2024 · 1 comment

Comments

@ospaarmann
Copy link

I tried running the livebook locally as standalone and I get this error after the first cell:

Mix.install(
  [
    {:instructor, path: Path.expand("../", __DIR__)}
  ],
  config: [
    instructor: [
      adapter: Instructor.Adapters.OpenAI,
      openai: [api_key: System.fetch_env!("LB_OPENAI_API_KEY")]
    ]
  ]
)

Error:

Could not compile :instructor, no "mix.exs", "rebar.config" or "Makefile" (pass :compile as an option to customize compilation, set it to "false" to do nothing)
Unchecked dependencies for environment dev:
* instructor (/Users/olespaarmann/Library/Application Support/livebook/autosaved/2024_12_07)
  could not find an app file at "_build/dev/lib/instructor/ebin/instructor.app". This may happen if the dependency was not yet compiled or the dependency indeed has no app file (then you can pass app: false as option)

** (Mix.Error) Can't continue due to errors on dependencies
    (mix 1.17.2) lib/mix.ex:588: Mix.raise/2
    (mix 1.17.2) lib/mix/tasks/deps.loadpaths.ex:48: Mix.Tasks.Deps.Loadpaths.run/1
    (mix 1.17.2) lib/mix/task.ex:495: anonymous fn/3 in Mix.Task.run_task/5
    (mix 1.17.2) lib/mix.ex:947: anonymous fn/5 in Mix.install/2
    (elixir 1.17.2) lib/file.ex:1665: File.cd!/2
    (mix 1.17.2) lib/mix.ex:911: Mix.install/2
    #cell:setup:1: (file)

It works when I change the cell and remove the path:

Mix.install(
  [
    :instructor
  ],
  config: [
    instructor: [
      adapter: Instructor.Adapters.OpenAI,
      openai: [api_key: System.fetch_env!("LB_OPENAI_API_KEY")]
    ]
  ]
)
@dewalor
Copy link

dewalor commented Dec 30, 2024

duplicate of #25

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants