Toblerity / Fiona

Fiona reads and writes geographic data files
https://fiona.readthedocs.io/
BSD 3-Clause "New" or "Revised" License
1.16k stars 203 forks source link

Django problem #589

Closed jachym closed 6 years ago

jachym commented 6 years ago

Expected behavior and actual behavior.

Fiona (and shapely.geometry) does not load to Django project

Steps to reproduce the problem.

When I try to load Fiona to standard Python shell, it works

$ python
>>> import fiona
>>> fiona.__version__
1.7.11.post1

But trying the same in Django shell fails

$ python mange.py shell
Python 3.6.5 (default, Apr  1 2018, 05:46:30) 
[GCC 7.3.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
(InteractiveConsole)
>>> import fiona
free(): invalid pointer
Aborted (core dumped)
$

The problem seems to be similar to shapely

$ python manage.py shell
...
>>> import shapely
>>> shapely.__version__
'1.6.4.post1'
>>> import shapely.geometry
free(): invalid pointer
Aborted (core dumped)

Operating system

For example: Linux Ubuntu 18.4

Fiona and GDAL version and provenance

1.7.11.post1 and post2 gdal 2.3 (from source)

sgillies commented 6 years ago

A conflict with the shared libraries used by GeoDjango, I presume? Doing pip install --no-binary fiona fiona is your best bet. Will you try that and let us know if that works?

jachym commented 6 years ago

Does not seem to

$ pip uninstall fiona
....
$ pip install --no-binary all fiona
...
Successfully installed fiona-1.7.11.post2

$ python manage.py shell
>>> import fiona
free(): invalid pointer
Aborted (core dumped)

any other hint?

sgillies commented 6 years ago

pip install --no-binary fiona fiona

jachym commented 6 years ago

at last

pip install --no-binary :all: Fiona==1.7.11

worked

thank you

my bad - I should write :all: instead of all