Reputation: 1
i installed flask in the cmd using the pip install flask command and i also tested it in the cmd and it works. But when i go to pycharm all the modules i download using pip are for some reason in lib/site_packages instead of just being in site_packages.the lib folder and then i do "from flask import Flask" and it says that " cannot import name 'Flask' from 'flask' (C:\Users\User\PycharmProjects\pythonProject1\flask.py)" the error there is no Flask in flask
Upvotes: 0
Views: 41
Reputation: 135
Change the py file name to anything else. naming your flask file as flask.py will create a namespace conflict.
Upvotes: 1