title: PyCharm, some packages cannot import Pandas, ImportError: C extension: StringIO not built
body: <p>I am having a very strange error and cannot resolve it.</p>
  
  <p>I have a project with the following directory structure:</p>
  
  <pre><code>ptouch/
      ptouch/
          __init__.py
          ptouch.py
          io.py
      tests/
          __init__.py
          tests.py
  </code></pre>
  
  <p>I am using PyCharm community edition, and Anaconda python distribution.</p>
  
  <p>The file: <code>ptouch.py</code> contains the following code:</p>
  
  <pre><code>__author__ = 'foo'
  import pandas as pd
  df = pd.DataFrame()
  </code></pre>
  
  <p>Executing this file gives the following error:</p>
  
  <pre><code>C:\Anaconda\python.exe ~/ptouch.py
  Traceback (most recent call last):
    File "~/ptouch.py", line 2, in &lt;module&gt;
      import pandas as pd
  File "C:\Anaconda\lib\site-packages\pandas\__init__.py", line 13, in &lt;module&gt;
    "extensions first.".format(module))
  ImportError: C extension: StringIO not built. If you want to import pandas from the source directory, you may need to run 'python setup.py build_ext --inplace' to build the C extensions first.
  </code></pre>
  
  <p>However, executing <code>tests.py</code> gives no errors and uses pandas with no problem.</p>
  
  <p>The file <code>tests.py</code> contains the following code:</p>
  
  <pre><code>from unittest import TestCase
  import pandas as pd
  class Tests(TestCase):
      def test_pickle(self):
          d = pd.DataFrame(np.random.rand(50, 10))
          self.fail()
  </code></pre>
  
  <p>I have tried uninstalling and reinstalling pandas with both conda and pip to no avail.  Creating a new project seems to be able to load pandas without issue.  I cannot find any package specific settings that could result in this error.</p>
  
  <p>Is there some reason why some packages or run configurations could be trying to run pandas from source or something?  When the code is absolutely stripped out?</p>