I'm working with pyCharm, and been trying to install the sqlalchemy package to help me connect to my mysql db. I've run
pip install flask-sqlalchemy
which completed successfully after downloading a bunch of files, but still the library isn't available when I do:
from flask.ext.sqlalchemy import SQLAlchemy
I'm pretty new to python and all this stuff, and I can't figure out what to do. Installing flask was easy because pyCharm sort of did that for me, is there any way to do something similar with this?
EDIT: I have managed to do this by opening pyCharm's preferences, then going to Project Interpreter, which displays all of the installed modules. Then simply click the + button at the bottom, and search for the required module... PyCharm did everything for me from that point.
What works great when working with pyCharm and dependencies is to create a requirements.txt at the root of the project and add all of the packages required for your project.
With that pyCharm will auto-detect the requirements.txt file and ask you if you want to download the dependencies automatically.
In your case you could have tried to create a requirements.txt with:
flask
flask-sqlalchemy
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With