【问题标题】:Importing plottools in jupyter but get error在 jupyter 中导入 plottools 但出现错误
【发布时间】:2023-01-04 22:44:20
【问题描述】:

我正在尝试导入 plottools 以便在 jupyter notebook 中使用。 我使用安装库pip 安装 plottools如文档中所写。我在 Anaconda prompt 中安装了它,它成功了。我尝试使用导入库,但出现此错误。请帮忙!

追溯(最近一次通话):

文件 ~\anaconda3\lib\site-packages\IPython\core\interactiveshell.py:3369 在 run_code exec(code_obj,self.user_global_ns,self.user_ns)

在 <cell line: 6> 中输入 [4] 导入绘图工具

文件 ~\anaconda3\lib\site-packages\plottools_在里面_.py:21 英寸 从 .plottools 导入 *

文件 ~\anaconda3\lib\site-packages\plottools\plottools.py:49 """ ^ SyntaxError: (unicode error) 'unicodeescape' codec can't decode bytes in position 336-337: truncated \UXXXXXXXX 转义

我尝试使用 pip3 安装它,它回答说已经满足要求。

【问题讨论】:

    标签: python matplotlib jupyter-notebook anaconda data-science


    【解决方案1】:

    问题是包在 U 的文档字符串中有无效的转义字符:

    C:Usersyourusername.matplotlib

    转到您的文件naconda3libsite-packagesplottoolsplottools.py 并删除该行。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2021-02-13
      • 1970-01-01
      • 2021-10-03
      • 1970-01-01
      • 2021-12-10
      • 1970-01-01
      • 2019-06-11
      相关资源
      最近更新 更多