我的python版本是3.6。我的操作系统是windows。安装导入模块后,当我输入rpy2 rpy2时,没有得到任何问题。但是当输入import rpy2.ipython时,得到如下错误:
>>> import rpy2.ipython
Warning (from warnings module):
File "D:\Soft_app\Python\lib\site-packages\rpy2\ipython\rmagic.py", line 76
"either.")))
UserWarning: The Python package 'pandas' is strongly recommended when using `rpy2.ipython`. Unfortunately it could not be loaded, and we did not manage to load 'numpy' either.
Traceback (most recent call last):
File "<pyshell#3>", line 1, in <module>
import rpy2.ipython
File "D:\Soft_app\Python\lib\site-packages\rpy2\ipython\__init__.py", line 1, in <module>
from .rmagic import load_ipython_extension
File "D:\Soft_app\Python\lib\site-packages\rpy2\ipython\rmagic.py", line 81, in <module>
from IPython.core.displaypub import publish_display_data
ModuleNotFoundError: No module named 'IPython'可以帮助找出问题所在??
发布于 2020-07-11 23:36:45
你好像错过了Ipython和pandas。安装它们应该可以解决您的问题。
运行pip install Ipython安装Ipython,运行pip install pandas安装pandas。
希望这能解决你的问题。
快乐编码~
https://stackoverflow.com/questions/43756987
复制相似问题