nicolewhite / neo4j-flask

Flaskr Extended with Neo4j and Py2neo.
http://nicolewhite.github.io/neo4j-flask/
312 stars 114 forks source link

ImportError: cannot import name 'ForkingMixIn' - Python 3.6 #19

Open ryancollingwood opened 6 years ago

ryancollingwood commented 6 years ago

Environment:

Problem Console output

PS D:\Projects\neo4j-flask> python run.py
Traceback (most recent call last):
  File "C:\ProgramData\Anaconda3\lib\site-packages\werkzeug\serving.py", line 65, in <module>
    from SocketServer import ThreadingMixIn, ForkingMixIn
ModuleNotFoundError: No module named 'SocketServer'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "run.py", line 6, in <module>
    app.run(host='0.0.0.0', port=port)
  File "C:\ProgramData\Anaconda3\lib\site-packages\flask\app.py", line 828, in run
    from werkzeug.serving import run_simple
  File "C:\ProgramData\Anaconda3\lib\site-packages\werkzeug\serving.py", line 68, in <module>
    from socketserver import ThreadingMixIn, ForkingMixIn
ImportError: cannot import name 'ForkingMixIn'
PS D:\Projects\neo4j-flask> pip install -U werkzeug

What Worked for Me

As per: https://stackoverflow.com/a/39214538/2805700

This is fixed as of Werkzeug 0.11.15. Make sure you have installed the latest version of Werkzeug. pip install -U werkzeug.

So I ran pip install -U werkzeug

Updated requirements.txt should to Werkzeug>=0.14.10

Shashank200 commented 6 years ago

u should install a new version of werkzeug Pycharm->defaultsetting->+ at right top->then search werkzeug or pip install -U werkzeug