ImportError:没有名为flask.ext.socketio的模块:DIGITS安装错误

时间:2017-04-29 10:07:47

标签: caffe pycaffe nvidia-digits

我已经安装了flask-socketio

当我尝试运行数字时,它显示以下错误

digits/webapp.py:7: ExtDeprecationWarning: Importing flask.ext.socketio is deprecated, use flask_socketio instead.
  from flask.ext.socketio import SocketIO
Traceback (most recent call last):
  File "/home/sam/anaconda2/envs/testcaffe/lib/python2.7/runpy.py", line 174, in _run_module_as_main
    "__main__", fname, loader, pkg_name)
  File "/home/sam/anaconda2/envs/testcaffe/lib/python2.7/runpy.py", line 72, in _run_code
    exec code in run_globals
  File "/home/sam/DIGITS/digits/__main__.py", line 70, in <module>
    main()
  File "/home/sam/DIGITS/digits/__main__.py", line 55, in main
    import digits.webapp
  File "digits/webapp.py", line 7, in <module>
    from flask.ext.socketio import SocketIO
  File "/home/sam/anaconda2/envs/testcaffe/lib/python2.7/site-packages/flask/exthook.py", line 110, in load_module
    raise ImportError('No module named %s' % fullname)
ImportError: No module named flask.ext.socketio

如何解决这个问题?感谢

1 个答案:

答案 0 :(得分:0)

你可以这样做:sudo apt-get install python-flaskext.socketio

在出现该错误后,您可能会遇到此其他错误: ImportError:没有名为flask.ext.wtf的模块 你可以修复: sudo apt-get install python-flaskext.wtf

您可以做的最好的事情是使用数字中的需求文件来安装所有依赖项。

pip install -r requirements.txt