Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

Python

Unresolved Reference when Importing Flask Login

curious if anyone is having this issue....

when i enter "from flask_login import UserMixin"

or even from flask.ext.login import UserMixin

i get an 'unresolved reference' error in pycharm.

even though i successfully installed flask and flask-login using pip in the directory for my project.

weird thing is that if i go into Pycharm in the project folder i don't see flask-login anywhere. so i'm guessing the error is because of this...but i did install it correctly (so i think)

so ..seems as if i fixed the error. went to File--Invalidate Caches and Restarted Pycharm.

2 Answers

mmm forget that i am still having same issue.

i think this has to do with the virtual environment i was using.

question --do we ALWAYS need to create a virtual environment?

this seems to be a chore--especially in pycharm--not sure if i'm just making it hard for some reason