py2exe ValueError: attempted relative import beyond top-level package
<p>I am trying to make an executable file for a python program. In the python program, I import pandas library. So, when I try to import pandas and apply py2exe.<br>
I get: </p>

<blockquote>
  <p>ValueError: attempted relative import beyond top-level package from mf3.py file
  line 213 in py2exe module.</p>
</blockquote>

<p>My setup.py looks like:</p>

<pre><code>from distutils.core import setup
import py2exe

setup(console=['program.py'])
</code></pre>

<p>Let me know if there is a fix to this</p>