Python pandas导入错误

时间:2017-05-31 19:02:41

标签: python pandas

当我尝试导入pandas库时,我收到此错误。我尝试卸载它并重新安装它。我尝试升级它。我使用的最新版本是0.20。我也厌倦了0.19的默认版本。我使用的是最新版本的Anaconda和最新版本的python。我现在重新安装了Anaconda大约10次。我也有numpy导入它认为是它的依赖。对此有任何想法。

Traceback (most recent call last):
      File "<stdin>", line 1, in <module>
      File "C:\Users\Mason\Anaconda3\lib\site-packages\spyder\utils\site\sitecustomize.py", line 866, in runfile
        sys.argv = [filename]
      File "C:\Users\Mason\Anaconda3\lib\site-packages\spyder\utils\site\sitecustomize.py", line 102, in execfile
        exec(compile(f.read(), filename, 'exec'), namespace)
      File "C:/Users/Mason/.spyder-py3/temp.py", line 10, in <module>
        import pandas as pd
      File "C:\Users\Mason\Anaconda3\lib\site-packages\pandas\__init__.py", line 40, in <module>
        import pandas.core.config_init
      File "C:\Users\Mason\Anaconda3\lib\site-packages\pandas\core\config_init.py", line 14, in <module>
        import pandas.core.config as cf
      File "C:\Users\Mason\Anaconda3\lib\site-packages\pandas\core\config.py", line 57, in <module>
        import pandas.compat as compat
    AttributeError: module 'pandas' has no attribute 'compat'
    >>> runfile('C:/Users/Mason/.spyder-py3/temp.py', wdir='C:/Users/Mason/.spyder-py3')
    Traceback (most recent call last):
      File "<stdin>", line 1, in <module>
      File "C:\Users\Mason\Anaconda3\lib\site-packages\spyder\utils\site\sitecustomize.py", line 866, in runfile
        sys.argv = [filename]
      File "C:\Users\Mason\Anaconda3\lib\site-packages\spyder\utils\site\sitecustomize.py", line 102, in execfile
        exec(compile(f.read(), filename, 'exec'), namespace)
      File "C:/Users/Mason/.spyder-py3/temp.py", line 9, in <module>
        import pandas as pd
      File "C:\Users\Mason\Anaconda3\lib\site-packages\pandas\__init__.py", line 40, in <module>
        import pandas.core.config_init
      File "C:\Users\Mason\Anaconda3\lib\site-packages\pandas\core\config_init.py", line 14, in <module>
        import pandas.core.config as cf
      File "C:\Users\Mason\Anaconda3\lib\site-packages\pandas\core\config.py", line 57, in <module>
        import pandas.compat as compat
    AttributeError: module 'pandas' has no attribute 'compat'
    >>> runfile('C:/Users/Mason/.spyder-py3/temp.py', wdir='C:/Users/Mason/.spyder-py3')
    >>> import pandas.compat as compat
    Traceback (most recent call last):
      File "<stdin>", line 1, in <module>
      File "C:\Users\Mason\Anaconda3\lib\site-packages\pandas\__init__.py", line 40, in <module>
        import pandas.core.config_init
      File "C:\Users\Mason\Anaconda3\lib\site-packages\pandas\core\config_init.py", line 14, in <module>
    AttributeError: module 'pandas' has no attribute 'compat'
        import pandas.core.config as cf
      File "C:\Users\Mason\Anaconda3\lib\site-packages\pandas\core\config.py", line 57, in <module>
        import pandas.compat as compat
    AttributeError: module 'pandas' has no attribute 'compat'
    >>>   File "<stdin>", line 1
        AttributeError: module 'pandas' has no attribute 'compat'
                                      ^
    SyntaxError: invalid syntax
    >>> runfile('C:/Users/Mason/.spyder-py3/temp.py', wdir='C:/Users/Mason/.spyder-py3')
    >>> runfile('C:/Users/Mason/.spyder-py3/temp.py', wdir='C:/Users/Mason/.spyder-py3')
    Traceback (most recent call last):
      File "<stdin>", line 1, in <module>
      File "C:\Users\Mason\Anaconda3\lib\site-packages\spyder\utils\site\sitecustomize.py", line 866, in runfile
        import pandas.compat as compat
    AttributeError: module 'pandas' has no attribute 'compat'
    >>>     import pandas.core.config as cf
      File "C:\Users\Mason\Anaconda3\lib\site-packages\pandas\core\config.py", line 57, in <module>
        import pandas as pd
      File "C:\Users\Mason\Anaconda3\lib\site-packages\pandas\__init__.py", line 40, in <module>
        import pandas.core.config_init
      File "C:\Users\Mason\Anaconda3\lib\site-packages\pandas\core\config_init.py", line 14, in <module>
        sys.argv = [filename]
      File "C:\Users\Mason\Anaconda3\lib\site-packages\spyder\utils\site\sitecustomize.py", line 102, in execfile
        exec(compile(f.read(), filename, 'exec'), namespace)
      File "C:/Users/Mason/.spyder-py3/temp.py", line 10, in <module>

0 个答案:

没有答案