Getting error while publishing app

https://nifty500.streamlit.app/

Python 3.10.13
Streamlit, version 1.30.0

[     UTC     ] Logs for niftydata500.streamlit.app/
────────────────────────────────────────────────────────────────────────────────────────
[04:47:35] 🖥 Provisioning machine...
[04:47:35] 🎛 Preparing system...
[04:47:35] ⛓ Spinning up manager process...
[04:48:02] 🚀 Starting up repository: 'niftydata-app', branch: 'master', main module: 'nifty-app.py'
[04:48:02] 🐙 Cloning repository...
[04:48:04] 🐙 Cloning into '/mount/src/niftydata-app'...
Warning: Permanently added the ED25519 host key for IP address '192.30.255.113' to the list of known hosts.
[04:48:04] 🐙 Cloned repository!
[04:48:04] 🐙 Pulling code changes from Github...
[04:48:05] 📦 Processing dependencies...
[04:48:05] 📦 Apt dependencies were installed from /mount/src/niftydata-app/packages.txt using apt-get.
Hit:1 http://deb.debian.org/debian bullseye InRelease
Hit:2 http://deb.debian.org/debian-security bullseye-security InRelease
Get:3 http://deb.debian.org/debian bullseye-updates InRelease [44.1 kB]
Hit:4 https://packages.microsoft.com/debian/11/prod bullseye InRelease
Fetched 44.1 kB in 0s (104 kB/s)
Reading package lists...[2024-01-20 04:48:06.592625] 
Reading package lists...[2024-01-20 04:48:07.289187] 
Building dependency tree...[2024-01-20 04:48:07.520683] 
Reading state information...[2024-01-20 04:48:07.521136] 
The following additional packages will be installed:
  icu-devtools libicu-dev libxml2-dev libxslt1.1
Suggested packages:
  icu-doc libssl-doc pkg-config
The following NEW packages will be installed:
  icu-devtools libffi-dev libicu-dev libssl-dev libxml2-dev libxslt1-dev
  libxslt1.1
0 upgraded, 7 newly installed, 0 to remove and 0 not upgraded.
Need to get 13.0 MB of archives.
After this operation, 60.5 MB of additional disk space will be used.
Get:1 http://deb.debian.org/debian bullseye/main amd64 icu-devtools amd64 67.1-7 [201 kB]
Get:2 http://deb.debian.org/debian bullseye/main amd64 libffi-dev amd64 3.3-6 [56.5 kB]
Get:3 http://deb.debian.org/debian bullseye/main amd64 libicu-dev amd64 67.1-7 [9597 kB]
Get:4 http://deb.debian.org/debian bullseye/main amd64 libssl-dev amd64 1.1.1w-0+deb11u1 [1820 kB]
Get:5 http://deb.debian.org/debian bullseye/main amd64 libxml2-dev amd64 2.9.10+dfsg-6.7+deb11u4 [790 kB]
Get:6 http://deb.debian.org/debian bullseye/main amd64 libxslt1.1 amd64 1.1.34-4+deb11u1 [240 kB]
Get:7 http://deb.debian.org/debian bullseye/main amd64 libxslt1-dev amd64 1.1.34-4+deb11u1 [329 kB]
debconf: delaying package configuration, since apt-utils is not installed
Fetched 13.0 MB in 0s (85.8 MB/s)
Selecting previously unselected package icu-devtools.
(Reading database ... 22031 files and directories currently installed.)
Preparing to unpack .../0-icu-devtools_67.1-7_amd64.deb ...
Unpacking icu-devtools (67.1-7) ...
Selecting previously unselected package libffi-dev:amd64.
Preparing to unpack .../1-libffi-dev_3.3-6_amd64.deb ...
Unpacking libffi-dev:amd64 (3.3-6) ...
Selecting previously unselected package libicu-dev:amd64.
Preparing to unpack .../2-libicu-dev_67.1-7_amd64.deb ...
Unpacking libicu-dev:amd64 (67.1-7) ...
Selecting previously unselected package libssl-dev:amd64.
Preparing to unpack .../3-libssl-dev_1.1.1w-0+deb11u1_amd64.deb ...
Unpacking libssl-dev:amd64 (1.1.1w-0+deb11u1) ...
Selecting previously unselected package libxml2-dev:amd64.
Preparing to unpack .../4-libxml2-dev_2.9.10+dfsg-6.7+deb11u4_amd64.deb ...
Unpacking libxml2-dev:amd64 (2.9.10+dfsg-6.7+deb11u4) ...
Selecting previously unselected package libxslt1.1:amd64.
Preparing to unpack .../5-libxslt1.1_1.1.34-4+deb11u1_amd64.deb ...
Unpacking libxslt1.1:amd64 (1.1.34-4+deb11u1) ...
Selecting previously unselected package libxslt1-dev:amd64.
Preparing to unpack .../6-libxslt1-dev_1.1.34-4+deb11u1_amd64.deb ...
Unpacking libxslt1-dev:amd64 (1.1.34-4+deb11u1) ...
Setting up libffi-dev:amd64 (3.3-6) ...
Setting up libssl-dev:amd64 (1.1.1w-0+deb11u1) ...
Setting up icu-devtools (67.1-7) ...
Setting up libxslt1.1:amd64 (1.1.34-4+deb11u1) ...
Setting up libicu-dev:amd64 (67.1-7) ...
Setting up libxml2-dev:amd64 (2.9.10+dfsg-6.7+deb11u4) ...
Setting up libxslt1-dev:amd64 (1.1.34-4+deb11u1) ...
Processing triggers for libc-bin (2.31-13+deb11u7) ...

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

Collecting streamlit==0.61.0
  Downloading streamlit-0.61.0-py2.py3-none-any.whl (7.1 MB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 7.1/7.1 MB 31.0 MB/s eta 0:00:00[2024-01-20 04:48:12.165165] 
Collecting pandas==0.25.3
  Downloading pandas-0.25.3.tar.gz (12.6 MB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 12.6/12.6 MB 145.5 MB/s eta 0:00:00[2024-01-20 04:48:12.615153] 
  Preparing metadata (setup.py): started
  Preparing metadata (setup.py): finished with status 'done'
Collecting lxml==4.5.1
  Downloading lxml-4.5.1.tar.gz (4.5 MB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 4.5/4.5 MB 238.7 MB/s eta 0:00:00[2024-01-20 04:48:16.627924] 
  Preparing metadata (setup.py): started
  Preparing metadata (setup.py): finished with status 'done'
Collecting numpy==1.19
  Downloading numpy-1.19.0.zip (7.3 MB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 7.3/7.3 MB 147.9 MB/s eta 0:00:00[2024-01-20 04:48:17.967529] 
  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.
      <string>:460: UserWarning: Unrecognized setuptools command, proceeding with generating Cython sources and expanding templates
      /tmp/pip-install-pq9s2egn/numpy_d3c2fecc7043447c838ffbcf8c5ff3d6/tools/cythonize.py:73: DeprecationWarning: distutils Version classes are deprecated. Use packaging.version instead.
        required_version = LooseVersion('0.29.14')
      /tmp/pip-install-pq9s2egn/numpy_d3c2fecc7043447c838ffbcf8c5ff3d6/tools/cythonize.py:75: DeprecationWarning: distutils Version classes are deprecated. Use packaging.version instead.
        if LooseVersion(cython_version) < required_version:
      
      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-pq9s2egn/numpy_d3c2fecc7043447c838ffbcf8c5ff3d6/tools/cythonize.py", line 235, in <module>
          main()
        File "/tmp/pip-install-pq9s2egn/numpy_d3c2fecc7043447c838ffbcf8c5ff3d6/tools/cythonize.py", line 231, in main
          find_process_files(root_dir)
        File "/tmp/pip-install-pq9s2egn/numpy_d3c2fecc7043447c838ffbcf8c5ff3d6/tools/cythonize.py", line 222, in find_process_files
          process(root_dir, fromfile, tofile, function, hash_db)
        File "/tmp/pip-install-pq9s2egn/numpy_d3c2fecc7043447c838ffbcf8c5ff3d6/tools/cythonize.py", line 188, in process
          processor_function(fromfile, tofile)
        File "/tmp/pip-install-pq9s2egn/numpy_d3c2fecc7043447c838ffbcf8c5ff3d6/tools/cythonize.py", line 77, in process_pyx
          subprocess.check_call(
        File "/usr/local/lib/python3.10/subprocess.py", line 369, 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.10/site-packages/pip/_vendor/pep517/in_process/_in_process.py", line 363, in <module>
          main()
        File "/home/adminuser/venv/lib/python3.10/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.10/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-01uhmb25/overlay/lib/python3.10/site-packages/setuptools/build_meta.py", line 366, in prepare_metadata_for_build_wheel
          self.run_setup()
        File "/tmp/pip-build-env-01uhmb25/overlay/lib/python3.10/site-packages/setuptools/build_meta.py", line 480, in run_setup
          super(_BuildMetaLegacyBackend, self).run_setup(setup_script=setup_script)
        File "/tmp/pip-build-env-01uhmb25/overlay/lib/python3.10/site-packages/setuptools/build_meta.py", line 311, in run_setup
          exec(code, locals())
        File "<string>", line 489, in <module>
        File "<string>", line 469, in setup_package
        File "<string>", line 274, in generate_cython
      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

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

[04:48:25] ❗️ installer returned a non-zero exit code
[04:48:25] ❗️ Error during processing dependencies! Please fix the error and push an update, or try restarting the app.

Hi @sushiljoshi

I saw that the repo was forked from one of my tutorials, that’s awesome!

The error seems to be due to an installation error of dependency libraries. I noticed that in your nifty-app.py file there were no reference to any packages mentioned in packages.txt file. Thus, I’d suggest to delete the packages.txt file. Afterwards, please do a reboot and see if it works.

Hope this helps!

Hi @dataprofessor

Now its working fine.

Thanks a lot for all the great tutorials and you are awesome🙂

Thanks
Sushil Joshi

1 Like

Glad to hear that it works now!

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