Skip to content

Better pip install error msg for county choropleth #984

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Apr 5, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@
All notable changes to this project will be documented in this file.
This project adheres to [Semantic Versioning](http://semver.org/).

## [2.5.2] - UNRELEASED
### Updated
- error message for `plotly.figure_factory.create_choropleth` is more helpful for Windows users on installing `geopandas` and dependencies including `shapely`.

## [2.5.1] - 2018-03-26
### Fixed
- `plotly.figure_factory.create_choropleth` now works in Windows without raising an OSError. The module now uses cross-platform path tools from `os` to manipulate and manage the shapefiles contained in this package.
Expand Down
9 changes: 6 additions & 3 deletions plotly/figure_factory/_county_choropleth.py
Original file line number Diff line number Diff line change
Expand Up @@ -563,11 +563,14 @@ def create_choropleth(fips, values, scope=['usa'], binning_endpoints=None,
if not gp or not shapefile or not shapely:
raise ImportError(
"geopandas, pyshp and shapely must be installed for this figure "
"factory.\n\nRun the following commands in the terminal to "
"ensure that the correct versions of the modules are installed:\n"
"factory.\n\nRun the following commands to install the correct "
"versions of the following modules:\n\n"
"`pip install geopandas==0.3.0`\n"
"`pip install pyshp==1.2.10`\n"
"`pip install shapely==1.6.3`\n"
"`pip install shapely==1.6.3`\n\n"
"If you are using Windows, follow this post to properly "
"install geopandas and dependencies:"
"http://geoffboeing.com/2014/09/using-geopandas-windows/"
)

df, df_state = _create_us_counties_df(st_to_state_name_dict,
Expand Down