no such option: --no-install

2019-05-11 10:15发布

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.

1条回答
祖国的老花朵
2楼-- · 2019-05-11 10:35

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.

查看更多
登录 后发表回答