Topics

Rasterio 1.0.3 and Python 3.4

Denis Rykov
 
Edited

Hello folks,

I have problems with installation rasterio==1.0.3 and higher on Python 3.4. There are no problems with 3.5 and 3.6.

Is it an expected behavior?

$ sudo docker run --name python34 -it python:3.4 bash
root@e306b109d4c0:/# pip install numpy
Collecting numpy
  Downloading https://files.pythonhosted.org/packages/14/1c/546724245c8b3aad39d807a0bed14a37b39943860c6b34456a363076c65b/numpy-1.15.2-cp34-cp34m-manylinux1_x86_64.whl (13.8MB)
    100% |████████████████████████████████| 13.8MB 3.1MB/s 
Installing collected packages: numpy
Successfully installed numpy-1.15.2
root@e306b109d4c0:/# pip install rasterio
Collecting rasterio
  Downloading https://files.pythonhosted.org/packages/ce/e3/86ef71d178887f2e365763607f974d5a70be9fbd422e4378bd8c16b8c306/rasterio-1.0.7.tar.gz (1.8MB)
    100% |████████████████████████████████| 1.8MB 8.7MB/s 
    Complete output from command python setup.py egg_info:
    WARNING:root:Failed to get options via gdal-config: [Errno 2] No such file or directory: 'gdal-config'
    ERROR: A GDAL API version must be specified. Provide a path to gdal-config using a GDAL_CONFIG environment variable or use a GDAL_VERSION environment variable.

    ----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-install-bv7euygw/rasterio/

Denis Rykov
 

There is no Linux wheel for Python 3.4 here: https://pypi.org/project/rasterio/#files

Sean Gillies
 

Hi Denis,

Since we switched over to making  wheels using the multibuild project we're blocked from releasing *well tested* Python 3.4 linux wheels by (my hypothesis) bugs in trusty's python 3.4.3. The issue is described here: https://github.com/sgillies/rasterio-wheels/issues/5.

I'm short on time to solve this problem, but there are 2 solid workarounds:

1) build and install rasterio from source `GDAL_CONFIG=path/to/gdal-config pip install rasterio` (requires build-essential, gdal-dev, other system packages).
2) switch to Python 3.5 or 3.6 from the deadsnakes PPA and then `pip install rasterio` to get a wheel for one of those versions.


On Fri, Sep 28, 2018 at 9:38 AM Denis Rykov <rykovd@...> wrote:
There is no Linux wheel for Python 3.4 here: https://pypi.org/project/rasterio/#files



--
Sean Gillies