Skip to content
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

Vanilla install requires geojson and geopandas #4

Closed
dtasgaon opened this issue Mar 5, 2019 · 1 comment
Closed

Vanilla install requires geojson and geopandas #4

dtasgaon opened this issue Mar 5, 2019 · 1 comment

Comments

@dtasgaon
Copy link

dtasgaon commented Mar 5, 2019

The readme suggests that the geojson and geopandas dependencies are only for testing.

However, when I install using pip install topojson, and then import and use the library, I run into dependency issues. Did I misunderstand the dependencies?

Traceback (most recent call last):
  File "geography.py", line 9, in <module>
    import topojson
  File "/Users/deven/projects/instant/venv/lib/python3.6/site-packages/topojson/__init__.py", line 4, in <module>
    from .extract import extract
  File "/Users/deven/projects/instant/venv/lib/python3.6/site-packages/topojson/extract.py", line 17, in <module>
    class Extract:
  File "/Users/deven/projects/instant/venv/lib/python3.6/site-packages/topojson/extract.py", line 190, in Extract
    @serialize_geom_type.register(geojson.FeatureCollection)
NameError: name 'geojson' is not defined

I installed geojson once I saw the above error. Then I received the following error:

Traceback (most recent call last):
  File "geography.py", line 9, in <module>
    import topojson
  File "/Users/deven/projects/instant/venv/lib/python3.6/site-packages/topojson/__init__.py", line 4, in <module>
    from .extract import extract
  File "/Users/deven/projects/instant/venv/lib/python3.6/site-packages/topojson/extract.py", line 17, in <module>
    class Extract:
  File "/Users/deven/projects/instant/venv/lib/python3.6/site-packages/topojson/extract.py", line 233, in Extract
    @serialize_geom_type.register(geopandas.GeoDataFrame)
NameError: name 'geopandas' is not defined

Given that geopandas has quite a few dependencies, I figured I'll check first if I'm doing this right.

Would greatly appreciate any guidance. Thanks!!

@mattijn
Copy link
Owner

mattijn commented Mar 21, 2019

Thanks for raising the issue!

You are right. I tried to avoid the need of installing of both geojson and geopandas, since especially geopandas has a lot of dependencies that are not easy to install on windows.

In #5 I have addressed this issue and with the next release this dependency issue should be solved.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants