Dear all,

I’ve just undated obspy using MacPorts by following the explanations of

Now I get the following error message when I try to import obspy.
It seems to say that subprocess32 is missing.
I would appreciate any advice..

import obspy
Traceback (most recent call last):

  File "<stdin>", line 1, in <module>
  File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/obspy/", line 43, in <module>
    read.__doc__ % make_format_plugin_table("waveform", "read", numspaces=4)
  File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/obspy/core/util/", line 391, in make_format_plugin_table
    "obspy.plugin.%s.%s" % (group, name), method)
  File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/pkg_resources/", line 561, in load_entry_point
    return get_distribution(dist).load_entry_point(group, name)
  File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/pkg_resources/", line 2631, in load_entry_point
    return ep.load()
  File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/pkg_resources/", line 2290, in load
    self.require(*args, **kwargs)
  File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/pkg_resources/", line 2307, in require
    items = working_set.resolve(reqs, env, installer)
  File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/pkg_resources/", line 849, in resolve
    raise DistributionNotFound(req, requirers)
pkg_resources.DistributionNotFound: The 'subprocess32' distribution was not found and is required by matplotlib

Dear Akiko,
thanks for letting us know! I’ll look into this ASAP.

My first impression here is that this issue is not directly related to Obspy, but rather to matplotlib in Macports. Obspy @Macports has been extensively tested and has not changed recently.

In case you manage to figure out such bug are related to some port (or somehow) to Macports, please consider to file a ticket with that project: (Not this time, I’ll take care of it :wink: ). It’s perfectly fine to drop us a note in case you are not sure.


Dear Peter,

Thank you for the reply. Indeed it looked like a problem with marplotlib and Macports.

I used “pip” and now it looks working. Below I’d just like to list what I did.

  • First I once completely uninstalled macports and re-installed everything following the procedure shown in
    However, the problem with “subprocess32” was still there.

  • Then I downloaded from then
    % sudo python
    % sudo python -m pip install subprocess32

  • I also encountered the problem mentioned in this mailing-list around September 2015 with title “Mac OS X - Eclipse - PyDev troubles”. I guess this is unrelated to the “subprocess32” problem, but related to the fact I use Mac OS X Yosemite.
    I modified a few lines in
    following the suggestion of changing to
    with, “rt", encoding=“UTF-8”) as fh:

I’m not sure whether using pip was a good way to get around the problem, but so far it is working.