File "/usr/local/lib/python3.5/site-packages/dateutil/rrule.py", line 55 raise ValueError

简介: File "/usr/local/lib/python3.5/site-packages/dateutil/rrule.py", line 55 raise ValueError

终于编译过去,结果呢?import caffe,出错:


quantum6@gh4ai:~/gh-install/caffe/python$ python3
Python 3.5.5 (default, Oct 28 2018, 15:55:43) 
[GCC 5.4.0 20160609] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import caffe
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/home/quantum6/gh-install/caffe/python/caffe/__init__.py", line 1, in <module>
    from .pycaffe import Net, SGDSolver, NesterovSolver, AdaGradSolver, RMSPropSolver, AdaDeltaSolver, AdamSolver, NCCL, Timer
  File "/home/quantum6/gh-install/caffe/python/caffe/pycaffe.py", line 15, in <module>
    import caffe.io
  File "/home/quantum6/gh-install/caffe/python/caffe/io.py", line 2, in <module>
    import skimage.io
  File "/usr/local/lib/python3.5/site-packages/skimage/__init__.py", line 177, in <module>
    from .data import data_dir
  File "/usr/local/lib/python3.5/site-packages/skimage/data/__init__.py", line 15, in <module>
    from ..io import imread, use_plugin
  File "/usr/local/lib/python3.5/site-packages/skimage/io/__init__.py", line 15, in <module>
    reset_plugins()
  File "/usr/local/lib/python3.5/site-packages/skimage/io/manage_plugins.py", line 95, in reset_plugins
    _load_preferred_plugins()
  File "/usr/local/lib/python3.5/site-packages/skimage/io/manage_plugins.py", line 75, in _load_preferred_plugins
    _set_plugin(p_type, preferred_plugins['all'])
  File "/usr/local/lib/python3.5/site-packages/skimage/io/manage_plugins.py", line 87, in _set_plugin
    use_plugin(plugin, kind=plugin_type)
  File "/usr/local/lib/python3.5/site-packages/skimage/io/manage_plugins.py", line 258, in use_plugin
    _load(name)
  File "/usr/local/lib/python3.5/site-packages/skimage/io/manage_plugins.py", line 302, in _load
    fromlist=[modname])
  File "/usr/local/lib/python3.5/site-packages/skimage/io/_plugins/matplotlib_plugin.py", line 4, in <module>
    from mpl_toolkits.axes_grid1 import make_axes_locatable
  File "/usr/local/lib/python3.5/site-packages/mpl_toolkits/axes_grid1/__init__.py", line 1, in <module>
    from . import axes_size as Size
  File "/usr/local/lib/python3.5/site-packages/mpl_toolkits/axes_grid1/axes_size.py", line 15, in <module>
    from matplotlib.axes import Axes
  File "/usr/local/lib/python3.5/site-packages/matplotlib/axes/__init__.py", line 1, in <module>
    from ._subplots import *
  File "/usr/local/lib/python3.5/site-packages/matplotlib/axes/_subplots.py", line 6, in <module>
    from matplotlib.axes._axes import Axes
  File "/usr/local/lib/python3.5/site-packages/matplotlib/axes/_axes.py", line 20, in <module>
    import matplotlib.dates as _  # <-registers a date unit converter
  File "/usr/local/lib/python3.5/site-packages/matplotlib/dates.py", line 144, in <module>
    from dateutil.rrule import (rrule, MO, TU, WE, TH, FR, SA, SU, YEARLY,
  File "/usr/local/lib/python3.5/site-packages/dateutil/rrule.py", line 55
    raise ValueError, "Can't create weekday with n == 0"
                    ^
SyntaxError: invalid syntax


 面对这样的错误,人们不禁要问,这究竟是……别问了,赶紧上网查:


pip install matplotlib --upgrade

 感谢党,感谢国家,感谢高手……终于可以import了。

目录
相关文章
|
2月前
|
测试技术 开发者 Python
对于Python中的异常要如何处理,raise关键字你真的了解吗?一篇文章带你从头了解
`raise`关键字在Python中用于显式引发异常,允许开发者在检测到错误条件时中断程序流程,并通过异常处理机制(如try-except块)接管控制。`raise`后可跟异常类型、异常对象及错误信息,适用于验证输入、处理错误、自定义异常、重新引发异常及测试等场景。例如,`raise ValueError(&quot;Invalid input&quot;)`用于验证输入数据,若不符合预期则引发异常,确保数据准确并提供清晰错误信息。此外,通过自定义异常类,可以针对特定错误情况提供更具体的信息,增强代码的健壮性和可维护性。
|
3月前
|
开发者 Python
Python学习九:file操作
这篇文章是关于Python文件操作的详细教程,包括文件的打开、读写、关闭,以及文件备份脚本的编写和文件定位操作。
30 2
|
3月前
|
存储 安全 Java
Python File处理详解!
本文详细介绍了Python文件处理的方法及其优缺点。通过`open()`、`read()`、`write()`和`append()`等函数,Python能够轻松实现文件的创建、读取、写入及追加等操作。文章还展示了如何使用`tell()`获取文件指针位置,并提供了涵盖文件创建、读取、追加、重命名及删除的完整示例。Python文件处理不仅功能强大且跨平台兼容,但也存在易错性、安全风险及处理大文件时的性能问题。适合数据存储、配置管理和数据分析等多种应用场景。
77 4
|
3月前
|
存储 索引 Python
深度解密函数的 local 名字空间(当 Python 中混进一只薛定谔的猫……)
深度解密函数的 local 名字空间(当 Python 中混进一只薛定谔的猫……)
68 0
|
5月前
|
Linux Python Windows
【Azure 环境】Windows中安装Python azure-eventhub-checkpointstoreblob-aio模块时出错 ERROR: Could not install packages due to an EnvironmentError: [Errno 2] No such file or directory:
【Azure 环境】Windows中安装Python azure-eventhub-checkpointstoreblob-aio模块时出错 ERROR: Could not install packages due to an EnvironmentError: [Errno 2] No such file or directory:
|
5月前
|
Python
python 升级后 yum 无法使用 File "/usr/bin/yum", line 30 except KeyboardInterrupt, e: `/usr/libexec/urlgrabber-ext-down`
python 升级后 yum 无法使用 File "/usr/bin/yum", line 30 except KeyboardInterrupt, e: `/usr/libexec/urlgrabber-ext-down`
52 0
|
6月前
|
XML API 数据格式
【Python】 已解决:ValueError: document with multiple roots
【Python】 已解决:ValueError: document with multiple roots
59 0
|
6月前
|
Python
【Python】已解决:(pandas读取DataFrame列报错)raise KeyError(key) from err KeyError: (‘name‘, ‘age‘)
【Python】已解决:(pandas读取DataFrame列报错)raise KeyError(key) from err KeyError: (‘name‘, ‘age‘)
524 0
|
1月前
|
人工智能 数据可视化 数据挖掘
探索Python编程:从基础到高级
在这篇文章中,我们将一起深入探索Python编程的世界。无论你是初学者还是有经验的程序员,都可以从中获得新的知识和技能。我们将从Python的基础语法开始,然后逐步过渡到更复杂的主题,如面向对象编程、异常处理和模块使用。最后,我们将通过一些实际的代码示例,来展示如何应用这些知识解决实际问题。让我们一起开启Python编程的旅程吧!
|
1月前
|
存储 数据采集 人工智能
Python编程入门:从零基础到实战应用
本文是一篇面向初学者的Python编程教程,旨在帮助读者从零开始学习Python编程语言。文章首先介绍了Python的基本概念和特点,然后通过一个简单的例子展示了如何编写Python代码。接下来,文章详细介绍了Python的数据类型、变量、运算符、控制结构、函数等基本语法知识。最后,文章通过一个实战项目——制作一个简单的计算器程序,帮助读者巩固所学知识并提高编程技能。