ubuntu1604 caffe 错误集锦

1.ubuntu1604 only cpu python3

songsl@[sp156Person]:~ $ python3
Python 3.5.2 (default, Jul 17 2020, 14:04:10) 
[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/songsl/caffepy3_master/python/caffe/__init__.py", line 1, in <module>
    from .pycaffe import Net, SGDSolver, NesterovSolver, AdaGradSolver, RMSPropSolver, AdaDeltaSolver, AdamSolver, NCCL, Timer
  File "/home/songsl/caffepy3_master/python/caffe/pycaffe.py", line 15, in <module>
    import caffe.io
  File "/home/songsl/caffepy3_master/python/caffe/io.py", line 2, in <module>
    import skimage.io
  File "/usr/lib/python3/dist-packages/skimage/io/__init__.py", line 15, in <module>
    reset_plugins()
  File "/usr/lib/python3/dist-packages/skimage/io/manage_plugins.py", line 91, in reset_plugins
    _load_preferred_plugins()
  File "/usr/lib/python3/dist-packages/skimage/io/manage_plugins.py", line 71, in _load_preferred_plugins
    _set_plugin(p_type, preferred_plugins['all'])
  File "/usr/lib/python3/dist-packages/skimage/io/manage_plugins.py", line 83, in _set_plugin
    use_plugin(plugin, kind=plugin_type)
  File "/usr/lib/python3/dist-packages/skimage/io/manage_plugins.py", line 253, in use_plugin
    _load(name)
  File "/usr/lib/python3/dist-packages/skimage/io/manage_plugins.py", line 297, in _load
    fromlist=[modname])
  File "/usr/lib/python3/dist-packages/skimage/io/_plugins/matplotlib_plugin.py", line 1, in <module>
    import matplotlib.pyplot as plt
  File "/usr/lib/python3/dist-packages/matplotlib/pyplot.py", line 36, in <module>
    from matplotlib.figure import Figure, figaspect
  File "/usr/lib/python3/dist-packages/matplotlib/figure.py", line 40, in <module>
    from matplotlib.axes import Axes, SubplotBase, subplot_class_factory
  File "/usr/lib/python3/dist-packages/matplotlib/axes/__init__.py", line 4, in <module>
    from ._subplots import *
  File "/usr/lib/python3/dist-packages/matplotlib/axes/_subplots.py", line 10, in <module>
    from matplotlib.axes._axes import Axes
  File "/usr/lib/python3/dist-packages/matplotlib/axes/_axes.py", line 22, in <module>
    import matplotlib.dates as _  # <-registers a date unit converter
  File "/usr/lib/python3/dist-packages/matplotlib/dates.py", line 126, in <module>
    from dateutil.rrule import (rrule, MO, TU, WE, TH, FR, SA, SU, YEARLY,
  File "/home/songsl/.local/lib/python3.5/site-packages/dateutil/rrule.py", line 55
    raise ValueError, "Can't create weekday with n == 0"
                    ^
SyntaxError: invalid syntax

解决方法:

安装python-dateutil 

pip3 install python-dateutil

如果不行则尝试先卸载在安装:

pip3 uninstall python-dateutil

pip3 install python-dateutil

 

 

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值