First of all, thank you for being part of this beautiful community.
Explaining my problem. When I implemented my application in heroku, the following error appears when trying to install the somoclu library. locally I have no operational problems with any of the libraries.
I have tried to solve this problem by downloading the previous versions of the used libraries and the problem is still present.
I attach the libraries I am using and a screenshot of the error in heroku
Well, this doesn’t seem to be related to streamlit but somoclu which uses numpy in its setup file.
Even if numpy is written before somoclu in your requirements.txt, it won’t be ready to be used yet in somoclu’s setup.py. And the reason why it worked locally is maybe because numpy was already present in your python environment when you installed somoclu.
To fix the issue you’ll have to pip install numpy before installing somoclu.
Thank you very much for answering my problem, my question is where I install numpy so that I can run somoclu since even though it is first in the list of requirements it keeps throwing the error that is not installed.
The solution that comes to mind is to install it as follows in the app.py file and delete the somoclu library of requirements.txt
file app.py
import pandas as pd
import numpy as np
import pickle
import streamlit as st
import matplotlib.pyplot as plt
import plotly.express as px
import os
os.system('pip install somoclu==1.7.5')
import somoclu