interpretml / interpret-text

A library that incorporates state-of-the-art explainers for text-based machine learning models and visualizes the result with a built-in dashboard.
MIT License
417 stars 67 forks source link

Can't install on MacOS Ventura, Python 3.10, pip3 22.3.1 #217

Closed massisenergy closed 1 year ago

massisenergy commented 1 year ago

I need the from utils_bert import * for a project. I tried this: pip3 install interpret-text. The bottom portion of the output says:

.
.
.
Compiling pyo3 v0.8.5
           Running `rustc --crate-name build_script_build --edition=2018 /Users/massisenergy/.cargo/registry/src/github.com-1ecc6299db9ec823/pyo3-0.8.5/build.rs --error-format=json --json=diagnostic-rendered-ansi,artifacts,future-incompat --crate-type bin --emit=dep-info,link -C embed-bitcode=no -C debug-assertions=off --cfg 'feature="default"' --cfg 'feature="extension-module"' -C metadata=7ff736b8c36d452b -C extra-filename=-7ff736b8c36d452b --out-dir /private/var/folders/5n/8qwlbn856bj2ypqpnmz_sgxh0000gn/T/pip-install-_wbfyvsc/tokenizers_6d1aaeb12cca441c817e1426c3370764/target/release/build/pyo3-7ff736b8c36d452b -L dependency=/private/var/folders/5n/8qwlbn856bj2ypqpnmz_sgxh0000gn/T/pip-install-_wbfyvsc/tokenizers_6d1aaeb12cca441c817e1426c3370764/target/release/deps --extern lazy_static=/private/var/folders/5n/8qwlbn856bj2ypqpnmz_sgxh0000gn/T/pip-install-_wbfyvsc/tokenizers_6d1aaeb12cca441c817e1426c3370764/target/release/deps/liblazy_static-d0a10c1f84e44dd3.rlib --extern regex=/private/var/folders/5n/8qwlbn856bj2ypqpnmz_sgxh0000gn/T/pip-install-_wbfyvsc/tokenizers_6d1aaeb12cca441c817e1426c3370764/target/release/deps/libregex-0fcabdfb33f33a95.rlib --extern serde=/private/var/folders/5n/8qwlbn856bj2ypqpnmz_sgxh0000gn/T/pip-install-_wbfyvsc/tokenizers_6d1aaeb12cca441c817e1426c3370764/target/release/deps/libserde-1de1df70e7c4d9d3.rlib --extern serde_json=/private/var/folders/5n/8qwlbn856bj2ypqpnmz_sgxh0000gn/T/pip-install-_wbfyvsc/tokenizers_6d1aaeb12cca441c817e1426c3370764/target/release/deps/libserde_json-29b5c99c43ce3564.rlib --extern version_check=/private/var/folders/5n/8qwlbn856bj2ypqpnmz_sgxh0000gn/T/pip-install-_wbfyvsc/tokenizers_6d1aaeb12cca441c817e1426c3370764/target/release/deps/libversion_check-bae854e9839bf6f3.rlib --cap-lints allow`
           Running `/private/var/folders/5n/8qwlbn856bj2ypqpnmz_sgxh0000gn/T/pip-install-_wbfyvsc/tokenizers_6d1aaeb12cca441c817e1426c3370764/target/release/build/pyo3-7ff736b8c36d452b/build-script-build`
      error: failed to run custom build command for `pyo3 v0.8.5`

      Caused by:
        process didn't exit successfully: `/private/var/folders/5n/8qwlbn856bj2ypqpnmz_sgxh0000gn/T/pip-install-_wbfyvsc/tokenizers_6d1aaeb12cca441c817e1426c3370764/target/release/build/pyo3-7ff736b8c36d452b/build-script-build` (exit status: 101)
        --- stderr
        thread 'main' panicked at 'Error: pyo3 requires a nightly or dev version of Rust.', /Users/massisenergy/.cargo/registry/src/github.com-1ecc6299db9ec823/pyo3-0.8.5/build.rs:542:9
        note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
      warning: build failed, waiting for other jobs to finish...
      error: `cargo rustc --lib --message-format=json-render-diagnostics --manifest-path Cargo.toml --release -v --features pyo3/extension-module -- --crate-type cdylib -C 'link-args=-undefined dynamic_lookup -Wl,-install_name,@rpath/tokenizers.cpython-310-darwin.so'` failed with code 101
      [end of output]

  note: This error originates from a subprocess, and is likely not a problem with pip.
  ERROR: Failed building wheel for tokenizers
Failed to build tokenizers
ERROR: Could not build wheels for tokenizers, which is required to install pyproject.toml-based projects

Can anyone please help me?

massisenergy commented 1 year ago

Sorry, this was a mistake. Was using a different project, where a .py file (namesake of the utils_bert as in this project) was missing in my working directory. So it's actually a name confusion & nothing to do with this repo 🤪