My app used to work fine, untill recently it doesn't work!

Summary

The app stoped working on its own. The problem may be due to numba conflict with numpy version ( i specified numpy==1.21.5 and shap =0.41.0). It seems when deploying or rebooting the app it install numpy version above 1.24 on its own, don’t know why

any help would be appreciated,

repo : GitHub - Amsamms/General-machine-learning-algorithm

app : https://amsamms-general-machine-learning-algorithm-main-rs6nt9.streamlit.app/

If you are experiencing conflicts between the Numba package and the specified version of NumPy in your Streamlit app, where the app installs a higher version of NumPy automatically during deployment or reboot, there are a few potential solutions you can try:

  1. Pin Numba version: Along with specifying the version of NumPy, you can also explicitly specify the version of Numba in your requirements file or setup.py. This ensures that a compatible version of Numba is installed alongside the specified version of NumPy. For example, you can add numba==<desired_version> to your requirements file.

  2. Use a virtual environment: Create a virtual environment for your Streamlit app and install the required packages within that environment. This helps isolate the package versions used by your app from the system-wide packages. You can use tools like virtualenv or conda to set up and activate the virtual environment.

  3. Use a Docker container: Containerize your Streamlit app using Docker. With Docker, you can create a reproducible environment that includes all the required packages and their specific versions. This allows you to control the environment and avoid conflicts with package installations.

  4. Update dependencies: Check if there are any updates available for the packages you are using, such as Numba or other dependencies. Sometimes, newer versions of packages may resolve compatibility issues or conflicts with other packages.

  5. Check package compatibility: Verify the compatibility between the versions of Numba and NumPy you are using. Some package versions may have specific compatibility requirements, and using incompatible versions can lead to conflicts. Refer to the documentation or release notes of the packages to ensure compatibility.

  6. Seek community support: If the issue persists, consider reaching out to the community or support channels for the specific packages or frameworks you are using. They may be able to provide further guidance or help troubleshoot the conflict.

By applying these steps, you can address the conflicts between Numba and NumPy versions in your Streamlit app and maintain the desired package versions.

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