Installing ObsPy using Macports

Hi all,

I'm trying to install obspy in my Macbook using macports without success. When I type:
sudo port install py27-obspy
I got the following error:
Error:Port py27-obspy not found.

Any one knows how to solve this problem?

Regards and Best Wishes,

Hi Salam,

seems to me that your macports is not up to date. Did you try sudo port -v selfupdate?
Otherwise there are many ways to get obspy running. You can use pip or easy_install to install the module and even building from source is straight forward.

Cheers,
Martin

Hi Martin,
Thanks for your prompt reply. I tried selfupdate and get error message too. So, could you guide me how to install obspy using easy_install or pip.

Regards and Best Wishes,

Hi Salam,
it is really difficult to say what is going wrong without have any details, like the error messages or what python installation or OSX you are using exactly and so on.

Anyway, I would like to come back to your Macports issue. Actually, the port is around to make installation smooth and especially uninstalling or updating easy.

The error you are reporting indicates, that your Macport installation is not aware of any port called `py27-obspy`, which is strange as this port is around now for more then one year. So either you have a really outdated Macports laying around on your system, or your Macports is broken in some way. For any details on Macports you can refer to project page http://www.macports.org/. There you find a quite detailed guide, and there is a user list you can get more support at if needed.

(0) So a good guess, is indeed to try to update your Macports installation as Martin proposed. The `selfupdate` command will update both the Macports base and all ports (or will include ports not available before).

Other thinks you can try, to get a better understanding what is the problem, are the following:

(1) What Macports version is installed on your system? You can use the following command:

--- snip ---
petr% port version
Version: 2.3.0

Hi Salam,

I suggest you to move from macports to homebrew.
It is easier way to manage the packets as macports, but after some years the community is really active.
After that use pip/easy_install to install obspy.

At this link you can find homebrew:

http://brew.sh/

Tommaso Fabbri
Geophysical Programmer, OSOP
Sign up for the OSOP mailing list: http://www.osop.com.pa/about/osop-mailing-list/

We also have fairly detailed instructions on installing ObsPy using Homebrew:
https://github.com/obspy/obspy/wiki/Installation-on-OS-X-using-Homebrew

The macports installations should also work just fine.

Cheers!

Lion

Dear all,

I’m still facing a problem installing ObsPy package using macports. I updated the Macport version to 2.3.2 and tried to run the command: sudo port install py27-obspy but got the following error:

Salams-MacBook-Pro:~ salam$ port version

Version: 2.3.2

Salams-MacBook-Pro:~ salam$ sudo port install py27-obspy

—> Computing dependencies for py27-obspy

—> Dependencies to be installed: gcc48 cctools ld64 dyld-headers llvm-3.5 cloog gmp isl gcc_select libgcc libiconv gperf libmpc mpfr autoconf m4 perl5 perl5.16 gdbm gettext expat ncurses automake libtool py27-flake8 flake8_select py27-flake8-mccabe py27-setuptools python27 bzip2 db48 db_select libedit openssl zlib python_select sqlite3 py27-pep8 pep8_select py27-pyflakes pyflakes_select py27-lxml libxml2 xz libxslt py27-matplotlib freetype libpng pkgconfig py27-cairo cairo fontconfig glib2 libpixman xorg-libXext xorg-libX11 xorg-bigreqsproto xorg-inputproto xorg-kbproto xorg-libXau xorg-xproto xorg-libXdmcp xorg-libxcb xorg-libpthread-stubs xorg-xcb-proto xorg-util-macros xorg-xcmiscproto xorg-xextproto xorg-xf86bigfontproto xorg-xtrans xorg-xcb-util xrender xorg-renderproto py27-numpy fftw-3 py27-cython cython_select py27-nose nosetests_select py27-dateutil py27-six py27-tz py27-parsing py27-pyobjc-cocoa py27-pyobjc py27-py2app py27-macholib py27-modulegraph py27-altgraph py27-tkinter tk tcl py27-tornado py27-backports-ssl_match_hostname py27-backports py27-certifi py27-mock py27-scipy SuiteSparse swig-python bison gsed swig pcre py27-sqlalchemy py27-suds-jurko

—> Fetching distfiles for dyld-headers

—> Attempting to fetch dyld-239.3.tar.gz from http://opensource.apple.com/tarballs/dyld/

—> Attempting to fetch dyld-239.3.tar.gz from http://distfiles.macports.org/dyld-headers

—> Attempting to fetch dyld-239.3.tar.gz from http://aarnet.au.distfiles.macports.org/pub/macports/mpdistfiles/dyld-headers

—> Attempting to fetch dyld-239.3.tar.gz from http://cjj.kr.distfiles.macports.org/dyld-headers

—> Attempting to fetch dyld-239.3.tar.gz from http://fco.it.distfiles.macports.org/mirrors/macports-distfiles/dyld-headers

—> Attempting to fetch dyld-239.3.tar.gz from http://her.gr.distfiles.macports.org/mirrors/macports/mpdistfiles/dyld-headers

—> Attempting to fetch dyld-239.3.tar.gz from http://jog.id.distfiles.macports.org/macports/mpdistfiles/dyld-headers

—> Attempting to fetch dyld-239.3.tar.gz from http://lil.fr.distfiles.macports.org/dyld-headers

—> Attempting to fetch dyld-239.3.tar.gz from http://nue.de.distfiles.macports.org/macports/distfiles/dyld-headers

—> Attempting to fetch dyld-239.3.tar.gz from http://mse.uk.distfiles.macports.org/sites/distfiles.macports.org/dyld-headers

—> Attempting to fetch dyld-239.3.tar.gz from http://sea.us.distfiles.macports.org/macports/distfiles/dyld-headers

—> Attempting to fetch dyld-239.3.tar.gz from http://ykf.ca.distfiles.macports.org/MacPorts/mpdistfiles/dyld-headers

—> Attempting to fetch dyld-239.3.tar.gz from http://svn.macports.org/repository/macports/distfiles/dyld-headers

Error: org.macports.fetch for port dyld-headers returned: fetch failed

Error: Failed to install dyld-headers

Please see the log file for port dyld-headers for details:

/opt/local/var/macports/logs/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_devel_dyld-headers/dyld-headers/main.log

Error: The following dependencies were not installed: gcc48 cctools ld64 dyld-headers llvm-3.5 cloog gmp isl gcc_select libgcc libiconv gperf libmpc mpfr autoconf m4 perl5 perl5.16 gdbm gettext expat ncurses automake libtool py27-flake8 flake8_select py27-flake8-mccabe py27-setuptools python27 bzip2 db48 db_select libedit openssl zlib python_select sqlite3 py27-pep8 pep8_select py27-pyflakes pyflakes_select py27-lxml libxml2 xz libxslt py27-matplotlib freetype libpng pkgconfig py27-cairo cairo fontconfig glib2 libpixman xorg-libXext xorg-libX11 xorg-bigreqsproto xorg-inputproto xorg-kbproto xorg-libXau xorg-xproto xorg-libXdmcp xorg-libxcb xorg-libpthread-stubs xorg-xcb-proto xorg-util-macros xorg-xcmiscproto xorg-xextproto xorg-xf86bigfontproto xorg-xtrans xorg-xcb-util xrender xorg-renderproto py27-numpy fftw-3 py27-cython cython_select py27-nose nosetests_select py27-dateutil py27-six py27-tz py27-parsing py27-pyobjc-cocoa py27-pyobjc py27-py2app py27-macholib py27-modulegraph py27-altgraph py27-tkinter tk tcl py27-tornado py27-backports-ssl_match_hostname py27-backports py27-certifi py27-mock py27-scipy SuiteSparse swig-python bison gsed swig pcre py27-sqlalchemy py27-suds-jurko

To report a bug, follow the instructions in the guide:

http://guide.macports.org/#project.tickets

Error: Processing of port py27-obspy failed

So, I would be grateful if you could advice about this problem.

Regards and Best Wishes,

Dear Salam,

Your problem is not specific to the py-obspy port. The output actually tells you where the problem is:

[...]
Error: org.macports.fetch for port dyld-headers returned: fetch failed

You are not able to fetch the distfiles for the build/install process. So probably you face some network problem. This maybe due to general connection problems or you are behind a firewall.

Maybe you are supposed to use a proxy? If so, you just need to setup macports to use your proxy. This is done by editing /opt/local/etc/macports/macports.conf. You may want to have a look at here: https://destefano.wordpress.com/2011/03/18/macports-behind-a-proxy/ for some details

Alternatively, you can set the respective environment variables. Have a look for example here:
https://blogs.oracle.com/jim/entry/macports_behind_a_proxy_firewall

Hope this helps!
~petr