opencybersecurityalliance / firepit

Firepit - STIX Columnar Storage
Apache License 2.0
15 stars 12 forks source link

macOS installation error #7

Closed subbyte closed 3 years ago

subbyte commented 3 years ago

pip install firepit failed with macOS 10.15 and Python 3.9. Lower Python version works.

Testing script: https://github.com/subbyte/github-action-test/blob/main/.github/workflows/firepit-install.yml Error with Python 3.9: https://github.com/subbyte/github-action-test/runs/3078492170?check_suite_focus=true

Run python -m pip install --upgrade pip
Requirement already satisfied: pip in /Users/runner/hostedtoolcache/Python/3.9.6/x64/lib/python3.9/site-packages (21.1.3)
Requirement already satisfied: setuptools in /Users/runner/hostedtoolcache/Python/3.9.6/x64/lib/python3.9/site-packages (56.0.0)
Collecting setuptools
  Downloading setuptools-57.2.0-py3-none-any.whl (818 kB)
Installing collected packages: setuptools
  Attempting uninstall: setuptools
    Found existing installation: setuptools 56.0.0
    Uninstalling setuptools-56.0.0:
      Successfully uninstalled setuptools-56.0.0
Successfully installed setuptools-57.2.0
Collecting firepit
  Downloading firepit-1.0.14-py2.py3-none-any.whl (33 kB)
Collecting lark-parser
  Downloading lark-parser-0.11.3.tar.gz (229 kB)
Collecting ijson
  Downloading ijson-3.1.4-cp39-cp39-macosx_10_9_x86_64.whl (52 kB)
Collecting orjson==3.3.1
  Downloading orjson-3.3.1.tar.gz (655 kB)
  Installing build dependencies: started
  Installing build dependencies: finished with status 'done'
  Getting requirements to build wheel: started
  Getting requirements to build wheel: finished with status 'done'
    Preparing wheel metadata: started
    Preparing wheel metadata: finished with status 'error'
    ERROR: Command errored out with exit status 1:
     command: /Users/runner/hostedtoolcache/Python/3.9.6/x64/bin/python /Users/runner/hostedtoolcache/Python/3.9.6/x64/lib/python3.9/site-packages/pip/_vendor/pep517/in_process/_in_process.py prepare_metadata_for_build_wheel /var/folders/24/8k48jl6d249_n_qfxwsl6xvm0000gn/T/tmpoj1meudm
         cwd: /private/var/folders/24/8k48jl6d249_n_qfxwsl6xvm0000gn/T/pip-install-b17aksbl/orjson_8be9df0c073140d4bd3b219ebd07017a
    Complete output (13 lines):
    💥 maturin failed
      Caused by: Cargo metadata failed. Do you have cargo in your PATH?
      Caused by: Error during execution of `cargo metadata`: error: failed to run `rustc` to learn about target-specific information

    Caused by:
      process didn't exit successfully: `rustc - --crate-name ___ --print=file-names -Z mutable-noalias --crate-type bin --crate-type rlib --crate-type dylib --crate-type cdylib --crate-type staticlib --crate-type proc-macro --print=sysroot --print=cfg` (exit status: 1)
      --- stderr
      error: the option `Z` is only accepted on the nightly compiler

    Checking for Rust toolchain....
    Running `maturin pep517 write-dist-info --metadata-directory /private/var/folders/24/8k48jl6d249_n_qfxwsl6xvm0000gn/T/pip-modern-metadata-3baxp3mn --interpreter /Users/runner/hostedtoolcache/Python/3.9.6/x64/bin/python --manylinux=off --strip=on`
    Error: Command '['maturin', 'pep517', 'write-dist-info', '--metadata-directory', '/private/var/folders/24/8k48jl6d249_n_qfxwsl6xvm0000gn/T/pip-modern-metadata-3baxp3mn', '--interpreter', '/Users/runner/hostedtoolcache/Python/3.9.6/x64/bin/python', '--manylinux=off', '--strip=on']' returned non-zero exit status 1.
    ----------------------------------------
WARNING: Discarding https://files.pythonhosted.org/packages/23/c9/d4db467d5b5c91f5ff3ff3be5c731eb7fcc2b8b2c31540d5faeca794bf4d/orjson-3.3.1.tar.gz#sha256=149d6a2bc71514826979b9d053f3df0c2397a99e2b87213ba71605a1626d662c (from https://pypi.org/simple/orjson/) (requires-python:>=3.6). Command errored out with exit status 1: /Users/runner/hostedtoolcache/Python/3.9.6/x64/bin/python /Users/runner/hostedtoolcache/Python/3.9.6/x64/lib/python3.9/site-packages/pip/_vendor/pep517/in_process/_in_process.py prepare_metadata_for_build_wheel /var/folders/24/8k48jl6d249_n_qfxwsl6xvm0000gn/T/tmpoj1meudm Check the logs for full command output.
Collecting firepit
  Downloading firepit-1.0.13-py2.py3-none-any.whl (33 kB)
  Downloading firepit-1.0.12-py2.py3-none-any.whl (33 kB)
  Downloading firepit-1.0.11-py2.py3-none-any.whl (33 kB)
  Downloading firepit-1.0.10-py2.py3-none-any.whl (33 kB)
  Downloading firepit-1.0.9-py2.py3-none-any.whl (33 kB)
  Downloading firepit-1.0.8-py2.py3-none-any.whl (32 kB)
  Downloading firepit-1.0.7-py2.py3-none-any.whl (32 kB)
  Downloading firepit-1.0.6-py2.py3-none-any.whl (32 kB)
  Downloading firepit-1.0.4-py2.py3-none-any.whl (30 kB)
  Downloading firepit-1.0.3-py2.py3-none-any.whl (30 kB)
  Downloading firepit-1.0.2-py2.py3-none-any.whl (30 kB)
  Downloading firepit-1.0.1-py2.py3-none-any.whl (30 kB)
  Downloading firepit-1.0.0-py2.py3-none-any.whl (30 kB)
ERROR: Cannot install firepit==1.0.0, firepit==1.0.1, firepit==1.0.10, firepit==1.0.11, firepit==1.0.12, firepit==1.0.13, firepit==1.0.14, firepit==1.0.2, firepit==1.0.3, firepit==1.0.4, firepit==1.0.6, firepit==1.0.7, firepit==1.0.8 and firepit==1.0.9 because these package versions have conflicting dependencies.

The conflict is caused by:
    firepit 1.0.14 depends on orjson==3.3.1
    firepit 1.0.13 depends on orjson==3.3.1
    firepit 1.0.12 depends on orjson==3.3.1
    firepit 1.0.11 depends on orjson==3.3.1
    firepit 1.0.10 depends on orjson==3.3.1
    firepit 1.0.9 depends on orjson==3.3.1
    firepit 1.0.8 depends on orjson==3.3.1
    firepit 1.0.7 depends on orjson==3.3.1
    firepit 1.0.6 depends on orjson==3.3.1
    firepit 1.0.4 depends on orjson==3.3.1
    firepit 1.0.3 depends on orjson==3.3.1
    firepit 1.0.2 depends on orjson==3.3.1
    firepit 1.0.1 depends on orjson==3.3.1
    firepit 1.0.0 depends on orjson==3.3.1

To fix this you could try to:
1. loosen the range of package versions you've specified
2. remove package versions to allow pip attempt to solve the dependency conflict

ERROR: ResolutionImpossible: for help visit https://pip.pypa.io/en/latest/user_guide/#fixing-conflicting-dependencies
Error: Process completed with exit code 1.
barvhaim commented 3 years ago

I am experiencing the same issue with OSX, tried python 3.7.8 and 3.9.4

imolloy commented 3 years ago

Firepit seems to require orjson 3.3.1, which for some reason pip isn't able to install for me, but it will install 3.6.0 without issue.

pip install orjson
pip install --no-deps firepit

Obviously need to see if there are other dependencies.

subbyte commented 3 years ago

confirmed fix: https://github.com/subbyte/github-action-test/actions/runs/1090834139