I deployed Streamlit via GitHub and found an error:
× Running setup.py install for lap did not run successfully.
│ Exit Code: 1
╰─> [13 lines of output]
Partial import of lap during the build process.
Traceback (most recent call last):
File “/tmp/pip-install-9d2mn9h6/lap_2426d6716df14c8d80cee36a28b45779/setup.py”, line 127, in get_numpy_status
import numpy
ModuleNotFoundError: No module named ‘numpy’
Even though in the requirements file.txt the numpy package has been installed, I attach here also the contents of the requirements file.txt
filterpy==1.4.5
lap==0.4.0
matplotlib==3.5.2
numpy==1.23.5
opencv_python==4.7.0.72
pafy==0.5.5
Pillow==9.5.0
scipy==1.8.1
streamlit==1.22.0
streamlit_with_ssl==1.15.2.1
ultralytics==8.0.93
Thanks for sharing this question! Can you please update your post to include links to your app and GitHub repo as well so we can try to reproduce the error?
The problem is the lap package. It is quite old and the setup requires numpy to be installed prior to running pip. Unfortunately this will not work on streamlit cloud, because there is only a single step installation possible.
However there is a newer branch of lap on github which seems to fix this issue. Therefore you could replace the above line in requirements.txt with the line below and try again:
Thanks for stopping by! We use cookies to help us understand how you interact with our website.
By clicking “Accept all”, you consent to our use of cookies. For more information, please see our privacy policy.
Cookie settings
Strictly necessary cookies
These cookies are necessary for the website to function and cannot be switched off. They are usually only set in response to actions made by you which amount to a request for services, such as setting your privacy preferences, logging in or filling in forms.
Performance cookies
These cookies allow us to count visits and traffic sources so we can measure and improve the performance of our site. They help us understand how visitors move around the site and which pages are most frequently visited.
Functional cookies
These cookies are used to record your choices and settings, maintain your preferences over time and recognize you when you return to our website. These cookies help us to personalize our content for you and remember your preferences.
Targeting cookies
These cookies may be deployed to our site by our advertising partners to build a profile of your interest and provide you with content that is relevant to you, including showing you relevant ads on other websites.