We use cookies to provide social media features and to analyse our traffic. We also share information about your use of our site with our social media and analytics partners. Details here.

ModuleNotFoundError: No module named 'flask.ext'

How did you install the packages? That is, was it with a virtualenv? Or with pip install --user? Also, which version of Python are you using in the web app? Did you use the equivalent version of pip when installing the packages?

Ah, sorry, I can see that you're using Python 3 in the web app. So, did you use pip3. Right, that sounds like the problem. It's strange that it's not there, but at least it not being there explains why you got an error in your web app!

Could you try installing it again and post the output of the install command here? Of course! What if you are using virtualenv and still are getting an ImportError: No module named flask. Toggle navigation. ImportError: No module named flask. OK, that sounds like it should have worked. What do you get if you run this in a bash console: pip3.

Ah, maybe there's a casing problem. Try this instead: pip3. Looks like there is an error in installing but not sure what ive done wrong?GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together. Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Already on GitHub? Sign in to your account. A similar phenomenon has been described on Win10, however this occurs on a Mac Before filing this as a dupe please consider that I am using Werkzeug 0. Double check - is Flask reporting the correct path?

I'm getting weird issues with it launching from 3. Is there anything else I should check?

modulenotfounderror no module named flask exthook

I did find a flask script that seems to be the culprit:. What does type flask from within your env say? Otherwise, that other Flask executable is irrelevant, it just means Flask is installed in your global env also. I think the file I referenced above was a body from a prev install. I assume this is put there by pip install flask but I am not sure. I am not sure what, but there may indeed have been something wrong with my venv.

I recreated it and now it works. Still I am not sure I deterministically understand what the actual problem was. Yes, something went wrong with your virtualenv. The venv's flask executable should point at the venv's Python. Yes, it does now. I could have sworn I repeated the same steps as before, but human memory is faulty - the compiler never lies. Flask is installed in your global env, remove global Flask Edited by davidism: don't do this.

Don't mess with system packages. If Flask is installed in the system, let the system mangage it. Use a virtual environment to manage Flask and other dependencies for your project.

The entire point of virtual environments is to be isolated from the system packages, so uninstalling it will do absolutely nothing and may break other system-installed software. Skip to content. Dismiss Join GitHub today GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.

Sign up. New issue. Jump to bottom. Copy link Quote reply. This comment has been minimized. Sign in to view. I did find a flask script that seems to be the culprit:!By using our site, you acknowledge that you have read and understand our Cookie PolicyPrivacy Policyand our Terms of Service.

ImportError: No module named sqlalchemy – Solution

The dark mode beta is finally here. Change your preferences any time. Stack Overflow for Teams is a private, secure spot for you and your coworkers to find and share information. After reading title of this post, don't try to make duplicate first because herewith content may be asked in different way.

Install Python Modules

Btw, I'm very new in python and start learning now for work requirement. Traceback most recent call last : File "main. Please let me know how's difference between python In order to use pip from the virtualenv, use python -m pip command. The following command will do the trick:. Another possibility is that you installed flask via apt and not pip. If this is the case, uninstalling flask with apt and installing it with pip should do the trick:. Learn more. Asked 1 year, 1 month ago.

Active 8 months ago. Viewed 8k times. It seems that you have nstalled flask that uses Python 2. Are you showing package versions from your virtualenv, or are some of these packages globally installed?

modulenotfounderror no module named flask exthook

Can you please check output of following commands in the terminal in which you had flask run command working and python not? They should all show paths to executables in your virtualenv e. Furthermore, for you app to work via command python main. Active Oldest Votes. So now the flask command is available system-wide. If this is the case, uninstalling flask with apt and installing it with pip should do the trick: sudo apt remove python-flask pip install flask this is my guess that the apt package is called python-flask.

Pavel Vergeev Pavel Vergeev 1, 20 20 silver badges 25 25 bronze badges.We use cookies to provide social media features and to analyse our traffic. We also share information about your use of our site with our social media and analytics partners. Details here. Now, I've seen quite a few similar problems to this already here, but I have attempted the solution.

The following are logs:. I think that the PythonAnywhere system Flask is not finding the SQLAlchemy extension possibly because it only looks where it is installed. Try doing:. Hi, I am not sure whether the requirements. I tried your setup system install of Flask and user install of flask-sqlalchemy and the import works fine fine.

Are you messing with the Python path in your wsgi file? Have you restarted your web app since you installed flask-sqlalchemy? I didn't mess with the Python path, I had gotten it to work!

I was wondering if the fact that I had tried to use Python 3. I just set up with a new app, using 2. Thank you for all the help. Toggle navigation. ImportError: No module named flask. Does this help? Try doing: pip install --user flask. It's always a pleasure to hear from you! Ask us a question, or tell us what you love or hate about PythonAnywhere. We'll get back to you over email ASAP. Sorry, there was an error connecting to the server. Please try again in a few momentsGitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community. Already on GitHub? Sign in to your account. To Reproduce Just run pip3 -r requirements.

flask-关于ImportError: No module named 'flask.ext'

Additional context To make it short just add "config" to the requirements. Once added manually it works. The error I reported is clearly about the module. ModuleNotFoundError: No module named 'config' If you do not install the config module you don't even reach the point where the file config.

Actually if you install the module the program runs. You shouldn't have to add config to the requirements since the module is about the file config. Again: if you remove the config. The first error I reported is about a moduleand if I add the module forget about config.

If I do a pip3 install config then the module is installed and the program runs. You simply have the module already installed, but not all people have so the request to add it to the requirements. In any case no problem for me adding it manually, I opened the issue to simplify the life to other people, we wrote a full page of comments while a simple line added to requirements.

But the tool doesn't use any module named config. The only call to config module actually makes reference to that file. That's why you shouldn't have to add config to the requirements, it's not a module. Line 14 in cb Sathishkantamsetti You are getting this error because gecko driver is not in path. Fix this by doing the following steps. Goto Gecko driver release page and download the latest version of gecko driver for your platform.

Skip to content. Dismiss Join GitHub today GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together. Sign up. New issue.By using our site, you acknowledge that you have read and understand our Cookie PolicyPrivacy Policyand our Terms of Service. The dark mode beta is finally here. Change your preferences any time. Stack Overflow for Teams is a private, secure spot for you and your coworkers to find and share information.

Someone told me don't develop python in windows, it's lot of headache, so I started the same project in Ubuntu, but I got the same problem :. It seems like a virtualenv config problem you should get rid of old virtualenv and make a new one like this.

First from flaskext.

modulenotfounderror no module named flask exthook

I had taken to many routes to fix it. Learn more. ImportError: No module named flask. Asked 4 years, 6 months ago. Active 5 months ago. Viewed 48k times. Bouchaib Mounir Bouchaib Mounir 2 2 gold badges 8 8 silver badges 12 12 bronze badges. Active Oldest Votes. Extrct Extrct 4 4 silver badges 4 4 bronze badges. It's flaskextso Change from flask. Alireza Alireza 70k 18 18 gold badges silver badges bronze badges.

Natalia2q Natalia2q 31 2 2 bronze badges. Mona Jalal Mona Jalal DavidW Mobin Yasin Mobin Yasin 1 1 1 bronze badge. Sign up or log in Sign up using Google. Sign up using Facebook. Sign up using Email and Password. Post as a guest Name. Email Required, but never shown. The Overflow Blog. Featured on Meta. Feedback on Q2 Community Roadmap. Technical site integration observational experiment live on Stack Overflow.

Question Close Updates: Phase 1. Dark Mode Beta - help us root out low-contrast and un-converted bits. Visit chat. Linked 0. Related By using our site, you acknowledge that you have read and understand our Cookie PolicyPrivacy Policyand our Terms of Service. The dark mode beta is finally here. Change your preferences any time. Stack Overflow for Teams is a private, secure spot for you and your coworkers to find and share information. You can install it with pip install flask-restful.

I just met similar problem, My native language is not english, in that tutorial, it said uses flask restful by from flask. I encountered the same problem and above code was unable to solve my problem.

You can directly apply the below code Learn more. No module named flask. Asked 5 years, 3 months ago. Active 5 months ago. Viewed 22k times.

modulenotfounderror no module named flask exthook

WebQube WebQube 5, 7 7 gold badges 36 36 silver badges 67 67 bronze badges. Active Oldest Votes. Ffisegydd Ffisegydd Sphinx Sphinx 6, 2 2 gold badges 15 15 silver badges 33 33 bronze badges. ChenWei ChenWei 11 2 2 bronze badges. Welcome to Stackoverflow! What new information or insight has your answer provided that the other answers have not already provided?

Sign up or log in Sign up using Google. Sign up using Facebook. Sign up using Email and Password. Post as a guest Name. Email Required, but never shown. The Overflow Blog.

Featured on Meta. Feedback on Q2 Community Roadmap. Technical site integration observational experiment live on Stack Overflow.

Question Close Updates: Phase 1.