python-windrose / windrose

A Python Matplotlib, Numpy library to manage wind data, draw windrose (also known as a polar rose plot), draw probability density function and fit Weibull distribution
https://python-windrose.github.io/windrose
Other
339 stars 133 forks source link

All of a sudden getting cannot import name 'WindroseAxes' from 'windrose' (unknown location) #212

Closed TangerineKimchi closed 1 year ago

TangerineKimchi commented 1 year ago

G'day folks. I recently had to uninstall / reinstall conda because my Cartopy wasn't working. Now I am getting the following:

ImportError                               Traceback (most recent call last)
/var/folders/yq/ly_67qxj7q7gzbd79gfqf7jh0000gn/T/ipykernel_93174/944887002.py in <module>
      7 import metpy.calc as mpcalc
      8 from metpy.units import units
----> 9 from windrose import WindroseAxes
     10 import matplotlib.cm as cm
     11 import math

ImportError: cannot import name 'WindroseAxes' from 'windrose' (unknown location)

I noticed this was a problem someone encountered back in 2016, with "deleting windrose.pyc", but I am unfamiliar with how to do so. Why would this be happening?

pip3 list yields 'windrose 1.8.1.dev14+g855d2c7'

MacOS 12.5, Python 3.11, using JupyterNotebook

Thanks for any and all who can provide some insight.

ocefpaf commented 1 year ago

Looks like you have a dev installation. Without more info on how you created that environment we cannot help you much. I'd try uninstalling it and installing again from a stable version from either PyPI or conda-forge.

TangerineKimchi commented 1 year ago

Thanks, I had uninstalled via pip3 and then reinstalled in the same manner. Tried conda-forge and it worked. Thank you.