在Mac笔记本电脑上安装底图

时间:2014-07-31 13:38:32

标签: python-2.7 anaconda matplotlib-basemap

我知道有关于这个主题的几个问题,但我找不到明确的答案。

我试图在笔记本电脑中安装Basemap(Mac OS X,v 10.6.8)。我正在运行Python 2.7.8 | Anaconda 2.0.1。

Python安装在以下文件夹中:users / myname / anaconda

我已将basemap-1.0.7下载到同一文件夹(users / myname / anaconda)中,然后按照http://matplotlib.org/basemap/users/installing.html的说明进行操作:

要安装GEOS库,我打开一个终端并输入:

cd anaconda/basemap-1.0.7/geos-3.3.3/
export GEOS_DIR=/user/myname/anaconda
./configure --prefix=$GEOS_DIR

然后我收到以下错误:

checking host system type... i386-apple-darwin10.8.0
checking target system type... i386-apple-darwin10.8.0
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... ./install-sh -c -d
checking for gawk... no
checking for mawk... no
checking for nawk... no
checking for awk... awk
checking whether make sets $(MAKE)... no
checking whether to enable maintainer-specific portions of Makefiles... no
checking for gcc... no
checking for cc... no
checking for cl.exe... no
configure: error: in `/Users/myname/anaconda/basemap-1.0.7/geos-3.3.3':
configure: error: no acceptable C compiler found in $PATH
See `config.log' for more details

然后,当我尝试运行make; make install我收到错误:

-bash: make: command not found

有人可以解释我做错了吗?

1 个答案:

答案 0 :(得分:1)

问题是Basemap需要编译GEOS,这是一个C库,所以你需要一个C编译器。

或者,只需从此处提供的Mac OSX二进制文件下载并安装:http://trac.osgeo.org/geos/

相关问题