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).
Question
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!
Solution
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).