Reputation: 371
from flask import Flask
from flask.ext.admin import Admin
app = Flask(__name__)
admin = Admin(app)
# Add administrative views here
app.run(debug=True)
using python 3.3
getting error: "ImportError: No module named 'flask_admin'" when
I have already set up an interpreter and downloaded the latest flask & flask_admin
I am new to pycharm and python in general so I'm sure it is something stupid I am doing wrong.
Upvotes: 2
Views: 3346
Reputation: 59
Check if project developed using makefile
if makefile is there just follow readme.md
make install
make run
Otherwise bellow steps
First Create Virtual ENV:
virtualenv env
Put Project Inside env:
anywhere parallel to bin,lib,etc
Then Activate env:
source venv/bin/activate
When you inside env run bellow command :
pip install -r requirements/development.txt
(use correct file path according your project structure)
For Python 3:
$python3
import flask_admin
quit()
For Python 2:
$python
import flask_admin
quit()
Upvotes: 0
Reputation: 371
figured it out, was running from command line and it was using the default interpreter and not my custom one
Upvotes: 2