- android - 多次调用 OnPrimaryClipChangedListener
- android - 无法更新 RecyclerView 中的 TextView 字段
- android.database.CursorIndexOutOfBoundsException : Index 0 requested, 光标大小为 0
- android - 使用 AppCompat 时,我们是否需要明确指定其 UI 组件(Spinner、EditText)颜色
我在 Anaconda 中使用 jupyter notebook 在 python 中加载 rpy2。
在 Anaconda Jupyter Notebook (MAC OSX) 中加载 rpy2 时导入错误
%load_ext rpy2.ipython
这是我得到的错误:
--------------------------------------------------------------------------- ImportError Traceback (most recent call
last) in () ----> 1 get_ipython().magic('load_ext rpy2.ipython')
/Users/carrielin/anaconda/lib/python3.6/site-packages/IPython/core/interactiveshell.py in magic(self, arg_s) 2156 magic_name, _, magic_arg_s = arg_s.partition(' ') 2157 magic_name = magic_name.lstrip(prefilter.ESC_MAGIC) -> 2158 return self.run_line_magic(magic_name, magic_arg_s) 2159 2160
-------------------------------------------------------------------------
/Users/carrielin/anaconda/lib/python3.6/site-packages/IPython/core/interactiveshell.py in run_line_magic(self, magic_name, line) 2077
kwargs['local_ns'] = sys._getframe(stack_depth).f_locals 2078
with self.builtin_trap: -> 2079 result = fn(*args,**kwargs) 2080 return result 2081in load_ext(self, module_str)
/Users/carrielin/anaconda/lib/python3.6/site-packages/IPython/core/magic.py in (f, *a, **k) 186 # but it's overkill for just that one bit of state. 187 def magic_deco(arg): --> 188 call = lambda f, *a, **k: f(*a, **k) 189 190 if callable(arg):
/Users/carrielin/anaconda/lib/python3.6/site-packages/IPython/core/magics/extension.py in load_ext(self, module_str) 35 if not module_str: 36 raise UsageError('Missing module name.') ---> 37 res = self.shell.extension_manager.load_extension(module_str) 38 39 if res == 'already loaded':
/Users/carrielin/anaconda/lib/python3.6/site-packages/IPython/core/extensions.py in load_extension(self, module_str) 81 if module_str not in sys.modules: 82 with prepended_to_syspath(self.ipython_extension_dir): ---> 83 import(module_str) 84 mod = sys.modules[module_str] 85 if self._call_load_ipython_extension(mod):
/Users/carrielin/anaconda/lib/python3.6/site-packages/rpy2/ipython/init.py in () ----> 1 from .rmagic import load_ipython_extension
/Users/carrielin/anaconda/lib/python3.6/site-packages/rpy2/ipython/rmagic.py in () 51 # numpy and rpy2 imports 52 ---> 53 import rpy2.rinterface as ri 54 import rpy2.robjects as ro 55 import rpy2.robjects.packages as rpacks
/Users/carrielin/anaconda/lib/python3.6/site-packages/rpy2/rinterface/init.py in () 48 del(os) 49 ---> 50 from rpy2.rinterface._rinterface import (baseenv, 51 emptyenv, 52 endr,
ImportError: dlopen(/Users/carrielin/anaconda/lib/python3.6/site-packages/rpy2/rinterface/_rinterface.cpython-36m-darwin.so, 2): Library not loaded: @rpath/libiconv.2.dylib Referenced from: /Users/carrielin/anaconda/lib/python3.6/site-packages/rpy2/rinterface/_rinterface.cpython-36m-darwin.so Reason: Incompatible library version: _rinterface.cpython-36m-darwin.so requires version 9.0.0 or later, but libiconv.2.dylib provides version 8.0.0
我还没有搜索过这个问题的其他答案,正在等待您的帮助。
有人可以帮我解决上面的错误吗?
最佳答案
尽管这是针对不同的问题,但这篇文章中的修复对我有用:passenger meet Library not loaded error : liblzma.5.dylib
只需在终端中brew install xz
。如果您没有 brew,可以在这里获取:https://brew.sh/
关于python - 在 Anaconda Jupyter Notebook (MAC OSX) 中加载 rpy2 时出现导入错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/47737764/
我正在开发一个需要能够平均三个数字的 Facebook 应用程序。但是,它总是返回 0 作为答案。这是我的代码: $y = 100; $n = 250; $m = 300; $number = ($y
我只是无法弄清楚这一点,也找不到任何对我来说有意义的类似问题。我的问题:我从数据库中提取记录,并在我的网页上以每个面板 12 条的倍数显示它们。因此,我需要知道有多少个面板可以使用 JavaScrip
我是一名优秀的程序员,十分优秀!