-1

I just tried to intall openai on my pip venv, and I got this error.

My pip is up to date and I tried on 2 different environments.

My command that i entered was:

pip install openai

I wanted to install openai api using pip and got an unusual error back.

Error Message:

  Getting requirements to build wheel ... done
  Preparing metadata (pyproject.toml) ... error
  error: subprocess-exited-with-error
  
  × Preparing metadata (pyproject.toml) did not run successfully.
  │ exit code: 1
  ╰─> [6 lines of output]
      
      Cargo, the Rust package manager, is not installed or is not on PATH.
      This package requires Rust and Cargo to compile extensions. Install it through
      the system's package manager or via https://rustup.rs/
      
      Checking for Rust toolchain....
      [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.
1
  • 3
    Did you follow the advice it gave? Commented Apr 8, 2024 at 19:08

1 Answer 1

2

Your error message is quite descriptive and it provides a solution to your question: Cargo, the Rust package manager, is not installed or is not on PATH.

openai package requires Rust and Cargo to compile extensions. You can install it through the system's package manager or via https://rustup.rs/.

Sign up to request clarification or add additional context in comments.

1 Comment

curl --proto '=https' --t lsv1.2 -sSf sh.rustup.rs | sh info: downloading installer warn: curl: (22) The requested URL returned error: 404 error: installer for platform 'i686-unknown-linux-musl' not found, this may be unsupported getting this on ish for ios

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.