AttributeError: 'module' object has no attribute 'version' Canopy
<p>Hi I am going to preface this with I could just be really dumb so don't overlook that, but suddenly when opening canopy today I wasn't able to run one of my typical scripts with the error AttributeError: 'module' object has no attribute ' version' when trying to load pandas. From what I can gather it seems when bumpy is called through pandas it fails. I checked my working directory for files named numpy.py to see if I idiotically named a file numpy but failed to find such a file. I also attempted to uninstall and reinstall both numpy and pandas from the package manager in canopy. Any suggestions?</p>

<pre><code>    %run "/Users/jim/Documents/ORAL-PAT-2.5-3.5plotly.py"
---------------------------------------------------------------------------
AttributeError                            Traceback (most recent call last)
/Users/jim/Documents/ORAL-PAT-2.5-3.5plotly.py in &lt;module&gt;()
      1 #import the modules you need
----&gt; 2 import pandas as pd
      3 import numpy as np
      4 import plotly.plotly as py
      5 import plotly.tools as tls

/Users/jim/Library/Enthought/Canopy_64bit/User/lib/python2.7/site-packages/pandas/__init__.py in &lt;module&gt;()
     20 
     21 # numpy compat
---&gt; 22 from pandas.compat.numpy_compat import *
     23 
     24 try:

/Users/jim/Library/Enthought/Canopy_64bit/User/lib/python2.7/site-packages/pandas/compat/numpy_compat.py in &lt;module&gt;()
     13 
     14 # numpy versioning
---&gt; 15 _np_version = np.version.short_version
     16 _np_version_under1p8 = LooseVersion(_np_version) &lt; '1.8'
     17 _np_version_under1p9 = LooseVersion(_np_version) &lt; '1.9'

AttributeError: 'module' object has no attribute 'version' 
</code></pre>

<p>Just had the same problem after downgrading Pandas and upgrading again to fix another issue. This is just a hack, but you could try this:</p>

<p>Open <code>...pandas/compat/numpy_compat.py</code> and replace <code>np.version.short_version</code> with <code>np._np_version</code></p>

<p>Hope that helps!</p>

python numpy canopy