Exited with status 1 while building your code. (Unable to Deploy my streamlit app)

error  Getting requirements to build wheel: finished with status 'error'
error  error: subprocess-exited-with-error
info  
info  × Getting requirements to build wheel did not run successfully.
info  │ exit code: 1
info  ╰─> [21 lines of output]
info      Traceback (most recent call last):
info        File "/opt/render/project/src/.venv/lib/python3.11/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 353, in <module>
info          main()
info        File "/opt/render/project/src/.venv/lib/python3.11/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 335, in main
info          json_out['return_val'] = hook(**hook_input['kwargs'])
info                                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
info        File "/opt/render/project/src/.venv/lib/python3.11/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 118, in get_requires_for_build_wheel
info          return hook(config_settings)
info                 ^^^^^^^^^^^^^^^^^^^^^
info        File "/tmp/pip-build-env-k7d601hj/overlay/lib/python3.11/site-packages/setuptools/build_meta.py", line 332, in get_requires_for_build_wheel
info          return self._get_build_requires(config_settings, requirements=[])
info                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
info        File "/tmp/pip-build-env-k7d601hj/overlay/lib/python3.11/site-packages/setuptools/build_meta.py", line 302, in _get_build_requires
info          self.run_setup()
info        File "/tmp/pip-build-env-k7d601hj/overlay/lib/python3.11/site-packages/setuptools/build_meta.py", line 516, in run_setup
info          super().run_setup(setup_script=setup_script)
info        File "/tmp/pip-build-env-k7d601hj/overlay/lib/python3.11/site-packages/setuptools/build_meta.py", line 318, in run_setup
info          exec(code, locals())
info        File "<string>", line 51, in <module>
info        File "<string>", line 48, in _guard_py_ver
info      RuntimeError: Cannot install on Python version 3.11.9; only versions >=3.7,<3.11 are supported.
info      [end of output]
info  
error  note: This error originates from a subprocess, and is likely not a problem with pip.
errorerror: subprocess-exited-with-error
info
info× Getting requirements to build wheel did not run successfully.
info│ exit code: 1
info╰─> See above for output.
info
errornote: This error originates from a subprocess, and is likely not a problem with pip.

My Python version is 3.10 and i tested in local and it was no bug and perfect. when i deploy it said “Exited with status 1 while building your code.”. I tried changed the env setting in render to 3.10 and redeploy it but it doesn’t work and still show the Error. Help!!!

HI,

The logs you shared show:

Cannot install on Python version 3.11.9; only versions >=3.7,<3.11 are supported.

This implies you’ve not set the Python version on the Render service.

The version being used and a link on how to change it are shown at the start of the deploy logs and will look like:

==> Using Python version 3.11.9 (default)
==> Docs on specifying a Python version: https://render.com/docs/python-version

I set PYTHON_VERSION 3.10.1 in environment and Still Exited with status 1 while building your code error. This time.

infoUsing legacy 'setup.py install' for llvmlite, since package 'wheel' is not installed.
infoInstalling collected packages: rpds-py, attrs, referencing, urllib3, smmap, six, pillow, packaging, numpy, mpmath, mdurl, MarkupSafe, llvmlite, jsonschema-specifications, idna, humanfriendly, charset-normalizer, certifi, tzdata, typing-extensions, tifffile, sympy, scipy, requests, pytz, python-dateutil, pygments, protobuf, platformdirs, numba, networkx, narwhals, markdown-it-py, lazy-loader, jsonschema, jinja2, imageio, gitdb, flatbuffers, coloredlogs, watchdog, tqdm, tornado, toml, tenacity, scikit-image, rich, pymatting, pydeck, pyarrow, pooch, pandas, opencv-python-headless, onnxruntime, gitpython, click, cachetools, blinker, altair, streamlit, rembg, opencv-python
info    Running setup.py install for llvmlite: started
error    Running setup.py install for llvmlite: finished with status 'error'
error    ERROR: Command errored out with exit status 1:
info     command: /opt/render/project/src/.venv/bin/python3.10 -u -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-ufi0zh9f/llvmlite_11a3add7d2f34ba09689e86e4fa95f9f/setup.py'"'"'; __file__='"'"'/tmp/pip-install-ufi0zh9f/llvmlite_11a3add7d2f34ba09689e86e4fa95f9f/setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(__file__) if os.path.exists(__file__) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /tmp/pip-record-7w8724zc/install-record.txt --single-version-externally-managed --compile --install-headers /opt/render/project/src/.venv/include/site/python3.10/llvmlite
info         cwd: /tmp/pip-install-ufi0zh9f/llvmlite_11a3add7d2f34ba09689e86e4fa95f9f/
info    Complete output (29 lines):
info    running install
info    running build
info    got version from file /tmp/pip-install-ufi0zh9f/llvmlite_11a3add7d2f34ba09689e86e4fa95f9f/llvmlite/_version.py {'version': '0.34.0', 'full': 'c5889c9e98c6b19d5d85ebdd982d64a03931f8e2'}
info    running build_ext
info    /opt/render/project/src/.venv/bin/python3.10 /tmp/pip-install-ufi0zh9f/llvmlite_11a3add7d2f34ba09689e86e4fa95f9f/ffi/build.py
info    LLVM version... Traceback (most recent call last):
info      File "/tmp/pip-install-ufi0zh9f/llvmlite_11a3add7d2f34ba09689e86e4fa95f9f/ffi/build.py", line 105, in main_posix
info        out = subprocess.check_output([llvm_config, '--version'])
info      File "/opt/render/project/python/Python-3.10.1/lib/python3.10/subprocess.py", line 420, in check_output
info        return run(*popenargs, stdout=PIPE, timeout=timeout, check=True,
info      File "/opt/render/project/python/Python-3.10.1/lib/python3.10/subprocess.py", line 501, in run
info        with Popen(*popenargs, **kwargs) as process:
info      File "/opt/render/project/python/Python-3.10.1/lib/python3.10/subprocess.py", line 966, in __init__
info        self._execute_child(args, executable, preexec_fn, close_fds,
info      File "/opt/render/project/python/Python-3.10.1/lib/python3.10/subprocess.py", line 1842, in _execute_child
info        raise child_exception_type(errno_num, err_msg, err_filename)
info    FileNotFoundError: [Errno 2] No such file or directory: 'llvm-config'
info    
info    During handling of the above exception, another exception occurred:
info    
info    Traceback (most recent call last):
info      File "/tmp/pip-install-ufi0zh9f/llvmlite_11a3add7d2f34ba09689e86e4fa95f9f/ffi/build.py", line 191, in <module>
info        main()
info      File "/tmp/pip-install-ufi0zh9f/llvmlite_11a3add7d2f34ba09689e86e4fa95f9f/ffi/build.py", line 181, in main
info        main_posix('linux', '.so')
info      File "/tmp/pip-install-ufi0zh9f/llvmlite_11a3add7d2f34ba09689e86e4fa95f9f/ffi/build.py", line 107, in main_posix
info        raise RuntimeError("%s failed executing, please point LLVM_CONFIG "
info    RuntimeError: llvm-config failed executing, please point LLVM_CONFIG to the path for llvm-config
error    error: command '/opt/render/project/src/.venv/bin/python3.10' failed with exit code 1
info    ----------------------------------------
errorERROR: Command errored out with exit status 1: /opt/render/project/src/.venv/bin/python3.10 -u -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-ufi0zh9f/llvmlite_11a3add7d2f34ba09689e86e4fa95f9f/setup.py'"'"'; __file__='"'"'/tmp/pip-install-ufi0zh9f/llvmlite_11a3add7d2f34ba09689e86e4fa95f9f/setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(__file__) if os.path.exists(__file__) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /tmp/pip-record-7w8724zc/install-record.txt --single-version-externally-managed --compile --install-headers /opt/render/project/src/.venv/include/site/python3.10/llvmlite Check the logs for full command output.
warningWARNING: You are using pip version 21.2.4; however, version 24.2 is available.
infoYou should consider upgrading via the '/opt/render/project/src/.venv/bin/python3.10 -m pip install --upgrade pip' command.
info==> Build failed 😞
info==> Common ways to troubleshoot your deploy: https://docs.render.com/troubleshooting-deploys

I check my code in local and it’s work fine. Please help…

There will always be differences between environments: development mode/Local, production mode/Render, OS, versions, resources, etc. These differences need to be considered and configured as required for your own app in each environment.

Again, the error is shown in the logs you shared:

RuntimeError: llvm-config failed executing, please point LLVM_CONFIG to the path for llvm-config

LLVM is not installed on Render Native Runtimes: https://docs.render.com/native-runtimes#tools-and-utilities

If you need custom OS-level packages you’ll likely need to use Docker to set up your own environment as your app requires. Then deploy that to Render.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.