Skip to content

Commit 1927e8d

Browse files
committed
fix module import error to include pip commands to execute
1 parent c35b39d commit 1927e8d

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

plotly/figure_factory/_county_choropleth.py

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -557,8 +557,14 @@ def create_choropleth(fips, values, scope=['usa'], binning_endpoints=None,
557557
"""
558558
# ensure optional modules imported
559559
if not gp or not shapefile or not shapely:
560-
raise ImportError("geopandas, pyshp and shapely must be "
561-
"installed for this figure factory")
560+
raise ImportError(
561+
"geopandas, pyshp and shapely must be installed for this figure "
562+
"factory.\n\nRun the following commands in the terminal to "
563+
"ensure that the correct versions of the modules are installed:\n"
564+
"`pip install geopandas==0.3.0`\n"
565+
"`pip install pyshp==1.2.10`\n"
566+
"`pip install shapely==1.6.3`\n"
567+
)
562568

563569
df, df_state = _create_us_counties_df(st_to_state_name_dict,
564570
state_to_st_dict)

0 commit comments

Comments
 (0)