尝试为底图python安装geos // Python绑定:false

时间:2018-03-12 11:40:58

标签: python geos

我尝试按照此tutorial安装底图。我下载了底图zip数据并将其解压缩然后尝试安装geos-3.3.3。一世 创建了环境变量并运行配置文件,但我得到了这个输出:

checking build system type... x86_64-unknown-linux-gnu
checking host system type... x86_64-unknown-linux-gnu
checking target system type... x86_64-unknown-linux-gnu
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... /bin/mkdir -p
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
checking whether to enable maintainer-specific portions of Makefiles... no
checking for gcc... gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables... 
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking for style of include used by make... GNU
checking dependency style of gcc... gcc3
checking how to print strings... printf
checking for a sed that does not truncate output... /bin/sed
checking for grep that handles long lines and -e... /bin/grep
checking for egrep... /bin/grep -E
checking for fgrep... /bin/grep -F
checking for ld used by gcc... /usr/bin/ld
checking if the linker (/usr/bin/ld) is GNU ld... yes
checking for BSD- or MS-compatible name lister (nm)... /usr/bin/nm -B
checking the name lister (/usr/bin/nm -B) interface... BSD nm
checking whether ln -s works... yes
checking the maximum length of command line arguments... 1572864
checking whether the shell understands some XSI constructs... yes
checking whether the shell understands "+="... yes
checking how to convert x86_64-unknown-linux-gnu file names to x86_64-unknown-linux-gnu format... func_convert_file_noop
checking how to convert x86_64-unknown-linux-gnu file names to toolchain format... func_convert_file_noop
checking for /usr/bin/ld option to reload object files... -r
checking for objdump... objdump
checking how to recognize dependent libraries... pass_all
checking for dlltool... dlltool
checking how to associate runtime and link libraries... printf %s\n
checking for ar... ar
checking for archiver @FILE support... @
checking for strip... strip
checking for ranlib... ranlib
checking command to parse /usr/bin/nm -B output from gcc object... ok
checking for sysroot... no
checking for mt... mt
checking if mt is a manifest tool... no
checking how to run the C preprocessor... gcc -E
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking for dlfcn.h... yes
checking for objdir... .libs
checking if gcc supports -fno-rtti -fno-exceptions... no
checking for gcc option to produce PIC... -fPIC -DPIC
checking if gcc PIC flag -fPIC -DPIC works... yes
checking if gcc static flag -static works... yes
checking if gcc supports -c -o file.o... yes
checking if gcc supports -c -o file.o... (cached) yes
checking whether the gcc linker (/usr/bin/ld -m elf_x86_64) supports shared libraries... yes
checking whether -lc should be explicitly linked in... no
checking dynamic linker characteristics... GNU/Linux ld.so
checking how to hardcode library paths into programs... immediate
checking for shl_load... no
checking for shl_load in -ldld... no
checking for dlopen... no
checking for dlopen in -ldl... yes
checking whether a program can dlopen itself... yes
checking whether a statically linked program can dlopen itself... no
checking whether stripping libraries is possible... yes
checking if libtool supports shared libraries... yes
checking whether to build shared libraries... yes
checking whether to build static libraries... yes
checking for g++... g++
checking whether we are using the GNU C++ compiler... yes
checking whether g++ accepts -g... yes
checking dependency style of g++... gcc3
checking how to run the C++ preprocessor... g++ -E
checking for ld used by g++... /usr/bin/ld -m elf_x86_64
checking if the linker (/usr/bin/ld -m elf_x86_64) is GNU ld... yes
checking whether the g++ linker (/usr/bin/ld -m elf_x86_64) supports shared libraries... yes
checking for g++ option to produce PIC... -fPIC -DPIC
checking if g++ PIC flag -fPIC -DPIC works... yes
checking if g++ static flag -static works... yes
checking if g++ supports -c -o file.o... yes
checking if g++ supports -c -o file.o... (cached) yes
checking whether the g++ linker (/usr/bin/ld -m elf_x86_64) supports shared libraries... yes
checking dynamic linker characteristics... (cached) GNU/Linux ld.so
checking how to hardcode library paths into programs... immediate
checking for library containing strerror... none required
checking whether make sets $(MAKE)... (cached) yes
checking for dirent.h that defines DIR... yes
checking for library containing opendir... none required
checking whether closedir returns void... no
checking for working memcmp... yes
checking for strftime... yes
checking for vprintf... yes
checking for _doprnt... no
checking for size_t... yes
checking for working alloca.h... yes
checking for alloca... yes
checking for dirent.h that defines DIR... (cached) yes
checking for library containing opendir... (cached) none required
checking for ANSI C header files... (cached) yes
checking for memory.h... (cached) yes
checking for unistd.h... (cached) yes
checking ieeefp.h usability... no
checking ieeefp.h presence... no
checking for ieeefp.h... no
checking sys/file.h usability... yes
checking sys/file.h presence... yes
checking for sys/file.h... yes
checking sys/time.h usability... yes
checking sys/time.h presence... yes
checking for sys/time.h... yes
checking for strchr... yes
checking for memcpy... yes
checking for gettimeofday... yes
checking whether stat file-mode macros are broken... no
checking whether struct tm is in sys/time.h or time.h... time.h
checking for size_t... (cached) yes
checking for an ANSI C-conforming const... yes
checking if requested to force inline functions... yes
checking if requested to enable assert macros... yes
checking if requested libstdc++ debug mode... no
checking if g++ supports -pedantic... yes
checking if g++ supports -Wall... yes
checking if g++ supports -ansi... yes
checking if g++ supports -Wno-long-long... yes
checking if g++ supports -ffloat-store... yes
checking for finite... yes
checking for isfinite... yes
checking for isnan... yes
checking whether int64_t is 64 bits... yes
checking OS-specific settings... configure: creating ./config.status
config.status: creating Makefile
config.status: creating capi/Makefile
config.status: creating capi/geos_c.h
config.status: creating doc/Doxyfile
config.status: creating doc/Makefile
config.status: creating macros/Makefile
config.status: creating src/Makefile
config.status: creating src/algorithm/Makefile
config.status: creating src/algorithm/locate/Makefile
config.status: creating src/algorithm/distance/Makefile
config.status: creating src/geom/Makefile
config.status: creating src/geom/prep/Makefile
config.status: creating src/geom/util/Makefile
config.status: creating src/geomgraph/Makefile
config.status: creating src/geomgraph/index/Makefile
config.status: creating include/Makefile
config.status: creating include/geos/Makefile
config.status: creating include/geos/algorithm/Makefile
config.status: creating include/geos/algorithm/locate/Makefile
config.status: creating include/geos/algorithm/distance/Makefile
config.status: creating include/geos/geom/Makefile
config.status: creating include/geos/geom/prep/Makefile
config.status: creating include/geos/geom/util/Makefile
config.status: creating include/geos/geomgraph/Makefile
config.status: creating include/geos/geomgraph/index/Makefile
config.status: creating include/geos/index/Makefile
config.status: creating include/geos/index/bintree/Makefile
config.status: creating include/geos/index/chain/Makefile
config.status: creating include/geos/index/intervalrtree/Makefile
config.status: creating include/geos/index/quadtree/Makefile
config.status: creating include/geos/index/strtree/Makefile
config.status: creating include/geos/index/sweepline/Makefile
config.status: creating include/geos/io/Makefile
config.status: creating include/geos/linearref/Makefile
config.status: creating include/geos/noding/Makefile
config.status: creating include/geos/noding/snapround/Makefile
config.status: creating include/geos/operation/Makefile
config.status: creating include/geos/operation/buffer/Makefile
config.status: creating include/geos/operation/distance/Makefile
config.status: creating include/geos/operation/linemerge/Makefile
config.status: creating include/geos/operation/overlay/Makefile
config.status: creating include/geos/operation/overlay/snap/Makefile
config.status: creating include/geos/operation/polygonize/Makefile
config.status: creating include/geos/operation/predicate/Makefile
config.status: creating include/geos/operation/relate/Makefile
config.status: creating include/geos/operation/sharedpaths/Makefile
config.status: creating include/geos/operation/union/Makefile
config.status: creating include/geos/operation/valid/Makefile
config.status: creating include/geos/planargraph/Makefile
config.status: creating include/geos/planargraph/algorithm/Makefile
config.status: creating include/geos/precision/Makefile
config.status: creating include/geos/simplify/Makefile
config.status: creating include/geos/util/Makefile
config.status: creating include/geos/version.h
config.status: creating src/index/Makefile
config.status: creating src/index/bintree/Makefile
config.status: creating src/index/chain/Makefile
config.status: creating src/index/intervalrtree/Makefile
config.status: creating src/index/quadtree/Makefile
config.status: creating src/index/strtree/Makefile
config.status: creating src/index/sweepline/Makefile
config.status: creating src/io/Makefile
config.status: creating src/linearref/Makefile
config.status: creating src/noding/Makefile
config.status: creating src/noding/snapround/Makefile
config.status: creating src/operation/Makefile
config.status: creating src/operation/buffer/Makefile
config.status: creating src/operation/distance/Makefile
config.status: creating src/operation/linemerge/Makefile
config.status: creating src/operation/overlay/Makefile
config.status: creating src/operation/polygonize/Makefile
config.status: creating src/operation/predicate/Makefile
config.status: creating src/operation/relate/Makefile
config.status: creating src/operation/sharedpaths/Makefile
config.status: creating src/operation/union/Makefile
config.status: creating src/operation/valid/Makefile
config.status: creating src/planargraph/Makefile
config.status: creating src/precision/Makefile
config.status: creating src/simplify/Makefile
config.status: creating src/util/Makefile
config.status: creating swig/geos.i
config.status: creating swig/Makefile
config.status: creating swig/python/Makefile
config.status: creating swig/python/tests/Makefile
config.status: creating swig/ruby/Makefile
config.status: creating swig/ruby/test/Makefile
config.status: creating php/Makefile
config.status: creating php/test/Makefile
config.status: creating tests/Makefile
config.status: creating tests/bigtest/Makefile
config.status: creating tests/unit/Makefile
config.status: creating tests/perf/Makefile
config.status: creating tests/perf/operation/Makefile
config.status: creating tests/perf/operation/buffer/Makefile
config.status: creating tests/perf/operation/predicate/Makefile
config.status: creating tests/perf/capi/Makefile
config.status: creating tests/xmltester/Makefile
config.status: creating tests/geostest/Makefile
config.status: creating tests/thread/Makefile
config.status: creating tools/Makefile
config.status: creating tools/geos-config
config.status: creating include/config.h
config.status: include/config.h is unchanged
config.status: creating include/geos/platform.h
config.status: include/geos/platform.h is unchanged
config.status: executing depfiles commands
config.status: executing libtool commands
Swig: false
Python bindings: false
Ruby bindings: false
PHP bindings: false

当我尝试遵循教程时,我会收到更多错误,我认为问题是缺少绑定,但我不知道如何修复它。

1 个答案:

答案 0 :(得分:0)

请尝试类似下面的示例。

首先,安装SWIG(我正在使用Debian):

sudo apt uptade
sudo apt install swig

其次,编译并安装GEOS:

cd /opt
wget http://download.osgeo.org/geos/geos-3.3.3.tar.bz2
tar xvjf geos-3.3.3.tar.bz2 
cd geos-3.3.3
mkdir build
./configure --prefix=/opt/geos-3.3.3/build --enable-python
make && sudo make install
./build/bin/geos-config --version

最后,在你的路径中添加GEOS:

# add lines below at the end of /etc/bash.bashrc file.
export LD_LIBRARY_PATH="/opt/geos-3.3.3/build/lib:$LD_LIBRARY_PATH"
export PATH="/opt/geos-3.3.3/build/bin:$PATH"

现在,打开一个新的终端控制台来使用。