在Anaconda Prompt (anaconda3)下安装observable_jupyter,尝试conda install observable_jupyter无果后,直接pip install可得🙄,(许多包无法用conda install)
当我导入如下包时,
from observable_jupyter import embed
import pandas as pd
出现报错:
‘gbk’ codec can’t decode byte 0xa6 in position 5650: illegal multibyte sequence
有 illegal multibyte sequence 可能是.py文件中的编码问题,
找到报错包D:\anaconda3\Lib\site-packages\observable_jupyter\jupyter_embed.py中的报错行,进行修改
🥛报错行:
iframe_bundle_src = open(iframe_bundle_fname).read()
🥛修改后:
iframe_bundle_src = open(iframe_bundle_fname,encoding="utf-8").read()