문제

I installed xls2db using

sudo pip install xls2db

and when I attempted to try out the sample code provided by the module creator here https://pypi.python.org/pypi/xls2db

from xls2db import xls2db
xls2db("in.xls", "out.db")

I get this error:

ImportError: cannot import name xls2db

Any ideas? I have python 2.7 and I am using pucharm on ubuntu if that matters at all!

Thanks for reading this!

도움이 되었습니까?

해결책

Check whether you have your own version of xls2db.py. It will prevent import of xls2db package you have installed.

If there's one, rename the file not to collide with the package. (Remove xls2db.pyc if there's one).

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top