title: Why am I getting the ImportError ../lib/libgobject-2.0.so.0: undefined symbol: g_uri_ref based on order of import?
body: <p>On one of my experiments, I found this strange behavior.
  If I do</p>
  <p><code>import matplotlib.pyplot as plt</code></p>
  <p><code>import cv2</code></p>
  <p>Then I get ImportError</p>
  <blockquote>
  <p>ImportError: /home/deep/anaconda3/bin/../lib/libgobject-2.0.so.0: undefined symbol: g_uri_ref
  <a href="https://i.stack.imgur.com/3t0sX.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/3t0sX.png" alt="enter image description here" /></a></p>
  </blockquote>
  <p>But, If I change the order of imports as</p>
  <p><code>import cv2</code></p>
  <p><code>import matplotlib.pyplot as plt</code></p>
  <p>Everything runs fine. Matplotlib version is 3.2.2 and cv2 version is 4.3.0
  I tried to see if I could find some similar problem or explanation, but have not yet found an answer. I'm not sure why this problem occurs and how to fix it.</p>