Skip to content
This repository was archived by the owner on May 23, 2019. It is now read-only.

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

Open
ryancollingwood opened this issue Jan 12, 2018 · 1 comment
Open

Comments

@ryancollingwood
Copy link

Environment:

  • Python 3.6
  • Windows 10

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
Copy link

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

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants