6

I am trying to setup cartodb in ubuntu 12.04 by following https://github.com/danseely/cartodb-install/blob/master/DEV-INSTALLATION.md and as a part of the installation, there are some python dependencies to be installed.Below is a part which i tried

export CPLUS_INCLUDE_PATH=/usr/include/gdal
export C_INCLUDE_PATH=/usr/include/gdal
sudo pip install --no-install GDAL

While giving sudo pip install --no-install GDAL it is giving an error

no such option --no-install.

FYI i have python 2.7 dev version installed.I don't know whats wrong. Help would be appreciated.

harinish
  • 261
  • 3
  • 5
  • 17

1 Answers1

13

The --no-install option has been removed in pip version 7.

The new option appears to be called --download, which takes a directory as argument:

sudo pip install --download /tmp/GDAL GDAL

For the --no-download option given a few lines later in the installation guide linked in your question, you'll have to try and do the following as alternative, since that is also deprecated:

pip install /tmp/GDAL

or similar, according to this pip issue.


As of pip 8.0.0, --download has been deprecated. Instead, use
sudo pip download GDAL

(see the release notes).


Since this seems to be an issue about grabbing the include dirs, have you tried using setting CFLAGS and CXXFLAGS instead? E.g.

export CFLAGS=/usr/include/gdal 
export CXXFLAGS=/usr/include/gdal 
sudo pip install GDAL

Not sure why the linked installation guide uses C_INCLUDE_PATH instead.

Also, this seems to be the usual kludginess you can run into, which is either because the OS decides to places package header files into a separate subdirectory, or because GDAL source code is not properly written to #include <gdal/gdal.h> etc. You may run into that more often, if you install more software.

  • Evert thanks for the reply. I tried sudo pip install unpack GDAL as you suggested but am getting the error InsecurePlatformWarning Could not find a version that satisfies the requirement unpack (from versions: ) No matching distribution found for unpack. May be i think it is due to some SSL configuration. – harinish Oct 19 '15 at 07:57
  • @harinish That is because you run the command `sudo pip install unpack GDAL`, instead of `sudo pip unpack GDAL`. –  Oct 19 '15 at 09:20
  • ERROR: unknown command "unpack". Is there any way to solve this. Am new to Ubuntu. – harinish Oct 19 '15 at 09:49
  • My bad: unpack is suggested in the issue, but never implemented. It seems --download is the new way of doing this. See my updated answer. –  Oct 19 '15 at 10:58
  • 2
    Note that `pip install --download` was replaced in 10.0.0b1 (31-Mar-2018) by `pip download`, which includes a `--destination-directory` option. https://pip.pypa.io/en/stable/news/#b1-2018-03-31 – Alejandro C De Baca Apr 25 '18 at 18:13
  • @AlejandroCDeBaca See the note between horizontal lines in the question. It's just that per version 10, `--download` has been completely removed instead of deprecated. –  Apr 25 '18 at 22:32