How to display rdkit molecules on streamlit

Hi @jkim1000, welcome to the Streamlit community!! :wave: :partying_face:

I’m sorry to hear you’re running into dependency issues on Streamlit sharing. It looks like you have discovered a bug!

The idea is that if your app.py, requirements.txt, and packages.txt files are not in the root of your GitHub repo, and are instead within a folder, say, bioactivity-prediction-app/, the dependencies from packages.txt are not installed! Moving the three files to the root of your repo should fix the issue for now.

I’ve created a bug report and brought this issue to the attention of our engineering team. I’ll update you once the issue is resolved.

For now, here’s how you can fix the import errors:

  1. Delete environment.yml
  2. Delete bioactivity-prediction-app/conda.txt
  3. Move app.py, packages.txt, and requirements.txt to the root of the repo
  4. Update any file paths in app.py to point to updated locations for data and models
  5. Edit packages.txt to contain only libxrender1. The rdkit-pypi package requires libxrender1 and not the other packages currently in your packages file.
  6. Delete your app on sharing
  7. Deploy a new app on sharing with the updated app.py

Let me know if this helps!

Happy Streamlit-ing! :balloon:
Snehan