如何在Anaconda中导入Pandas(导入时追溯)

时间:2016-01-30 20:30:21

标签: python

我无法将库导入 Anaconda 。如果我尝试使用

导入 pandas
from pandas import *

我收到以下错误:

Traceback (most recent call last):
File "C:/Users/XXX/Desktop/Python/testprogram.py", line 1, in <module>
from numpy import *
File "C:\Users\XXX\Anaconda2\lib\site-packages\numpy\__init__.py", line 200, in <module>
Traceback (most recent call last):
File "C:/Users/XXX/Desktop/Python/testprogram.py", line 1, in <module>
from numpy import *
File "C:\Users\XXX\Anaconda2\lib\site-packages\numpy\__init__.py", line 200, in <module>
from . import add_newdocs
File "C:\Users\XXX\Anaconda2\lib\site-packages\numpy\add_newdocs.py", line 13, in <module>
from numpy.lib import add_newdoc
File "C:\Users\XXX\Anaconda2\lib\site-packages\numpy\lib\__init__.py", line 8, in <module>
from .type_check import *
File "C:\Users\XXX\Anaconda2\lib\site-packages\numpy\lib\type_check.py", line 11, in <module>
import numpy.core.numeric as _nx
File "C:\Users\XXX\Anaconda2\lib\site-packages\numpy\core\__init__.py", line 57, in <module>
from numpy.testing import Tester
File "C:\Users\XXX\Anaconda2\lib\site-packages\numpy\testing\__init__.py", line 14, in <module>
from .utils import *
File "C:\Users\XXX\Anaconda2\lib\site-packages\numpy\testing\utils.py", line 15, in <module>
from tempfile import mkdtemp
File "C:\Users\XXX\Anaconda2\lib\tempfile.py", line 35, in <module>
from random import Random as _Random
File "C:\Users\XXX\Desktop\Python\random.py", line 1, in <module>
from matplotlib import *
File "C:\Users\XXX\Anaconda2\lib\site-packages\matplotlib\__init__.py", line 122, in <module>
from matplotlib.cbook import is_string_like, mplDeprecation, dedent, get_label
File "C:\Users\XXX\Anaconda2\lib\site-packages\matplotlib\cbook.py", line 34, in <module>
import numpy.ma as ma
File "C:\Users\XXX\Anaconda2\lib\site-packages\numpy\ma\__init__.py", line 44, in <module>
from . import core
File "C:\Users\XXX\Anaconda2\lib\site-packages\numpy\ma\core.py", line 30, in <module>
import numpy.core.umath as umath
AttributeError: 'module' object has no attribute 'core'

导入 numpy 时出现类似错误。我在其中一个论坛上阅读使用

更新软件包
conda update <package_name>

但它说已经安装了所有请求的包。

0 个答案:

没有答案