Python - Issue installing Basemap from Source on Mac

时间:2019-03-19 15:09:11

标签: python macos matplotlib terminal matplotlib-basemap

I have tried installing basemap and have followed multiple ways of doing it with no success. I am very new to python and to using terminal, so please be very descriptive with your answers.

This is the most extensive set of instructions I've found: Matplotlib Basemap Tutorial (scroll down to heading "Install Basemap from Source")

I have followed all of the following code:

basemap-1.x.x $ cd geos-3.3.3
basemap-1.x.x/geos-3.3.3 $ export GEOS_DIR=~/
basemap-1.x.x/geos-3.3.3 $ ./configure --prefix=$GEOS_DIR
basemap-1.x.x/geos-3.3.3 $ make
basemap-1.x.x/geos-3.3.3 $ make install

I have also done as the link suggests to "drag the basemap folder to /usr/local/" and have run the second line above as:

basemap-1.x.x/geos-3.3.3 $ export GEOS_DIR=/usr/local

Then finally:

basemap-1.x.x $ python setup.py install

After this line, I get the following message:

ld: can't write output file: nad2bin for architecture x86_64 clang: error: linker command failed with exit code 1 (use -v to see invocation) ld: can't write output file: nad2bin for architecture x86_64 clang: error: linker command failed with exit code 1 (use -v to see invocation) Traceback (most recent call last): File "setup.py", line 99, in cc.link_executable(objects, execname) File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/distutils/ccompiler.py", line 700, in link_executable debug, extra_preargs, extra_postargs, None, target_lang) File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/distutils/unixccompiler.py", line 200, in link raise LinkError, msg distutils.errors.LinkError: Command "cc nad2bin.o src/pj_malloc.o -o nad2bin" failed with exit status 1

What am i doing wrong?

0 个答案:

没有答案