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

bug/will not pip install unstructured[pdf] on gitpod #2831

Open
thams opened this issue Apr 2, 2024 · 3 comments
Open

bug/will not pip install unstructured[pdf] on gitpod #2831

thams opened this issue Apr 2, 2024 · 3 comments
Labels
bug Something isn't working

Comments

@thams
Copy link

thams commented Apr 2, 2024

Describe the bug
pip install unstructured[pdf] results in ERROR: Could not build wheels for onnx, which is required to install pyproject.toml-based projects

To Reproduce
% pip install unstructured[pdf]

Expected behavior
unstructured[pdf] to be installed without error.

Screenshots
Building wheels for collected packages: onnx
Building wheel for onnx (pyproject.toml) ... error
error: subprocess-exited-with-error

× Building wheel for onnx (pyproject.toml) did not run successfully.
│ exit code: 1
╰─> [112 lines of output]
fatal: not a git repository (or any parent up to mount point /)
Stopping at filesystem boundary (GIT_DISCOVERY_ACROSS_FILESYSTEM not set).
running bdist_wheel
running build
running build_py
running create_version
running cmake_build
Using cmake args: ['/home/linuxbrew/.linuxbrew/bin/cmake', '-DPYTHON_INCLUDE_DIR=/home/gitpod/.pyenv/versions/3.12.2/include/python3.12', '-DPYTHON_EXECUTABLE=/home/gitpod/.pyenv/versions/3.12.2/bin/python3.12', '-DBUILD_ONNX_PYTHON=ON', '-DCMAKE_EXPORT_COMPILE_COMMANDS=ON', '-DONNX_NAMESPACE=onnx', '-DPY_EXT_SUFFIX=.cpython-312-x86_64-linux-gnu.so', '-DCMAKE_BUILD_TYPE=Release', '-DONNX_ML=1', '/tmp/pip-install-vdhok58s/onnx_5f1b4c51f66549599449a17a03800247']
CMake Deprecation Warning at CMakeLists.txt:2 (cmake_minimum_required):
Compatibility with CMake < 3.5 will be removed from a future version of
CMake.

    Update the VERSION argument <min> value or use a ...<max> suffix to tell
    CMake that the project does not need compatibility with older versions.
  
  
  -- The C compiler identification is GNU 11.4.0
  -- The CXX compiler identification is GNU 11.4.0
  -- Detecting C compiler ABI info
  -- Detecting C compiler ABI info - done
  -- Check for working C compiler: /usr/bin/cc - skipped
  -- Detecting C compile features
  -- Detecting C compile features - done
  -- Detecting CXX compiler ABI info
  -- Detecting CXX compiler ABI info - done
  -- Check for working CXX compiler: /usr/bin/c++ - skipped
  -- Detecting CXX compile features
  -- Detecting CXX compile features - done
  CMake Warning (dev) at CMakeLists.txt:119 (find_package):
    Policy CMP0148 is not set: The FindPythonInterp and FindPythonLibs modules
    are removed.  Run "cmake --help-policy CMP0148" for policy details.  Use
    the cmake_policy command to set the policy and suppress this warning.
  
  This warning is for project developers.  Use -Wno-dev to suppress it.
  
  -- Found PythonInterp: /home/gitpod/.pyenv/versions/3.12.2/bin/python3.12 (found version "3.12.2")
  CMake Warning (dev) at CMakeLists.txt:121 (find_package):
    Policy CMP0148 is not set: The FindPythonInterp and FindPythonLibs modules
    are removed.  Run "cmake --help-policy CMP0148" for policy details.  Use
    the cmake_policy command to set the policy and suppress this warning.
  
  This warning is for project developers.  Use -Wno-dev to suppress it.
  
  -- Found PythonLibs: /home/gitpod/.pyenv/versions/3.12.2/lib/libpython3.12.so (found version "3.12.2")
  Generated: /tmp/pip-install-vdhok58s/onnx_5f1b4c51f66549599449a17a03800247/.setuptools-cmake-build/onnx/onnx-ml.proto
  CMake Error at CMakeLists.txt:303 (message):
    Protobuf compiler not found
  Call Stack (most recent call first):
    CMakeLists.txt:334 (relative_protobuf_generate_cpp)
  
  
  -- Configuring incomplete, errors occurred!
  Traceback (most recent call last):
    File "/home/gitpod/.pyenv/versions/3.12.2/lib/python3.12/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 353, in <module>
      main()
    File "/home/gitpod/.pyenv/versions/3.12.2/lib/python3.12/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 335, in main
      json_out['return_val'] = hook(**hook_input['kwargs'])
                               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    File "/home/gitpod/.pyenv/versions/3.12.2/lib/python3.12/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 251, in build_wheel
      return _build_backend().build_wheel(wheel_directory, config_settings,
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    File "/tmp/pip-build-env-e_rbr27s/overlay/lib/python3.12/site-packages/setuptools/build_meta.py", line 410, in build_wheel
      return self._build_with_temp_dir(
             ^^^^^^^^^^^^^^^^^^^^^^^^^^
    File "/tmp/pip-build-env-e_rbr27s/overlay/lib/python3.12/site-packages/setuptools/build_meta.py", line 395, in _build_with_temp_dir
      self.run_setup()
    File "/tmp/pip-build-env-e_rbr27s/overlay/lib/python3.12/site-packages/setuptools/build_meta.py", line 487, in run_setup
      super().run_setup(setup_script=setup_script)
    File "/tmp/pip-build-env-e_rbr27s/overlay/lib/python3.12/site-packages/setuptools/build_meta.py", line 311, in run_setup
      exec(code, locals())
    File "<string>", line 342, in <module>
    File "/tmp/pip-build-env-e_rbr27s/overlay/lib/python3.12/site-packages/setuptools/__init__.py", line 104, in setup
      return distutils.core.setup(**attrs)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    File "/tmp/pip-build-env-e_rbr27s/overlay/lib/python3.12/site-packages/setuptools/_distutils/core.py", line 185, in setup
      return run_commands(dist)
             ^^^^^^^^^^^^^^^^^^
    File "/tmp/pip-build-env-e_rbr27s/overlay/lib/python3.12/site-packages/setuptools/_distutils/core.py", line 201, in run_commands
      dist.run_commands()
    File "/tmp/pip-build-env-e_rbr27s/overlay/lib/python3.12/site-packages/setuptools/_distutils/dist.py", line 969, in run_commands
      self.run_command(cmd)
    File "/tmp/pip-build-env-e_rbr27s/overlay/lib/python3.12/site-packages/setuptools/dist.py", line 967, in run_command
      super().run_command(command)
    File "/tmp/pip-build-env-e_rbr27s/overlay/lib/python3.12/site-packages/setuptools/_distutils/dist.py", line 988, in run_command
      cmd_obj.run()
    File "/tmp/pip-build-env-e_rbr27s/normal/lib/python3.12/site-packages/wheel/bdist_wheel.py", line 368, in run
      self.run_command("build")
    File "/tmp/pip-build-env-e_rbr27s/overlay/lib/python3.12/site-packages/setuptools/_distutils/cmd.py", line 318, in run_command
      self.distribution.run_command(command)
    File "/tmp/pip-build-env-e_rbr27s/overlay/lib/python3.12/site-packages/setuptools/dist.py", line 967, in run_command
      super().run_command(command)
    File "/tmp/pip-build-env-e_rbr27s/overlay/lib/python3.12/site-packages/setuptools/_distutils/dist.py", line 988, in run_command
      cmd_obj.run()
    File "/tmp/pip-build-env-e_rbr27s/overlay/lib/python3.12/site-packages/setuptools/_distutils/command/build.py", line 131, in run
      self.run_command(cmd_name)
    File "/tmp/pip-build-env-e_rbr27s/overlay/lib/python3.12/site-packages/setuptools/_distutils/cmd.py", line 318, in run_command
      self.distribution.run_command(command)
    File "/tmp/pip-build-env-e_rbr27s/overlay/lib/python3.12/site-packages/setuptools/dist.py", line 967, in run_command
      super().run_command(command)
    File "/tmp/pip-build-env-e_rbr27s/overlay/lib/python3.12/site-packages/setuptools/_distutils/dist.py", line 988, in run_command
      cmd_obj.run()
    File "<string>", line 236, in run
    File "/tmp/pip-build-env-e_rbr27s/overlay/lib/python3.12/site-packages/setuptools/_distutils/cmd.py", line 318, in run_command
      self.distribution.run_command(command)
    File "/tmp/pip-build-env-e_rbr27s/overlay/lib/python3.12/site-packages/setuptools/dist.py", line 967, in run_command
      super().run_command(command)
    File "/tmp/pip-build-env-e_rbr27s/overlay/lib/python3.12/site-packages/setuptools/_distutils/dist.py", line 988, in run_command
      cmd_obj.run()
    File "<string>", line 222, in run
    File "/home/gitpod/.pyenv/versions/3.12.2/lib/python3.12/subprocess.py", line 413, in check_call
      raise CalledProcessError(retcode, cmd)
  subprocess.CalledProcessError: Command '['/home/linuxbrew/.linuxbrew/bin/cmake', '-DPYTHON_INCLUDE_DIR=/home/gitpod/.pyenv/versions/3.12.2/include/python3.12', '-DPYTHON_EXECUTABLE=/home/gitpod/.pyenv/versions/3.12.2/bin/python3.12', '-DBUILD_ONNX_PYTHON=ON', '-DCMAKE_EXPORT_COMPILE_COMMANDS=ON', '-DONNX_NAMESPACE=onnx', '-DPY_EXT_SUFFIX=.cpython-312-x86_64-linux-gnu.so', '-DCMAKE_BUILD_TYPE=Release', '-DONNX_ML=1', '/tmp/pip-install-vdhok58s/onnx_5f1b4c51f66549599449a17a03800247']' 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 onnx
Failed to build onnx
ERROR: Could not build wheels for onnx, which is required to install pyproject.toml-based projects

Environment Info
Please run python scripts/collect_env.py and paste the output here.

No such file or directory
/home/gitpod/.pyenv/versions/3.12.2/bin/python: can't open file '/workspace/template-jupyter-notebook/collect_env.py': [Errno 2] No such file or directory

Additional context
Running on a simple gitpod such as this one: https://github.com/gitpod-samples/template-jupyter-notebook

@thams thams added the bug Something isn't working label Apr 2, 2024
@vykhovanets
Copy link

can be related Unstructured-IO/unstructured-inference#336

@zeionara
Copy link

I have the same error, is there any progress in solving the problem?

@scanny
Copy link
Collaborator

scanny commented Apr 25, 2024

This is worth trying again with the latest version of unstructured. This problem was addressed in a new release of unstructured-inference and a new release of unstructured that uses that new version of unstructured-inference.

Let us know how you go.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants