ajdawson / windspharm

A Python library for spherical harmonic computations on vector winds.
http://ajdawson.github.io/windspharm
MIT License
82 stars 36 forks source link

ImportError: cannot import name standard #82

Closed pinplex closed 7 years ago

pinplex commented 7 years ago

Dear Andrew Dawson,

unfortunately, I cannot use your module, since there is some problem with the relative import of standard.py and tools.py:

In [26]: from windspharm.standard import VectorWind
---------------------------------------------------------------------------
ImportError                               Traceback (most recent call last)
<ipython-input-26-37081f3a34f9> in <module>()
----> 1 from windspharm.standard import VectorWind

/usr/local/lib/python2.7/site-packages/windspharm/__init__.py in <module>()
     21 from __future__ import absolute_import
     22 
---> 23 from . import standard
     24 from . import tools
     25 

ImportError: cannot import name standard

Do you know what I could do about it. In other modules, the relative import works, so it should not be a problem with regard to my python setup.

Thank you very much. Alex

ajdawson commented 7 years ago

I can't immediately reproduce this. How did you install windspharm?

pinplex commented 7 years ago

I installed windspharm using pip. I installed pyspharm 1.0.8. from source. Thanks.

ajdawson commented 7 years ago

OK, I still can't reproduce when installing from pip... What platform are you on, looks like linux?

pinplex commented 7 years ago

I using OS X 10.11.6 When I cd to /usr/local/lib/python2.7/site-packages/windspharm/ and import standard.py or tools.py directly, it works perfectly. There is obviously some issue with the relative import. Thanks for your help.

pinplex commented 7 years ago

I reinstalled windspharm and rebooted the system and now it is working! I don't know what was causing the error. Now I am curious to work with windspharm. Thanks for your support!

ajdawson commented 7 years ago

I'm not sure what happened then, perhaps the install was not complete the first time. I'm going to close this issue since you have a working install now. I hope the package is useful to you.