Fork and install streamlit with pip


We’ve created a fork from streamlit in github, and I’m trying to install the fork using pip, and I have the following error when I try to import streamlit in python code.
ModuleNotFoundError: No module named ‘streamlit.proto.BackMsg_pb2’

Steps to reproduce

Code snippet:

pip install -e 'git+' --force-reinstall --use-pep517
>> import streamlit


ModuleNotFoundError: No module named 'streamlit.proto.BackMsg_pb2'

If applicable, please provide the steps we should take to reproduce the error or specified behavior.

Expected behavior:

I expect it to properly import streamlit without any errros.

Actual behavior:

Error above: ModuleNotFoundError: No module named ‘streamlit.proto.BackMsg_pb2’

Debug info

  • Streamlit version: (get it with $ streamlit version)
  • Python version: 3.10.5
  • Using Conda? PipEnv? PyEnv? Pex? - PyEnv
  • OS version: MacOS Monterrey 12.6 (21G115)
  • Browser version:

Requirements file

Using python venv.


Additional information

Sharing @vdonato’s response from your GitHub Issue:

Hi @guilhermealc,

We don’t distribute the fully built Streamlit package within the repo itself, and there are some build stages involved in getting an installable distribution of the package (like what we upload to PyPI, conda, etc). In particular, our protobufs and frontend aren’t built until the make package make target is called as part of our build process.

I wouldn’t expect an attempt to install streamlit by pointing pip directly at the source code to work due to the parts of the package that aren’t pure Python.

A fork can use the same make package target that we use to build wheel files to build streamlit. Alternatively, dev environments can be set up by following the instructions in our Contributing wiki page.

1 Like