Import Error plotly/geopandas

I keep trying to deploy my app but it doesn’t seem to like geopandas.

Traceback (most recent call last):

  File "/home/appuser/venv/lib/python3.9/site-packages/streamlit/runtime/scriptrunner/", line 563, in _run_script

    exec(code, module.__dict__)

  File "/app/floridaearlyvoting/", line 81, in <module>

    st.plotly_chart(makeplot(df1, check_flag=True), use_container_width=False)

  File "/app/floridaearlyvoting/", line 43, in makeplot

    fig = ff.create_choropleth(

  File "/home/appuser/venv/lib/python3.9/site-packages/plotly/figure_factory/", line 624, in create_choropleth

    raise ImportError(

ImportError: geopandas, pyshp and shapely must be installed for this figure factory.

Run the following commands to install the correct versions of the following modules:

$ pip install geopandas==0.3.0
$ pip install pyshp==1.2.10
$ pip install shapely==1.6.3

If you are using Windows, follow this post to properly install geopandas and dependencies:

If you are using Anaconda, do not use PIP to install the packages above. Instead use conda to install them:

$ conda install plotly

$ conda install geopandas

Fixed it.

How did you fix it?