gpt4 book ai didi

python - Anacondas 安装搞砸了 IPython pandas 导入?

转载 作者:行者123 更新时间:2023-11-28 18:45:20 26 4
gpt4 key购买 nike

我正在使用 IPython 和 pandas 进行一些数字运算,最近安装了 Anaconda 来尝试一些东西。我没有设置 virtualenv(我现在吸取了关于为什么它如此有值(value)的教训)并且它一定已经调整了一些东西,现在我在将 pandas 导入我的脚本时遇到错误。到目前为止,我已经能够发现 pandas 导入导致英特尔库 libmkl_intel_lp64.dylib 出现一些问题,但除此之外没有太大问题。

抱歉,我的笨拙,有人可以提供一些关于如何处理解决方案的见解吗?谢谢!

---------------------------------------------------------------------------
ImportError Traceback (most recent call last)
/Users/ibebian/anaconda/lib/python2.7/site-packages/IPython/utils/py3compat.pyc in execfile(fname, *where)
202 else:
203 filename = fname
--> 204 __builtin__.execfile(filename, *where)

/Users/ibebian/Desktop/DB-Analyzer/pandas_test.py in <module>()
2
3
----> 4 from pandas import Series, DataFrame
5 import pandas as pd
6 from datetime import datetime, timedelta

/Users/ibebian/Library/Enthought/Canopy_64bit/User/lib/python2.7/site-packages/pandas/__init__.py in <module>()
4
5 try:
----> 6 from . import hashtable, tslib, lib
7 except Exception: # pragma: no cover
8 import sys

/Users/ibebian/Desktop/DB-Analyzer/numpy.pxd in init pandas.hashtable (pandas/hashtable.c:19547)()

/Users/ibebian/Library/Enthought/Canopy_64bit/User/lib/python2.7/site-packages/numpy/__init__.pyc in <module>()
141 return loader(*packages, **options)
142
--> 143 import add_newdocs
144 __all__ = ['add_newdocs']
145

/Users/ibebian/Library/Enthought/Canopy_64bit/User/lib/python2.7/site-packages/numpy/add_newdocs.py in <module>()
7 # core/fromnumeric.py, core/defmatrix.py up-to-date.
8
----> 9 from numpy.lib import add_newdoc
10
11 ###############################################################################

/Users/ibebian/Library/Enthought/Canopy_64bit/User/lib/python2.7/site-packages/numpy/lib/__init__.py in <module>()
11
12 import scimath as emath
---> 13 from polynomial import *
14 #import convertcode
15 from utils import *

/Users/ibebian/Library/Enthought/Canopy_64bit/User/lib/python2.7/site-packages/numpy/lib/polynomial.py in <module>()
15 from numpy.lib.function_base import trim_zeros, sort_complex
16 from numpy.lib.type_check import iscomplex, real, imag
---> 17 from numpy.linalg import eigvals, lstsq, inv
18
19 class RankWarning(UserWarning):

/Users/ibebian/Library/Enthought/Canopy_64bit/User/lib/python2.7/site-packages/numpy/linalg/__init__.py in <module>()
46 from info import __doc__
47
---> 48 from linalg import *
49
50 from numpy.testing import Tester

/Users/ibebian/Library/Enthought/Canopy_64bit/User/lib/python2.7/site-packages/numpy/linalg/linalg.py in <module>()
21 isfinite, size, finfo, absolute, log, exp
22 from numpy.lib import triu
---> 23 from numpy.linalg import lapack_lite
24 from numpy.matrixlib.defmatrix import matrix_power
25 from numpy.compat import asbytes

ImportError: dlopen(/Users/ibebian/Library/Enthought/Canopy_64bit/User/lib/python2.7/site-packages/numpy/linalg/lapack_lite.so, 2): Library not loaded: @rpath/libmkl_intel_lp64.dylib
Referenced from: /Users/ibebian/Library/Enthought/Canopy_64bit/User/lib/python2.7/site-packages/numpy/linalg/lapack_lite.so
Reason: image not found

最佳答案

如果您查看回溯,您会发现它正在从 Canopy 加载内容,即使您是从 Anaconda 开始的。这通常意味着您设置了 PYTHONPATH。你应该取消它。

关于python - Anacondas 安装搞砸了 IPython pandas 导入?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/21343304/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com