NVIDIA / DIGITS

Deep Learning GPU Training System
https://developer.nvidia.com/digits
BSD 3-Clause "New" or "Revised" License
4.12k stars 1.38k forks source link

Digit 5.1 run error #1312

Open sigmoidx opened 7 years ago

sigmoidx commented 7 years ago

Hello?

I just built Caffe successfully (checked 'import caffe' in python) and ran the command

sudo -H pip install -r requirements.txt and it seemed to install everything without any problem.

but it shows some error when I run ./digits-devserver

/home/oscar/anaconda2/lib/python2.7/site-packages/flask/exthook.py:71: ExtDeprecationWarning: Importing flask.ext.socketio is deprecated, use flask_socketio instead.
  .format(x=modname), ExtDeprecationWarning
/home/oscar/anaconda2/lib/python2.7/site-packages/flask/exthook.py:71: ExtDeprecationWarning: Importing flask.ext.wtf is deprecated, use flask_wtf instead.
  .format(x=modname), ExtDeprecationWarning
Traceback (most recent call last):
  File "/home/oscar/anaconda2/lib/python2.7/runpy.py", line 174, in _run_module_as_main
    "__main__", fname, loader, pkg_name)
  File "/home/oscar/anaconda2/lib/python2.7/runpy.py", line 72, in _run_code
    exec code in run_globals
  File "/home/oscar/libs/DIGITS/digits/__main__.py", line 70, in <module>
    main()
  File "/home/oscar/libs/DIGITS/digits/__main__.py", line 55, in main
    import digits.webapp
  File "digits/webapp.py", line 47, in <module>
    import digits.views  # noqa
  File "/home/oscar/anaconda2/lib/python2.7/site-packages/gevent/builtins.py", line 93, in __import__
    result = _import(*args, **kwargs)
  File "digits/views.py", line 648, in <module>
    app.register_error_handler(code, handle_error)
  File "/home/oscar/anaconda2/lib/python2.7/site-packages/flask/app.py", line 1186, in register_error_handler
    self._register_error_handler(None, code_or_exception, f)
  File "/home/oscar/anaconda2/lib/python2.7/site-packages/flask/app.py", line 65, in wrapper_func
    return f(self, *args, **kwargs)
  File "/home/oscar/anaconda2/lib/python2.7/site-packages/flask/app.py", line 1201, in _register_error_handler
    exc_class, code = self._get_exc_class_and_code(code_or_exception)
  File "/home/oscar/anaconda2/lib/python2.7/site-packages/flask/app.py", line 1121, in _get_exc_class_and_code
    exc_class = default_exceptions[exc_class_or_code]
KeyError: 300

I have no idea what causes the error. Thanks!

lukeyeager commented 7 years ago

Looks like two of your installed Python dependencies have incompatible versions.

You're using conda, which means you've deviated from our official installation instructions. My guess would be that when you use sudo, it discards the conda environment and picks up a pip binary from outside your conda environment. You should never need sudo when using conda, as I understand it.

sigmoidx commented 7 years ago

I have solved this! First I uninstalled lastest version of flask (maybe 0.11.0 version) then installed 0.10.1 version.

sudo -H pip install -I Flask==0.10.1

But the installed flask is located in /usr/local/lib/python2.7/dist-packages, so I moved them into

/home/oscar/anaconda2/lib/python2.7/site-packages then it works!!!!

Thanks!