Pandas: ImportError: cannot import name Series

Created on 4 Feb 2013  路  2Comments  路  Source: pandas-dev/pandas

Hi,

I have python installs on both my mac and WIndows machine. cant be sure it i have used pandas from command line python in both as most of my stuff has been running in ipython so far. when i do import pandas or any other option (from pandas import *, form pandas import DataFrame etc. I get the following error message:

import pandas
Traceback (most recent call last):
File "", line 1, in
File "pandas.py", line 4, in
from pandas import Series
ImportError: cannot import name Series

same message on mac and Windows 7 machines.. pandas imports fine in idle, ipython ipython notebook. Using python 2.7.3 and pandas 10.0.1. Checked which

$ which python
/Library/Frameworks/Python.framework/Versions/Current/bin/python

$ which ipython
/Library/Frameworks/Python.framework/Versions/Current/bin/ipython

so both pointing at same place

did pip uninstall end re-install of pandas... problem seems constant.

Any suggestions?

40 minutes later another uninstall and install from pip and ipython can now also not import pandas... same error

resolved...was testing plotting ... calling your own script the same name as one you are importing is not a good idea... obviously... my bad

Most helpful comment

Don't name any scripts pandas.py, it's confusing the Python import machinery

All 2 comments

Don't name any scripts pandas.py, it's confusing the Python import machinery

Thanks for answer. noob error on my part figured it out in two hours. Thanks for great module.

Was this page helpful?
0 / 5 - 0 ratings