0

I'm using python's FastAPI deployed on heroku, but I get an error. How can I get rid of this error? I edited it. All the error statements are posted. I'm using python's FastAPI deployed on heroku, but I get an error. How can I get rid of this error? I edited it. All the error statements are posted. I'm using python's FastAPI deployed on heroku, but I get an error. How can I get rid of this error? I edited it. All the error statements are posted.

Enumerating objects: 1265, done.
Counting objects: 100% (1265/1265), done.
Delta compression using up to 16 threads
Compressing objects: 100% (1250/1250), done.
Writing objects: 100% (1265/1265), 23.09 MiB | 4.65 MiB/s, done.
Total 1265 (delta 123), reused 8 (delta 3), pack-reused 0


remote:        Collecting tqdm==4.64.0
remote:          Downloading tqdm-4.64.0-py2.py3-none-any.whl (78 kB)
remote:        Collecting traitlets==5.1.1
remote:          Downloading traitlets-5.1.1-py3-none-any.whl (102 kB)
remote:        Collecting traittypes==0.2.1
remote:          Downloading traittypes-0.2.1-py2.py3-none-any.whl (8.6 kB)
remote:        Collecting typing_extensions==4.1.1
remote:          Downloading typing_extensions-4.1.1-py3-none-any.whl (26 kB)
remote:        Collecting urllib3==1.26.7
remote:          Downloading urllib3-1.26.7-py2.py3-none-any.whl (138 kB)
remote:        Collecting uvicorn==0.17.6
remote:          Downloading uvicorn-0.17.6-py3-none-any.whl (53 kB)
remote:        Collecting wcwidth==0.2.5
remote:          Downloading wcwidth-0.2.5-py2.py3-none-any.whl (30 kB)
remote:        Collecting webencodings==0.5.1
remote:          Downloading webencodings-0.5.1-py2.py3-none-any.whl (11 kB)
remote:        Collecting Werkzeug==2.1.2
remote:          Downloading Werkzeug-2.1.2-py3-none-any.whl (224 kB)
remote:        Collecting widgetsnbextension==3.5.2
remote:          Downloading widgetsnbextension-3.5.2-py2.py3-none-any.whl (1.6 MB)
remote:        Collecting wrapt==1.14.1
remote:          Downloading wrapt-1.14.1-cp310-cp310-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl (77 kB)
remote:        Collecting xmltodict==0.12.0
remote:          Downloading xmltodict-0.12.0-py2.py3-none-any.whl (9.2 kB)
remote:        Collecting zipp==3.6.0
remote:          Downloading zipp-3.6.0-py3-none-any.whl (5.3 kB)
remote:        Collecting requests[socks]
remote:          Downloading requests-2.28.0-py3-none-any.whl (62 kB)
remote:        Collecting pexpect>4.3
remote:          Downloading pexpect-4.8.0-py2.py3-none-any.whl (59 kB)
remote:        Collecting bluepy>=1.2
remote:          Downloading bluepy-1.3.0.tar.gz (217 kB)
remote:          Preparing metadata (setup.py): started
remote:          Preparing metadata (setup.py): finished with status 'done'
remote:        Collecting ptyprocess
remote:          Downloading ptyprocess-0.7.0-py2.py3-none-any.whl (13 kB)
remote:        Building wheels for collected packages: easydict, gdown, genomes, onnx, OpenBCI-Python, pyOpenBCI, pyrsistent, python-multipart, termcolor, tornado, bluepy
remote:          Building wheel for easydict (setup.py): started
remote:          Building wheel for easydict (setup.py): finished with status 'done'
remote:          Created wheel for easydict: filename=easydict-1.9-py3-none-any.whl size=6360 sha256=0ebff15f5994dd66f01991bf7dd2b6d6170cf8417423ecb9dfc362b2e57461ec
remote:          Stored in directory: /tmp/pip-ephem-wheel-cache-hkg4ea_6/wheels/fd/d2/35/4c11d19a72280492846f4c4df975311a2bac475e8021f86c1d
remote:          Building wheel for gdown (pyproject.toml): started
remote:          Building wheel for gdown (pyproject.toml): finished with status 'done'
remote:          Created wheel for gdown: filename=gdown-4.4.0-py3-none-any.whl size=14759 sha256=1da25aefbff29029e17ac5830a17c49b8c011f90cb7703664b6bffba7ab4e0ea
remote:          Stored in directory: /tmp/pip-ephem-wheel-cache-hkg4ea_6/wheels/03/0b/3f/6ddf67a417a5b400b213b0bb772a50276c199a386b12c06bfc
remote:          Building wheel for genomes (setup.py): started
remote:          Building wheel for genomes (setup.py): finished with status 'done'
remote:          Created wheel for genomes: filename=genomes-1.1.0-py3-none-any.whl size=12935 sha256=28bdafe7fd7c537d2513f625c5a272180d9f1b553c7d14d148dcb79112db2d15
remote:          Stored in directory: /tmp/pip-ephem-wheel-cache-hkg4ea_6/wheels/13/07/d1/b5babef6a10fd3ccf0658390abfa140e1800ae8703923e5de1
remote:          Building wheel for onnx (setup.py): started
remote:          Building wheel for onnx (setup.py): finished with status 'error'
remote:          error: subprocess-exited-with-error
remote:
remote:          × python setup.py bdist_wheel did not run successfully.
remote:          │ exit code: 1
remote:          ╰─> [73 lines of output]
remote:              fatal: not a git repository (or any parent up to mount point /)
remote:              Stopping at filesystem boundary (GIT_DISCOVERY_ACROSS_FILESYSTEM not set).
remote:              /app/.heroku/python/lib/python3.10/site-packages/setuptools/installer.py:27: SetuptoolsDeprecationWarning: setuptools.installer is deprecated. Requirements should be satisfied by a PEP 517 installer.
remote:                warnings.warn(
remote:              running bdist_wheel
remote:              running build
remote:              running build_py
remote:              running create_version
remote:              running cmake_build
remote:              Using cmake args: ['/usr/bin/cmake', '-DPYTHON_INCLUDE_DIR=/app/.heroku/python/include/python3.10', '-DPYTHON_EXECUTABLE=/app/.heroku/python/bin/python', '-DBUILD_ONNX_PYTHON=ON', '-DCMAKE_EXPORT_COMPILE_COMMANDS=ON', '-DONNX_NAMESPACE=onnx', '-DPY_EXT_SUFFIX=.cpython-310-x86_64-linux-gnu.so', '-DCMAKE_BUILD_TYPE=Release', '-DONNX_ML=1', '/tmp/pip-install-eqmi_ksj/onnx_946b380e8f124485ad337a1910eaaad0']
remote:              -- The C compiler identification is GNU 9.4.0
remote:              -- The CXX compiler identification is GNU 9.4.0
remote:              -- Check for working C compiler: /usr/bin/cc
remote:              -- Check for working C compiler: /usr/bin/cc -- works
remote:              -- Detecting C compiler ABI info
remote:              -- Detecting C compiler ABI info - done
remote:              -- Detecting C compile features
remote:              -- Detecting C compile features - done
remote:              -- Check for working CXX compiler: /usr/bin/c++
remote:              -- Check for working CXX compiler: /usr/bin/c++ -- works
remote:              -- Detecting CXX compiler ABI info
remote:              -- Detecting CXX compiler ABI info - done
remote:              -- Detecting CXX compile features
remote:              -- Detecting CXX compile features - done
remote:              -- Found PythonInterp: /app/.heroku/python/bin/python (found version "3.10.5")
remote:              -- Found PythonLibs: /app/.heroku/python/lib/libpython3.10.so (found version "3.10.5")
remote:              Generated: /tmp/pip-install-eqmi_ksj/onnx_946b380e8f124485ad337a1910eaaad0/.setuptools-cmake-build/onnx/onnx-ml.proto
remote:              CMake Error at CMakeLists.txt:295 (message):
remote:                Protobuf compiler not found
remote:              Call Stack (most recent call first):
remote:                CMakeLists.txt:326 (relative_protobuf_generate_cpp)
remote:
remote:
remote:              -- Configuring incomplete, errors occurred!
remote:              See also "/tmp/pip-install-eqmi_ksj/onnx_946b380e8f124485ad337a1910eaaad0/.setuptools-cmake-build/CMakeFiles/CMakeOutput.log".
remote:              Traceback (most recent call last):
remote:                File "<string>", line 2, in <module>
remote:                File "<pip-setuptools-caller>", line 34, in <module>
remote:                File "/tmp/pip-install-eqmi_ksj/onnx_946b380e8f124485ad337a1910eaaad0/setup.py", line 336, in <module>
remote:                  setuptools.setup(
remote:                File "/app/.heroku/python/lib/python3.10/site-packages/setuptools/__init__.py", line 155, in setup
remote:                  return distutils.core.setup(**attrs)
remote:                File "/app/.heroku/python/lib/python3.10/site-packages/setuptools/_distutils/core.py", line 148, in setup
remote:                  return run_commands(dist)
remote:                File "/app/.heroku/python/lib/python3.10/site-packages/setuptools/_distutils/core.py", line 163, in run_commands
remote:                  dist.run_commands()
remote:                File "/app/.heroku/python/lib/python3.10/site-packages/setuptools/_distutils/dist.py", line 967, in run_commands
remote:                  self.run_command(cmd)
remote:                File "/app/.heroku/python/lib/python3.10/site-packages/setuptools/_distutils/dist.py", line 986, in run_command
remote:                  cmd_obj.run()
remote:                File "/app/.heroku/python/lib/python3.10/site-packages/wheel/bdist_wheel.py", line 299, in run
remote:                  self.run_command('build')
remote:                File "/app/.heroku/python/lib/python3.10/site-packages/setuptools/_distutils/cmd.py", line 313, in run_command
remote:                  self.distribution.run_command(command)
remote:                File "/app/.heroku/python/lib/python3.10/site-packages/setuptools/_distutils/dist.py", line 986, in run_command
remote:                  cmd_obj.run()
remote:                File "/app/.heroku/python/lib/python3.10/site-packages/setuptools/_distutils/command/build.py", line 135, in run
remote:                  self.run_command(cmd_name)
remote:                File "/app/.heroku/python/lib/python3.10/site-packages/setuptools/_distutils/cmd.py", line 313, in run_command
remote:                  self.distribution.run_command(command)
remote:                File "/app/.heroku/python/lib/python3.10/site-packages/setuptools/_distutils/dist.py", line 986, in run_command
remote:                  cmd_obj.run()
remote:                File "/tmp/pip-install-eqmi_ksj/onnx_946b380e8f124485ad337a1910eaaad0/setup.py", line 232, in run
remote:                  self.run_command('cmake_build')
remote:                File "/app/.heroku/python/lib/python3.10/site-packages/setuptools/_distutils/cmd.py", line 313, in run_command
remote:                  self.distribution.run_command(command)
remote:                File "/app/.heroku/python/lib/python3.10/site-packages/setuptools/_distutils/dist.py", line 986, in run_command
remote:                  cmd_obj.run()
remote:                File "/tmp/pip-install-eqmi_ksj/onnx_946b380e8f124485ad337a1910eaaad0/setup.py", line 218, in run
remote:                  subprocess.check_call(cmake_args)
remote:                File "/app/.heroku/python/lib/python3.10/subprocess.py", line 369, in check_call
remote:                  raise CalledProcessError(retcode, cmd)
remote:              subprocess.CalledProcessError: Command '['/usr/bin/cmake', '-DPYTHON_INCLUDE_DIR=/app/.heroku/python/include/python3.10', '-DPYTHON_EXECUTABLE=/app/.heroku/python/bin/python', '-DBUILD_ONNX_PYTHON=ON', '-DCMAKE_EXPORT_COMPILE_COMMANDS=ON', '-DONNX_NAMESPACE=onnx', '-DPY_EXT_SUFFIX=.cpython-310-x86_64-linux-gnu.so', '-DCMAKE_BUILD_TYPE=Release', '-DONNX_ML=1', '/tmp/pip-install-eqmi_ksj/onnx_946b380e8f124485ad337a1910eaaad0']' returned non-zero exit status 1.
remote:              [end of output]
remote:
remote:          note: This error originates from a subprocess, and is likely not a problem with pip.
remote:          ERROR: Failed building wheel for onnx
remote:          Running setup.py clean for onnx
remote:          Building wheel for OpenBCI-Python (setup.py): started
remote:          Building wheel for OpenBCI-Python (setup.py): finished with status 'done'
remote:          Created wheel for OpenBCI-Python: filename=OpenBCI_Python-1.0.2-py3-none-any.whl size=38924 sha256=9c3420d04cb988ecf5d0f4c3b489da84e565a7f5198f1d6f5d6e3ddf6636fc8b
remote:          Stored in directory: /tmp/pip-ephem-wheel-cache-hkg4ea_6/wheels/09/09/c2/faa28cace216888b7b4c2c53accb93e339cfb8ec0e545a6983
remote:          Building wheel for pyOpenBCI (setup.py): started
remote:          Building wheel for pyOpenBCI (setup.py): finished with status 'done'
remote:          Created wheel for pyOpenBCI: filename=pyOpenBCI-0.13-py3-none-any.whl size=23506 sha256=840bcce760b061532a9bad34c5f96d9e54d36eb5a8f3ee1db20ebfba1c48017f
remote:          Stored in directory: /tmp/pip-ephem-wheel-cache-hkg4ea_6/wheels/64/be/08/dc8a693541e56517c22444b9f986183ecaf20e5da13d44d0ed
remote:          Building wheel for pyrsistent (pyproject.toml): started
remote:          Building wheel for pyrsistent (pyproject.toml): finished with status 'done'
remote:          Created wheel for pyrsistent: filename=pyrsistent-0.18.0-cp310-cp310-linux_x86_64.whl size=73212 sha256=70d68922ddcc0291a23b34c34e47447250d8a9ff5c1f380f3346a407860b149c
remote:          Stored in directory: /tmp/pip-ephem-wheel-cache-hkg4ea_6/wheels/bf/ee/17/b548a960bb9e20daf7987f316c326e8a368603809ace3b2374
remote:          Building wheel for python-multipart (setup.py): started
remote:          Building wheel for python-multipart (setup.py): finished with status 'done'
remote:          Created wheel for python-multipart: filename=python_multipart-0.0.5-py3-none-any.whl size=31678 sha256=1d8b18fd33c3c95b28b974312e3fb0049a543c26824c2837706eb2f488ffc0de
remote:          Stored in directory: /tmp/pip-ephem-wheel-cache-hkg4ea_6/wheels/ae/3f/03/fa4bd98cd7f4a25e63b6a0b61a7a8352e0f874cd9de1f3390d
remote:          Building wheel for termcolor (setup.py): started
remote:          Building wheel for termcolor (setup.py): finished with status 'done'
remote:          Created wheel for termcolor: filename=termcolor-1.1.0-py3-none-any.whl size=4848 sha256=7c0bbe4278b4482705e314d90265879663e23a60442a55a2e2ce70a6c8ac645b
remote:          Stored in directory: /tmp/pip-ephem-wheel-cache-hkg4ea_6/wheels/a1/49/46/1b13a65d8da11238af9616b00fdde6d45b0f95d9291bac8452
remote:          Building wheel for tornado (setup.py): started
remote:          Building wheel for tornado (setup.py): finished with status 'done'
remote:          Created wheel for tornado: filename=tornado-6.1-cp310-cp310-linux_x86_64.whl size=416784 sha256=461d67b3264d2a72e1b672ad80d17d6d3a3b5922b8d5149f1f4228ae6d6a0a36
remote:          Stored in directory: /tmp/pip-ephem-wheel-cache-hkg4ea_6/wheels/80/32/8d/21cf0fa6ee4e083f6530e5b83dfdfa9489a3890d320803f4c7
remote:          Building wheel for bluepy (setup.py): started
remote:          Building wheel for bluepy (setup.py): finished with status 'done'
remote:          Created wheel for bluepy: filename=bluepy-1.3.0-cp310-cp310-linux_x86_64.whl size=601043 sha256=750c27ff3ead592e9a0f0b5aa001c8520a9946543ab1af5be4bf8559ae27b785
remote:          Stored in directory: /tmp/pip-ephem-wheel-cache-hkg4ea_6/wheels/e6/0b/5d/6f0ee9526d33b28d86d4adfc9f6ae9249ef3a7a3a1b1189d11
remote:        Successfully built easydict gdown genomes OpenBCI-Python pyOpenBCI pyrsistent python-multipart termcolor tornado bluepy
remote:        Failed to build onnx
remote:        Installing collected packages: webencodings, wcwidth, termcolor, tensorboard-plugin-wit, Send2Trash, pytz, pyserial, pyasn1, ptyprocess, pickleshare, nose, mpmath, mistune, libclang, keras, ipython-genutils, genomes, flatbuffers, easydict, certifi, bluepy, bitstring, backcall, zipp, xmltodict, wrapt, Werkzeug, urllib3, typing_extensions, traitlets, tqdm, tornado, toolz, tomli, threadpoolctl, testpath, tensorflow-io-gcs-filesystem, tensorflow-estimator, tensorboard-data-server, tello, sympy, soupsieve, sniffio, six, rsa, redis, pyzmq, PyYAML, PySocks, pyrsistent, pyparsing, Pygments, pycparser, pyasn1-modules, protobuf, prompt-toolkit, prometheus-client, prettytable, Pillow, pexpect, parso, pandocfilters, oauthlib, numpy, networkx, nest-asyncio, MarkupSafe, Markdown, lxml, locket, kiwisolver, jupyterlab-widgets, joblib, importlib-resources, idna, h11, gunicorn, gast, fonttools, filelock, entrypoints, defusedxml, decorator, debugpy, Cython, cycler, colorama, click, charset-normalizer, cachetools, attrs, asgiref, uvicorn, traittypes, torch, tifffile, terminado, scipy, requests, PyWavelets, python-utils, python-multipart, python-dateutil, pydantic, partd, packaging, opt-einsum, opencv-python-headless, opencv-python, opencv-contrib-python, OpenBCI-Python, onnx, matplotlib-inline, Keras-Preprocessing, jupyterlab-pygments, jupyter-core, jsonschema, Jinja2, jedi, importlib-metadata, imageio, h5py, grpcio, google-pasta, google-auth, cffi, beautifulsoup4, astunparse, anyio, absl-py, torchvision, torchaudio, starlette, setuptools-scm, scikit-learn, scikit-image, requests-oauthlib, QtPy, pyOpenBCI, pandas, nbformat, mne, jupyter-client, ipython, icrawler, bleach, argon2-cffi, qudida, nbclient, matplotlib, ipykernel, google-auth-oauthlib, gdown, fastapi, tensorboard, seaborn, qtconsole, nbconvert, jupyter-console, albumentations, tensorflow, notebook, widgetsnbextension, retina-face, ipywidgets, jupyter
remote:          Running setup.py install for onnx: started
remote:          Running setup.py install for onnx: finished with status 'error'
remote:          error: subprocess-exited-with-error
remote:
remote:          × Running setup.py install for onnx did not run successfully.
remote:          │ exit code: 1
remote:          ╰─> [61 lines of output]
remote:              fatal: not a git repository (or any parent up to mount point /)
remote:              Stopping at filesystem boundary (GIT_DISCOVERY_ACROSS_FILESYSTEM not set).
remote:              /app/.heroku/python/lib/python3.10/site-packages/setuptools/installer.py:27: SetuptoolsDeprecationWarning: setuptools.installer is deprecated. Requirements should be satisfied by a PEP 517 installer.
remote:                warnings.warn(
remote:              running install
remote:              /app/.heroku/python/lib/python3.10/site-packages/setuptools/command/install.py:34: SetuptoolsDeprecationWarning: setup.py install is deprecated. Use build and pip and other standards-based tools.
remote:                warnings.warn(
remote:              running build
remote:              running build_py
remote:              running create_version
remote:              running cmake_build
remote:              Using cmake args: ['/usr/bin/cmake', '-DPYTHON_INCLUDE_DIR=/app/.heroku/python/include/python3.10', '-DPYTHON_EXECUTABLE=/app/.heroku/python/bin/python', '-DBUILD_ONNX_PYTHON=ON', '-DCMAKE_EXPORT_COMPILE_COMMANDS=ON', '-DONNX_NAMESPACE=onnx', '-DPY_EXT_SUFFIX=.cpython-310-x86_64-linux-gnu.so', '-DCMAKE_BUILD_TYPE=Release', '-DONNX_ML=1', '/tmp/pip-install-eqmi_ksj/onnx_946b380e8f124485ad337a1910eaaad0']
remote:              Generated: /tmp/pip-install-eqmi_ksj/onnx_946b380e8f124485ad337a1910eaaad0/.setuptools-cmake-build/onnx/onnx-ml.proto
remote:              CMake Error at CMakeLists.txt:295 (message):
remote:                Protobuf compiler not found
remote:              Call Stack (most recent call first):
remote:                CMakeLists.txt:326 (relative_protobuf_generate_cpp)
remote:
remote:
remote:              -- Configuring incomplete, errors occurred!
remote:              See also "/tmp/pip-install-eqmi_ksj/onnx_946b380e8f124485ad337a1910eaaad0/.setuptools-cmake-build/CMakeFiles/CMakeOutput.log".
remote:              Traceback (most recent call last):
remote:                File "<string>", line 2, in <module>
remote:                File "<pip-setuptools-caller>", line 34, in <module>
remote:                File "/tmp/pip-install-eqmi_ksj/onnx_946b380e8f124485ad337a1910eaaad0/setup.py", line 336, in <module>
remote:                  setuptools.setup(
remote:                File "/app/.heroku/python/lib/python3.10/site-packages/setuptools/__init__.py", line 155, in setup
remote:                  return distutils.core.setup(**attrs)
remote:                File "/app/.heroku/python/lib/python3.10/site-packages/setuptools/_distutils/core.py", line 148, in setup
remote:                  return run_commands(dist)
remote:                File "/app/.heroku/python/lib/python3.10/site-packages/setuptools/_distutils/core.py", line 163, in run_commands
remote:                  dist.run_commands()
remote:                File "/app/.heroku/python/lib/python3.10/site-packages/setuptools/_distutils/dist.py", line 967, in run_commands
remote:                  self.run_command(cmd)
remote:                File "/app/.heroku/python/lib/python3.10/site-packages/setuptools/_distutils/dist.py", line 986, in run_command
remote:                  cmd_obj.run()
remote:                File "/app/.heroku/python/lib/python3.10/site-packages/setuptools/command/install.py", line 68, in run
remote:                  return orig.install.run(self)
remote:                File "/app/.heroku/python/lib/python3.10/site-packages/setuptools/_distutils/command/install.py", line 670, in run
remote:                  self.run_command('build')
remote:                File "/app/.heroku/python/lib/python3.10/site-packages/setuptools/_distutils/cmd.py", line 313, in run_command
remote:                  self.distribution.run_command(command)
remote:                File "/app/.heroku/python/lib/python3.10/site-packages/setuptools/_distutils/dist.py", line 986, in run_command
remote:                File "/app/.heroku/python/lib/python3.10/site-packages/setuptools/_distutils/command/build.py", line 135, in run
remote:                  self.run_command(cmd_name)
remote:                File "/app/.heroku/python/lib/python3.10/site-packages/setuptools/_distutils/cmd.py", line 313, in run_command
remote:                  self.distribution.run_command(command)
remote:                File "/app/.heroku/python/lib/python3.10/site-packages/setuptools/_distutils/dist.py", line 986, in run_command
remote:                  cmd_obj.run()
remote:                File "/tmp/pip-install-eqmi_ksj/onnx_946b380e8f124485ad337a1910eaaad0/setup.py", line 232, in run
remote:                  self.run_command('cmake_build')
remote:                File "/app/.heroku/python/lib/python3.10/site-packages/setuptools/_distutils/cmd.py", line 313, in run_command
remote:                  self.distribution.run_command(command)
remote:                File "/app/.heroku/python/lib/python3.10/site-packages/setuptools/_distutils/dist.py", line 986, in run_command
remote:                  cmd_obj.run()
remote:                File "/tmp/pip-install-eqmi_ksj/onnx_946b380e8f124485ad337a1910eaaad0/setup.py", line 218, in run
remote:                  subprocess.check_call(cmake_args)
remote:                File "/app/.heroku/python/lib/python3.10/subprocess.py", line 369, in check_call
remote:                  raise CalledProcessError(retcode, cmd)
remote:              subprocess.CalledProcessError: Command '['/usr/bin/cmake', '-DPYTHON_INCLUDE_DIR=/app/.heroku/python/include/python3.10', '-DPYTHON_EXECUTABLE=/app/.heroku/python/bin/python', '-DBUILD_ONNX_PYTHON=ON', '-DCMAKE_EXPORT_COMPILE_COMMANDS=ON', '-DONNX_NAMESPACE=onnx', '-DPY_EXT_SUFFIX=.cpython-310-x86_64-linux-gnu.so', '-DCMAKE_BUILD_TYPE=Release', '-DONNX_ML=1', '/tmp/pip-install-eqmi_ksj/onnx_946b380e8f124485ad337a1910eaaad0']' returned non-zero exit status 1.
remote:              [end of output]
remote:
remote:          note: This error originates from a subprocess, and is likely not a problem with pip.
remote:        error: legacy-install-failure
remote:
remote:        × Encountered error while trying to install package.
remote:        ╰─> onnx
remote:
remote:        note: This is an issue with the package mentioned above, not pip.
remote:        hint: See above for output from the failure.
remote:  !     Push rejected, failed to compile Python app.
remote:
remote:  !     Push failed
remote: Verifying deploy...
remote:
remote: !       Push rejected to mighty-shore-05958.
remote:
To https://git.heroku.com/mighty-shore-05958.git
 ! [remote rejected]     main -> main (pre-receive hook declined)
  • It seems likely that you snipped additional `remote:`-prefixed lines that come above the first one shown here. The first one shown here shows that `cmake` produced a failure indicator. Normally this means that something cmake itself ran *also* produced a failure indicator, presumably prefixed by a message describing the problem. In any case this has nothing to do with Git, which is just relaying messages from heroku, which in this case is relaying messages from pip which is relaying from cmake etc. – torek Jun 12 '22 at 00:27
  • What should i do? –  Jun 12 '22 at 00:38
  • Collect the entire error message, examine it from the top down looking for what went wrong. (And edit the posted question to include the whole thing, too.) – torek Jun 12 '22 at 00:44
  • I posted all the error sentences. –  Jun 12 '22 at 01:26
  • OK - you now need a heroku and/or package (and/or perhaps cmake) expert; the main problem is `Protobuf compiler not found` which means you're missing some sort of dependency on some sort of protobuf compiler. [This Stackoverflow posting may be related.](https://stackoverflow.com/q/45246013/1256452) – torek Jun 12 '22 at 01:53
  • As heroku docs states: "By default, newly created Python apps use the python-3.10.5 runtime". `onnx` is "not been supported yet (...). That's why PyPI let you build ONNX from source and bump into missing Protobuf error. To use ONNX in Python 3.10 now, you need to build ONNX from source. ". Concluding, you can specify lower Python version. – bc291 Jun 12 '22 at 09:05
  • To do so, please add `runtime.txt` in root project with e.g. `python-3.9.10` as a content. – bc291 Jun 12 '22 at 09:06

1 Answers1

1

As heroku docs states:

By default, newly created Python apps use the python-3.10.5 runtime

So I'm assuming you are running one.

onnx may not be compatible (without building onnx from source) with Python 3.10:

Python 3.10 wheel has not been supported yet (#3734), but next release ONNX will publish Python 3.10 wheel. That's why PyPI let you build ONNX from source and bump into missing Protobuf error. To use ONNX in Python 3.10 now, you need to build ONNX from source.

According to docs, you can do as follows:

Create runtime.txt in the project root with content:

python-3.9.10
bc291
  • 1,071
  • 11
  • 23