Skip to main content
Answer

How to Check Library Compatibility on Streamlit Efficiently

  • April 22, 2025
  • 2 replies
  • 88 views

Forum|alt.badge.img+7

Hello everyone,

 

I am looking for guidance on how to check the compatibility of libraries when using Streamlit on CDF. When migrating Streamlit apps from local environments or web servers (other than Pyodide) to CDF, I find it a bit challenging to confirm whether the libraries used in the app will work on Streamlit on CDF.
Currently, I check if the libraries are included in the built-in packages of Pyodide and verify if they are pure Python 3 wheels on PyPI. However, I am wondering if there are any recommended methods for checking compatibility more efficiently.

 

Any suggestions or best practices would be greatly appreciated.

 

Thanks

Best answer by Lars Moastuen

Hi ​@kshomura. I’m not aware of any very good methods for doing this on scale, but the Pyodide FAQ mentions a method you can try to adopt together with listing wheels using pip.

2 replies

Lars Moastuen
Seasoned Practitioner
  • Seasoned Practitioner
  • Answer
  • April 22, 2025

Hi ​@kshomura. I’m not aware of any very good methods for doing this on scale, but the Pyodide FAQ mentions a method you can try to adopt together with listing wheels using pip.


Forum|alt.badge.img+7
  • Author
  • Committed
  • April 23, 2025

Thank you for the reply.
 

From the information provided, I have found that to determine the feasibility of migrating from the current environment, I can check “if they are pure Python 3 wheels on PyPI” by executing a shell script that retrieves the list of packages and references the corresponding WHEEL files from the .venv directory to see if they have the py3-none-any tag.

Regarding “if the libraries are included in the built-in packages of Pyodide,” if there are no more efficient methods available, I think it would be acceptable to address the booting-up errors (package version conflicts) that occur on the Streamlit screen as they arise.

 

Note: We are using SSH connections to the development server with tools like VSCode, so we don’t need to use Pyodide during the development phase, as we want to use Copilot when writing code. Developers need to perform the above checks when deploying to Streamlit on CDF.