Cannot install obspy correctly
<p>It could be that obspy is installed, but I've missed a step off the installation process somewhere or some other issue. But in any case I followed the instructions as per this <a href="https://github.com/obspy/obspy/wiki/Installation-on-Mac-OS-X-using-Macports" rel="nofollow">link</a> and since I already have installed anacondas, I used:</p>

<pre><code>sudo port install py27-obspy

sudo port select python python27
</code></pre>

<p>then when finished...</p>

<pre><code>pip install obspy
</code></pre>

<p>Then, when running a basic python script in order to test the obspy library I receive import errors: </p>

<pre><code>ImportError: No module named obspy.imaging.mopad_wrapper
</code></pre>

<p>I tried importing the library in my python shell which gave this output:</p>

<pre><code>Traceback (most recent call last):
  File "&lt;stdin&gt;", line 1, in &lt;module&gt;
  File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/obspy/__init__.py", line 40, in &lt;module&gt;
    from obspy.core.utcdatetime import UTCDateTime  # NOQA
  File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/obspy/core/__init__.py", line 119, in &lt;module&gt;
    from obspy.core.utcdatetime import UTCDateTime
  File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/obspy/core/utcdatetime.py", line 20, in &lt;module&gt;
    from obspy.core.util.decorator import deprecated
  File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/obspy/core/util/__init__.py", line 41, in &lt;module&gt;
    from obspy.core.util.testing import add_doctests, add_unittests
  File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/obspy/core/util/testing.py", line 28, in &lt;module&gt;
    from lxml import etree
ImportError: dlopen(/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/lxml/etree.so, 2): Library not loaded: libxml2.2.dylib
  Referenced from: /Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/lxml/etree.so
  Reason: Incompatible library version: etree.so requires version 12.0.0 or later, but libxml2.2.dylib provides version 10.0.0
</code></pre>

<p>Has anyone tried installing the obspy library and if so, did you encounter any issues getting this to work?</p>

<p>If you are using anaconda, you will need to install <code>obspy</code> using <code>conda install</code></p>

<p><code>conda install --channel https://conda.anaconda.org/obspy obspy</code></p>

<hr>

<p><strong>TL;DR</strong></p>

<p>Since it is not in their default repository, you need to use the search function to find it:</p>

<p><code>anaconda search -t conda obspy</code></p>

<p>to find all of the related packages. For <code>obspy</code> the search returns:</p>

<pre><code>Using Anaconda Cloud api site https://api.anaconda.org
Run 'anaconda show &lt;USER/PACKAGE&gt;' to get more details:
Packages:
     Name                      |  Version | Package Types   | Platforms
     ------------------------- |   ------ | --------------- | ---------------
     auto/obspydmt             |    0.4.0 | conda           | linux-64
                                          : https://github.com/kasra-hosseini/obspyDMT
     conda-forge/obspy         |    1.0.2 | conda           | linux-64, win-32, win-64, osx-64
     krisvanneste/obspy        |    0.9.2 | conda           | win-64
     mbyt/obspy                |   0.10.0 | conda           | linux-64
     obspy/obspy               |    1.0.2 | conda, pypi     | linux-64, win-32, win-64, linux-32, osx-64
                                          : ObsPy: A Python Toolbox for seismology/seismological observatories.
Found 5 packages
</code></pre>

<p>Then, it instructs you to use <code>anaconda show obspy/obspy</code> for more info about the package, which also gives the install instructions.</p>

<pre><code>Using Anaconda Cloud api site https://api.anaconda.org
Name:    obspy
Summary: ObsPy: A Python Toolbox for seismology/seismological observatories.
Access:  public
Package Types:  conda, pypi
Versions:
   + 0.10.0rc1
   + 0.10.0
   + 0.0.0+archive
   + 0.10.1rc1
   + 0.10.1rc2
   + 0.10.1
   + 0.10.2
   + 1.0.0
   + 1.0.1
   + 1.0.2

To install this package with conda run:
     conda install --channel https://conda.anaconda.org/obspy obspy
To install this package with pypi run:
     pip install -i https://pypi.anaconda.org/obspy/simple obspy
</code></pre>

python installation anaconda