protectai / vulnhuntr

Zero shot vulnerability discovery using LLMs
GNU Affero General Public License v3.0
1.11k stars 115 forks source link

Pipx Install fails if running Python 3.13 #18

Closed Cr0n1c closed 3 weeks ago

Cr0n1c commented 4 weeks ago

cargo.lock might need updating

error: failed to run custom build command for `pyo3-ffi v0.21.2`

      Caused by:
        process didn't exit successfully: `/private/var/folders/yh/38q3l89546z2_t4szbspkvc00000gp/T/pip-install-shos_6vg/tokenizers_5d282553bb4f4c208432da3b5fbaa137/bindings/python/target/release/build/pyo3-ffi-13575824b7184c25/build-script-build` (exit status: 1)
        --- stdout
        cargo:rerun-if-env-changed=PYO3_CROSS
        cargo:rerun-if-env-changed=PYO3_CROSS_LIB_DIR
        cargo:rerun-if-env-changed=PYO3_CROSS_PYTHON_VERSION
        cargo:rerun-if-env-changed=PYO3_CROSS_PYTHON_IMPLEMENTATION
        cargo:rerun-if-env-changed=PYO3_PRINT_CONFIG
        cargo:rerun-if-env-changed=PYO3_USE_ABI3_FORWARD_COMPATIBILITY

        --- stderr
        error: the configured Python interpreter version (3.13) is newer than PyO3's maximum supported version (3.12)
        = help: please check if an updated version of PyO3 is available. Current version: 0.21.2
        = help: set PYO3_USE_ABI3_FORWARD_COMPATIBILITY=1 to suppress this check and build anyway using the stable ABI
      warning: build failed, waiting for other jobs to finish...
      💥 maturin failed
        Caused by: Failed to build a native library through cargo
        Caused by: Cargo build finished with "exit status: 101": `env -u CARGO MACOSX_DEPLOYMENT_TARGET="11.0" PYO3_ENVIRONMENT_SIGNATURE="cpython-3.13-64bit" PYO3_PYTHON="/Users/brandon.helms/.local/pipx/venvs/vulnhuntr/bin/python" PYTHON_SYS_EXECUTABLE="/Users/brandon.helms/.local/pipx/venvs/vulnhuntr/bin/python" "cargo" "rustc" "--features" "pyo3/extension-module" "--message-format" "json-render-diagnostics" "--manifest-path" "/private/var/folders/yh/38q3l89546z2_t4szbspkvc00000gp/T/pip-install-shos_6vg/tokenizers_5d282553bb4f4c208432da3b5fbaa137/bindings/python/Cargo.toml" "--release" "--lib" "--" "-C" "link-arg=-undefined" "-C" "link-arg=dynamic_lookup" "-C" "link-args=-Wl,-install_name,@rpath/tokenizers.tokenizers.cpython-313-darwin.so"`
      Error: command ['maturin', 'pep517', 'build-wheel', '-i', '/Users/brandon.helms/.local/pipx/venvs/vulnhuntr/bin/python', '--compatibility', 'off'] returned non-zero exit status 1
      [end of output]

  note: This error originates from a subprocess, and is likely not a problem with pip.
  ERROR: Failed building wheel for tokenizers
ERROR: ERROR: Failed to build installable wheels for some pyproject.toml based projects (tokenizers)

These instructions seemed to work: https://github.com/PyO3/maturin/issues/1960

DanMcInerney commented 4 weeks ago

pipx install git+https://github.com/protectai/vulnhuntr.git --python python3.10

It requires python3.10 due to some bugs in Jedi. Can you let me know if this works for you and I'll update the README