I am facing this issue while deploying my streamlit app

[     UTC     ] Logs for diabetes-jg5frwwg6xvzapp2vnv8zev.streamlit.app/
────────────────────────────────────────────────────────────────────────────────────────
[19:40:32] 🖥 Provisioning machine...
[19:40:32] 🎛 Preparing system...
[19:40:32] ⛓ Spinning up manager process...
[19:40:39] 🚀 Starting up repository: 'diabetes', branch: 'main', main module: 'app_main.py'
[19:40:39] 🐙 Cloning repository...
[19:40:40] 🐙 Cloning into '/mount/src/diabetes'...
Warning: Permanently added the ED25519 host key for IP address '192.30.255.112' to the list of known hosts.
[19:40:40] 🐙 Cloned repository!
[19:40:40] 🐙 Pulling code changes from Github...
[19:40:41] 📦 Processing dependencies...

──────────────────────────────────────── pip ───────────────────────────────────────────

Collecting seaborn==0.10.1
  Downloading seaborn-0.10.1-py3-none-any.whl (215 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 215.5/215.5 KB 8.4 MB/s eta 0:00:00[2024-01-22 19:40:42.632256] 
Collecting matplotlib==3.2.2
  Downloading matplotlib-3.2.2.tar.gz (40.3 MB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 40.3/40.3 MB 141.2 MB/s eta 0:00:00[2024-01-22 19:40:43.634520] 
  Preparing metadata (setup.py): started
  Preparing metadata (setup.py): finished with status 'done'
Collecting plotly==4.8.0
  Downloading plotly-4.8.0-py2.py3-none-any.whl (11.5 MB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 11.5/11.5 MB 136.3 MB/s eta 0:00:00[2024-01-22 19:40:49.552507] 
Collecting pandas==1.1.3
  Downloading pandas-1.1.3-cp39-cp39-manylinux1_x86_64.whl (9.3 MB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 9.3/9.3 MB 218.1 MB/s eta 0:00:00[2024-01-22 19:40:50.047087] 
Collecting numpy==1.19.2
  Downloading numpy-1.19.2.zip (7.3 MB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 7.3/7.3 MB 154.7 MB/s eta 0:00:00[2024-01-22 19:40:50.826485] 
  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 metadata (pyproject.toml): started
  Preparing metadata (pyproject.toml): finished with status 'error'
  error: subprocess-exited-with-error
  
  × Preparing metadata (pyproject.toml) did not run successfully.
  │ exit code: 1
  ╰─> [54 lines of output]
      Running from numpy source directory.
      setup.py:470: UserWarning: Unrecognized setuptools command, proceeding with generating Cython sources and expanding templates
        run_build = parse_setuppy_commands()
      
      Error compiling Cython file:
      ------------------------------------------------------------
      ...
                  self.rng_state.ctr.v[i] = counter[i]
      
              self._reset_state_variables()
      
              self._bitgen.state = <void *>&self.rng_state
              self._bitgen.next_uint64 = &philox_uint64
                                         ^
      ------------------------------------------------------------
      
      _philox.pyx:195:35: Cannot assign type 'uint64_t (*)(void *) except? -1 nogil' to 'uint64_t (*)(void *) noexcept nogil'. Exception values are incompatible. Suggest adding 'noexcept' to type 'uint64_t (void *) except? -1 nogil'.
      Processing numpy/random/_bounded_integers.pxd.in
      Processing numpy/random/_philox.pyx
      Traceback (most recent call last):
        File "/tmp/pip-install-d6fdi_no/numpy_094047f443f444e68eee9745ea9e0cb9/tools/cythonize.py", line 235, in <module>
          main()
        File "/tmp/pip-install-d6fdi_no/numpy_094047f443f444e68eee9745ea9e0cb9/tools/cythonize.py", line 231, in main
          find_process_files(root_dir)
        File "/tmp/pip-install-d6fdi_no/numpy_094047f443f444e68eee9745ea9e0cb9/tools/cythonize.py", line 222, in find_process_files
          process(root_dir, fromfile, tofile, function, hash_db)
        File "/tmp/pip-install-d6fdi_no/numpy_094047f443f444e68eee9745ea9e0cb9/tools/cythonize.py", line 188, in process
          processor_function(fromfile, tofile)
        File "/tmp/pip-install-d6fdi_no/numpy_094047f443f444e68eee9745ea9e0cb9/tools/cythonize.py", line 77, in process_pyx
          subprocess.check_call(
        File "/usr/local/lib/python3.9/subprocess.py", line 373, in check_call
          raise CalledProcessError(retcode, cmd)
      subprocess.CalledProcessError: Command '['/home/adminuser/venv/bin/python', '-m', 'cython', '-3', '--fast-fail', '-o', '_philox.c', '_philox.pyx']' returned non-zero exit status 1.
      Cythonizing sources
      Traceback (most recent call last):
        File "/home/adminuser/venv/lib/python3.9/site-packages/pip/_vendor/pep517/in_process/_in_process.py", line 363, in <module>
          main()
        File "/home/adminuser/venv/lib/python3.9/site-packages/pip/_vendor/pep517/in_process/_in_process.py", line 345, in main
          json_out['return_val'] = hook(**hook_input['kwargs'])
        File "/home/adminuser/venv/lib/python3.9/site-packages/pip/_vendor/pep517/in_process/_in_process.py", line 164, in prepare_metadata_for_build_wheel
          return hook(metadata_directory, config_settings)
        File "/tmp/pip-build-env-qjyq_69k/overlay/lib/python3.9/site-packages/setuptools/build_meta.py", line 157, in prepare_metadata_for_build_wheel
          self.run_setup()
        File "/tmp/pip-build-env-qjyq_69k/overlay/lib/python3.9/site-packages/setuptools/build_meta.py", line 248, in run_setup
          super(_BuildMetaLegacyBackend,
        File "/tmp/pip-build-env-qjyq_69k/overlay/lib/python3.9/site-packages/setuptools/build_meta.py", line 142, in run_setup
          exec(compile(code, __file__, 'exec'), locals())
        File "setup.py", line 499, in <module>
          setup_package()
        File "setup.py", line 479, in setup_package
          generate_cython()
        File "setup.py", line 274, in generate_cython
          raise RuntimeError("Running cythonize failed!")
      RuntimeError: Running cythonize failed!
      [end of output]
  
  note: This error originates from a subprocess, and is likely not a problem with pip.
error: metadata-generation-failed

× Encountered error while generating package metadata.
╰─> See above for output.

note: This is an issue with the package mentioned above, not pip.
hint: See above for details.
WARNING: You are using pip version 22.0.3; however, version 23.3.2 is available.
You should consider upgrading via the '/home/adminuser/venv/bin/python -m pip install --upgrade pip' command.
Checking if Streamlit is installed

────────────────────────────────────────────────────────────────────────────────────────

[19:41:01] ❗️ installer returned a non-zero exit code
[19:41:01] ❗️ Error during processing dependencies! Please fix the error and push an update, or try restarting the app.
[19:42:39] [     UTC     ] Logs for diabetes-jg5frwwg6xvzapp2vnv8zev.streamlit.app/

────────────────────────────────────────────────────────────────────────────────────────

[19:40:32] 🖥 Provisioning machine...

[19:40:32] 🎛 Preparing system...

[19:40:32] ⛓ Spinning up manager process...

[19:40:39] 🚀 Starting up repository: 'diabetes', branch: 'main', main module: 'app_main.py'

[19:40:39] 🐙 Cloning repository...

[19:40:40] 🐙 Cloning into '/mount/src/diabetes'...
Warning: Permanently added the ED25519 host key for IP address '192.30.255.112' to the list of known hosts.

[19:40:40] 🐙 Cloned repository!

[19:40:40] 🐙 Pulling code changes from Github...

[19:40:41] 📦 Processing dependencies...


──────────────────────────────────────── pip ───────────────────────────────────────────


Collecting seaborn==0.10.1

  Downloading seaborn-0.10.1-py3-none-any.whl (215 kB)

     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 215.5/215.5 KB 8.4 MB/s eta 0:00:00[2024-01-22 19:40:42.632256] 

Collecting matplotlib==3.2.2

  Downloading matplotlib-3.2.2.tar.gz (40.3 MB)

     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 40.3/40.3 MB 141.2 MB/s eta 0:00:00[2024-01-22 19:40:43.634520] 

  Preparing metadata (setup.py): started

  Preparing metadata (setup.py): finished with status 'done'

Collecting plotly==4.8.0

  Downloading plotly-4.8.0-py2.py3-none-any.whl (11.5 MB)

     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 11.5/11.5 MB 136.3 MB/s eta 0:00:00[2024-01-22 19:40:49.552507] 

Collecting pandas==1.1.3

  Downloading pandas-1.1.3-cp39-cp39-manylinux1_x86_64.whl (9.3 MB)

     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 9.3/9.3 MB 218.1 MB/s eta 0:00:00[2024-01-22 19:40:50.047087] 

Collecting numpy==1.19.2

  Downloading numpy-1.19.2.zip (7.3 MB)

     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 7.3/7.3 MB 154.7 MB/s eta 0:00:00[2024-01-22 19:40:50.826485] 

  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 metadata (pyproject.toml): started

  Preparing metadata (pyproject.toml): finished with status 'error'

  error: subprocess-exited-with-error

  

  × Preparing metadata (pyproject.toml) did not run successfully.

  │ exit code: 1

  ╰─> [54 lines of output]

      Running from numpy source directory.

      setup.py:470: UserWarning: Unrecognized setuptools command, proceeding with generating Cython sources and expanding templates

        run_build = parse_setuppy_commands()

      

      Error compiling Cython file:

      ------------------------------------------------------------

      ...

                  self.rng_state.ctr.v[i] = counter[i]

      

              self._reset_state_variables()

      

              self._bitgen.state = <void *>&self.rng_state

              self._bitgen.next_uint64 = &philox_uint64

                                         ^

      ------------------------------------------------------------

      

      _philox.pyx:195:35: Cannot assign type 'uint64_t (*)(void *) except? -1 nogil' to 'uint64_t (*)(void *) noexcept nogil'. Exception values are incompatible. Suggest adding 'noexcept' to type 'uint64_t (void *) except? -1 nogil'.

      Processing numpy/random/_bounded_integers.pxd.in

      Processing numpy/random/_philox.pyx

      Traceback (most recent call last):

        File "/tmp/pip-install-d6fdi_no/numpy_094047f443f444e68eee9745ea9e0cb9/tools/cythonize.py", line 235, in <module>

          main()

        File "/tmp/pip-install-d6fdi_no/numpy_094047f443f444e68eee9745ea9e0cb9/tools/cythonize.py", line 231, in main

          find_process_files(root_dir)

        File "/tmp/pip-install-d6fdi_no/numpy_094047f443f444e68eee9745ea9e0cb9/tools/cythonize.py", line 222, in find_process_files

          process(root_dir, fromfile, tofile, function, hash_db)

        File "/tmp/pip-install-d6fdi_no/numpy_094047f443f444e68eee9745ea9e0cb9/tools/cythonize.py", line 188, in process

          processor_function(fromfile, tofile)

        File "/tmp/pip-install-d6fdi_no/numpy_094047f443f444e68eee9745ea9e0cb9/tools/cythonize.py", line 77, in process_pyx

          subprocess.check_call(

        File "/usr/local/lib/python3.9/subprocess.py", line 373, in check_call

          raise CalledProcessError(retcode, cmd)

      subprocess.CalledProcessError: Command '['/home/adminuser/venv/bin/python', '-m', 'cython', '-3', '--fast-fail', '-o', '_philox.c', '_philox.pyx']' returned non-zero exit status 1.

      Cythonizing sources

      Traceback (most recent call last):

        File "/home/adminuser/venv/lib/python3.9/site-packages/pip/_vendor/pep517/in_process/_in_process.py", line 363, in <module>

          main()

        File "/home/adminuser/venv/lib/python3.9/site-packages/pip/_vendor/pep517/in_process/_in_process.py", line 345, in main

          json_out['return_val'] = hook(**hook_input['kwargs'])

        File "/home/adminuser/venv/lib/python3.9/site-packages/pip/_vendor/pep517/in_process/_in_process.py", line 164, in prepare_metadata_for_build_wheel

          return hook(metadata_directory, config_settings)

        File "/tmp/pip-build-env-qjyq_69k/overlay/lib/python3.9/site-packages/setuptools/build_meta.py", line 157, in prepare_metadata_for_build_wheel

          self.run_setup()

        File "/tmp/pip-build-env-qjyq_69k/overlay/lib/python3.9/site-packages/setuptools/build_meta.py", line 248, in run_setup

          super(_BuildMetaLegacyBackend,

        File "/tmp/pip-build-env-qjyq_69k/overlay/lib/python3.9/site-packages/setuptools/build_meta.py", line 142, in run_setup

          exec(compile(code, __file__, 'exec'), locals())

        File "setup.py", line 499, in <module>

          setup_package()

        File "setup.py", line 479, in setup_package

          generate_cython()

        File "setup.py", line 274, in generate_cython

          raise RuntimeError("Running cythonize failed!")

      RuntimeError: Running cythonize failed!

      [end of output]

  

  note: This error originates from a subprocess, and is likely not a problem with pip.

error: metadata-generation-failed


× Encountered error while generating package metadata.

╰─> See above for output.


note: This is an issue with the package mentioned above, not pip.

hint: See above for details.

WARNING: You are using pip version 22.0.3; however, version 23.3.2 is available.

You should consider upgrading via the '/home/adminuser/venv/bin/python -m pip install --upgrade pip' command.

Checking if Streamlit is installed


────────────────────────────────────────────────────────────────────────────────────────


[19:41:01] ❗️ installer returned a non-zero exit code

[19:41:01] ❗️ Error during processing dependencies! Please fix the error and push an update, or try restarting the app.

[19:42:39] ❗️ Streamlit server consistently failed status checks

[19:42:39] ❗️ Please fix the errors, push an update to the git repo, or reboot the app.❗️ Streamlit server consistently failed status checks
[19:42:39] ❗️ Please fix the errors, push an update to the git repo, or reboot the app.

Hi @aniketh_survi

There seems to be an error in processing the library dependencies:

It is most likely due to issues with compiling Cython:

Could you recheck the code to address.

Specify at least numpy==1.19.3.

C:\Users\hp\ml_streamlit>pip install numpy==1.19.3
Collecting numpy==1.19.3
Downloading numpy-1.19.3.zip (7.3 MB)
---------------------------------------- 7.3/7.3 MB 1.8 MB/s eta 0:00:00
Installing build dependencies … done
Getting requirements to build wheel … done
ERROR: Exception:
Traceback (most recent call last):
File “C:\Users\hp\AppData\Local\Programs\Python\Python312\Lib\site-packages\pip_internal\cli\base_command.py”, line 180, in exc_logging_wrapper
status = run_func(*args)
^^^^^^^^^^^^^^^
File “C:\Users\hp\AppData\Local\Programs\Python\Python312\Lib\site-packages\pip_internal\cli\req_command.py”, line 245, in wrapper
return func(self, options, args)
^^^^^^^^^^^^^^^^^^^^^^^^^
File “C:\Users\hp\AppData\Local\Programs\Python\Python312\Lib\site-packages\pip_internal\commands\install.py”, line 377, in run
requirement_set = resolver.resolve(
^^^^^^^^^^^^^^^^^
File “C:\Users\hp\AppData\Local\Programs\Python\Python312\Lib\site-packages\pip_internal\resolution\resolvelib\resolver.py”, line 95, in resolve
result = self._result = resolver.resolve(
^^^^^^^^^^^^^^^^^
File “C:\Users\hp\AppData\Local\Programs\Python\Python312\Lib\site-packages\pip_vendor\resolvelib\resolvers.py”, line 546, in resolve
state = resolution.resolve(requirements, max_rounds=max_rounds)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File “C:\Users\hp\AppData\Local\Programs\Python\Python312\Lib\site-packages\pip_vendor\resolvelib\resolvers.py”, line 397, in resolve
self._add_to_criteria(self.state.criteria, r, parent=None)
File “C:\Users\hp\AppData\Local\Programs\Python\Python312\Lib\site-packages\pip_vendor\resolvelib\resolvers.py”, line 173, in _add_to_criteria
if not criterion.candidates:
^^^^^^^^^^^^^^^^^^^^
File “C:\Users\hp\AppData\Local\Programs\Python\Python312\Lib\site-packages\pip_vendor\resolvelib\structs.py”, line 156, in bool
return bool(self._sequence)
^^^^^^^^^^^^^^^^^^^^
File “C:\Users\hp\AppData\Local\Programs\Python\Python312\Lib\site-packages\pip_internal\resolution\resolvelib\found_candidates.py”, line 155, in bool
return any(self)
^^^^^^^^^
File “C:\Users\hp\AppData\Local\Programs\Python\Python312\Lib\site-packages\pip_internal\resolution\resolvelib\found_candidates.py”, line 143, in
return (c for c in iterator if id(c) not in self._incompatible_ids)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File “C:\Users\hp\AppData\Local\Programs\Python\Python312\Lib\site-packages\pip_internal\resolution\resolvelib\found_candidates.py”, line 47, in _iter_built
candidate = func()
^^^^^^
File “C:\Users\hp\AppData\Local\Programs\Python\Python312\Lib\site-packages\pip_internal\resolution\resolvelib\factory.py”, line 182, in _make_candidate_from_link
base: Optional[BaseCandidate] = self._make_base_candidate_from_link(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File “C:\Users\hp\AppData\Local\Programs\Python\Python312\Lib\site-packages\pip_internal\resolution\resolvelib\factory.py”, line 228, in _make_base_candidate_from_link
self._link_candidate_cache[link] = LinkCandidate(
^^^^^^^^^^^^^^
File “C:\Users\hp\AppData\Local\Programs\Python\Python312\Lib\site-packages\pip_internal\resolution\resolvelib\candidates.py”, line 293, in init
super().init(
File “C:\Users\hp\AppData\Local\Programs\Python\Python312\Lib\site-packages\pip_internal\resolution\resolvelib\candidates.py”, line 156, in init
self.dist = self._prepare()
^^^^^^^^^^^^^^^
File “C:\Users\hp\AppData\Local\Programs\Python\Python312\Lib\site-packages\pip_internal\resolution\resolvelib\candidates.py”, line 225, in _prepare
dist = self._prepare_distribution()
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File “C:\Users\hp\AppData\Local\Programs\Python\Python312\Lib\site-packages\pip_internal\resolution\resolvelib\candidates.py”, line 304, in _prepare_distribution
return preparer.prepare_linked_requirement(self._ireq, parallel_builds=True)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File “C:\Users\hp\AppData\Local\Programs\Python\Python312\Lib\site-packages\pip_internal\operations\prepare.py”, line 525, in prepare_linked_requirement
return self._prepare_linked_requirement(req, parallel_builds)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File “C:\Users\hp\AppData\Local\Programs\Python\Python312\Lib\site-packages\pip_internal\operations\prepare.py”, line 640, in _prepare_linked_requirement
dist = _get_prepared_distribution(
^^^^^^^^^^^^^^^^^^^^^^^^^^^
File “C:\Users\hp\AppData\Local\Programs\Python\Python312\Lib\site-packages\pip_internal\operations\prepare.py”, line 71, in _get_prepared_distribution
abstract_dist.prepare_distribution_metadata(
File “C:\Users\hp\AppData\Local\Programs\Python\Python312\Lib\site-packages\pip_internal\distributions\sdist.py”, line 54, in prepare_distribution_metadata
self._install_build_reqs(finder)
File “C:\Users\hp\AppData\Local\Programs\Python\Python312\Lib\site-packages\pip_internal\distributions\sdist.py”, line 124, in _install_build_reqs
build_reqs = self._get_build_requires_wheel()
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File “C:\Users\hp\AppData\Local\Programs\Python\Python312\Lib\site-packages\pip_internal\distributions\sdist.py”, line 101, in _get_build_requires_wheel
return backend.get_requires_for_build_wheel()
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File “C:\Users\hp\AppData\Local\Programs\Python\Python312\Lib\site-packages\pip_internal\utils\misc.py”, line 751, in get_requires_for_build_wheel
return super().get_requires_for_build_wheel(config_settings=cs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File “C:\Users\hp\AppData\Local\Programs\Python\Python312\Lib\site-packages\pip_vendor\pyproject_hooks_impl.py”, line 166, in get_requires_for_build_wheel
return self._call_hook(‘get_requires_for_build_wheel’, {
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File “C:\Users\hp\AppData\Local\Programs\Python\Python312\Lib\site-packages\pip_vendor\pyproject_hooks_impl.py”, line 321, in _call_hook
raise BackendUnavailable(data.get(‘traceback’, ‘’))
pip._vendor.pyproject_hooks._impl.BackendUnavailable: Traceback (most recent call last):
File “C:\Users\hp\AppData\Local\Programs\Python\Python312\Lib\site-packages\pip_vendor\pyproject_hooks_in_process_in_process.py”, line 77, in build_backend
obj = import_module(mod_path)
^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\hp\AppData\Local\Programs\Python\Python312\Lib\importlib_init
.py", line 90, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File “”, line 1387, in _gcd_import
File “”, line 1360, in _find_and_load
File “”, line 1310, in _find_and_load_unlocked
File “”, line 488, in _call_with_frames_removed
File “”, line 1387, in _gcd_import
File “”, line 1360, in _find_and_load
File “”, line 1331, in _find_and_load_unlocked
File “”, line 935, in _load_unlocked
File “”, line 994, in exec_module
File “”, line 488, in call_with_frames_removed
File "C:\Users\hp\AppData\Local\Temp\pip-build-env-wch6t3oi\overlay\Lib\site-packages\setuptools_init
.py", line 18, in
from setuptools.extern.six import PY3, string_types
ModuleNotFoundError: No module named ‘setuptools.extern.six’

could you check my github repo once, i am a complete begineer

If you are using python 3.12, you want at least numpy==1.26.0.

thank you
new error = AttributeError: module ‘streamlit’ has no attribute ‘set_page_config’

Traceback:

File "/home/adminuser/venv/lib/python3.9/site-packages/streamlit/script_runner.py", line 324, in _run_script
    exec(code, module.__dict__)File "/mount/src/pred_diabetes/app_main.py", line 16, in <module>
    st.set_page_config(**page_config,initial_sidebar_state = 'expanded')

could anyone solve this
???

st.set_page_config was introduced in Streamlit 0.70.0.

Apparently you are specifying package versions without a good reason and that is causing you some trouble. Maybe you should just remove the version specifiers?

thank you

one final error

ModuleNotFoundError: This app has encountered an error. The original error message is redacted to prevent data leaks. Full error details have been recorded in the logs (if you’re on Streamlit Cloud, click on ‘Manage app’ in the lower right of your app).

Traceback:

File "/home/adminuser/venv/lib/python3.9/site-packages/streamlit/runtime/scriptrunner/script_runner.py", line 535, in _run_script
    exec(code, module.__dict__)File "/mount/src/pred_diabetes/app_main.py", line 46, in <module>
    main()File "/mount/src/pred_diabetes/app_main.py", line 41, in main
    run_ml_app()File "/mount/src/pred_diabetes/ml_app.py", line 58, in run_ml_app
    loaded_model = load_model("logistic_regression_model_diabetes_21_oct_2020.pkl")File "/mount/src/pred_diabetes/ml_app.py", line 52, in load_model
    loaded_model = joblib.load(open(os.path.join(model_file),"rb"))File "/home/adminuser/venv/lib/python3.9/site-packages/joblib/numpy_pickle.py", line 648, in load
    obj = _unpickle(fobj)File "/home/adminuser/venv/lib/python3.9/site-packages/joblib/numpy_pickle.py", line 577, in _unpickle
    obj = unpickler.load()File "/usr/local/lib/python3.9/pickle.py", line 1212, in load
    dispatch[key[0]](self)File "/usr/local/lib/python3.9/pickle.py", line 1528, in load_global
    klass = self.find_class(module, name)File "/usr/local/lib/python3.9/pickle.py", line 1579, in find_class
    __import__(module, level=0)
[15:59:18] 🔄 Updated app!
2024-01-23 15:59:35.210 Serialization of dataframe to Arrow table was unsuccessful due to: ("Could not convert dtype('int64') with type numpy.dtypes.Int64DType: did not recognize Python value type when inferring an Arrow data type", 'Conversion failed for column 0 with type object'). Applying automatic fixes for column types to make the dataframe Arrow-compatible.
2024-01-23 15:59:37.788 Serialization of dataframe to Arrow table was unsuccessful due to: ("Could not convert dtype('int64') with type numpy.dtypes.Int64DType: did not recognize Python value type when inferring an Arrow data type", 'Conversion failed for column 0 with type object'). Applying automatic fixes for column types to make the dataframe Arrow-compatible.
2024-01-23 15:59:40.181 Serialization of dataframe to Arrow table was unsuccessful due to: ("Could not convert dtype('int64') with type numpy.dtypes.Int64DType: did not recognize Python value type when inferring an Arrow data type", 'Conversion failed for column 0 with type object'). Applying automatic fixes for column types to make the dataframe Arrow-compatible.
/home/adminuser/venv/lib/python3.9/site-packages/plotly/express/_core.py:2065: FutureWarning:

When grouping with a length-1 list-like, you will need to pass a length-1 tuple to get_group in a future version of pandas. Pass `(name,)` instead of `name` to silence this warning.

2024-01-23 15:59:51.645 Uncaught app exception
Traceback (most recent call last):
  File "/home/adminuser/venv/lib/python3.9/site-packages/streamlit/runtime/scriptrunner/script_runner.py", line 535, in _run_script
    exec(code, module.__dict__)
  File "/mount/src/pred_diabetes/app_main.py", line 46, in <module>
    main()
  File "/mount/src/pred_diabetes/app_main.py", line 41, in main
    run_ml_app()
  File "/mount/src/pred_diabetes/ml_app.py", line 58, in run_ml_app
    loaded_model = load_model("logistic_regression_model_diabetes_21_oct_2020.pkl")
  File "/mount/src/pred_diabetes/ml_app.py", line 52, in load_model
    loaded_model = joblib.load(open(os.path.join(model_file),"rb"))
  File "/home/adminuser/venv/lib/python3.9/site-packages/joblib/numpy_pickle.py", line 648, in load
    obj = _unpickle(fobj)
  File "/home/adminuser/venv/lib/python3.9/site-packages/joblib/numpy_pickle.py", line 577, in _unpickle
    obj = unpickler.load()
  File "/usr/local/lib/python3.9/pickle.py", line 1212, in load
    dispatch[key[0]](self)
  File "/usr/local/lib/python3.9/pickle.py", line 1528, in load_global
    klass = self.find_class(module, name)
  File "/usr/local/lib/python3.9/pickle.py", line 1579, in find_class
    __import__(module, level=0)
ModuleNotFoundError: No module named 'sklearn'

You need scikit-learn.

Could not build wheels for scikit-learn, which is required to install pyproject.toml-based projects

:balloon: Using Streamlit

streamlit-cloud

aniketh_survi

5h

  note: This error originates from a subprocess, and is likely not a problem with pip.
  ERROR: Failed building wheel for scikit-learn
Failed to build scikit-learn
ERROR: Could not build wheels for scikit-learn, which is required to install pyproject.toml-based projects
WARNING: You are using pip version 22.0.3; however, version 23.3.2 is available.
You should consider upgrading via the '/home/adminuser/venv/bin/python -m pip install --upgrade pip' command.
Checking if Streamlit is installed

I forked your repo at 127fed1 and depoyed with python 3.9 without issues. If it doesn’t work for you try rebooting the application. If that doesn’t work either try redeploying (delete the app from share.streamlit.io and create it again).

1 Like

Hi @aniketh_survi

Agreeing with @Goyo on rebooting the app after making changes to the requirements.txt file in order to ensure that the server installs the newly added library.