Faculty of Engineering and Mathematical Sciences 
Not logged in (login)

help3403


This forum is provided to promote discussion amongst students enrolled in Agile Web Development (CITS3403).
 
Options:
RSS cloud
Jump to:

trouble installing flask-admin

9 of 419 articles shown, currently no other people reading this forum.
photo
From: ANONYMOUS
Date: Sat 16th May, 9:46pm
Actions: 
        Login-to-reply
I've been trying to install flask-admin and for some reason after saying it has 
installed correctly, I'm still getting the no module named error. I've tried 
installing it with pip and pip3 and inside and outside the venv but nothing has 
worked. Any ideas?

trouble installing flask-admin

photo
From: Timothy F.
Date: Sat 16th May, 10:12pm
Actions: 
        Login-to-reply
Only do installations inside a virtual environment, oterhwise it can get very 
messy.

Insode your virtual enviroment use 
pip freeze
to confirm that flask admin has been installed, and is in the library.

Then check that your importing the right module (flask_admin, not flask-admin etc).

trouble installing flask-admin

photo
From: ANONYMOUS  O.P.
Date: Sat 16th May, 10:22pm
Actions: 
        Login-to-reply
I have Flask-Admin==1.5.6 in my pip freeze and am 100% sure I'm importing the correct 
module. When running pip freeze though it does give a list of errors saying WARNING: 
Could not generate requirements for distribution -ask-Admin 1.5.6. and a few more with 
very similar error messages 

trouble installing flask-admin

photo
From: ANONYMOUS  O.P.
Date: Sat 16th May, 10:35pm
Actions: 
        Login-to-reply
I deleted the files causing that error message as I didn't know why they were there to begin 
with, and reinstalled flask-admin. Now it shows no errors and has flask-admin in pip freeze 
but still doesn't recognise flask_admin.

trouble installing flask-admin

photo
From: Timothy F.
Date: Sat 16th May, 10:57pm
Actions: 
        Login-to-reply
Maybe post the error message s you are getting here, along with details of your environment 
(i.e. are ou building at the command line, or a terminal in vscode, and whats theoperating 
system etc).

trouble installing flask-admin

photo
From: ANONYMOUS  O.P.
Date: Sat 16th May, 11:05pm
Actions: 
        Login-to-reply
"Timothy French" <tim.                   wrote:

> Maybe post the error message s you are getting here, along with details of your environment 
> (i.e. are ou building at the command line, or a terminal in vscode, and whats theoperating 
> system etc).


Error: While importing "app", an ImportError was raised:

Traceback (most recent call last):
  File "/Users/user/Desktop/Git/Learning/venv/lib/python2.7/site-packages/flask/cli.py", line 240, in 
locate_app
    __import__(module_name)
  File "/Users/user/Desktop/Git/CITS3403-Repos/app/__init__.py", line 13, in <module>
    from app import routes, models
  File "/Users/user/Desktop/Git/CITS3403-Repos/app/routes.py", line 3, in <module>
    from app.forms import LoginForm
  File "/Users/user/Desktop/Git/CITS3403-Repos/app/forms.py", line 4, in <module>
    from app.models import User
  File "/Users/user/Desktop/Git/CITS3403-Repos/app/models.py", line 6, in <module>
    from flask_admin import Admin
ImportError: No module named flask_admin

I'm on mac and building in a terminal inside vscode.

trouble installing flask-admin

photo
From: ANONYMOUS  O.P.
Date: Sat 16th May, 11:36pm
Actions: 
        Login-to-reply
It's also doing this for any other extensions I try to add

trouble installing flask-admin

photo
From: Haolin W.
Date: Sat 16th May, 11:59pm
Actions: 
        Login-to-reply
Likely a VSCode issue. Other students have had issues with this over the past week as 
well. VSCode is probably not picking up your project interpreter, or you've opened the 
wrong folder so it's reading your directory/python modules incorrectly. Likely the 
former though.

Bit of a cop out solution but one student just installed PyCharm and it went away. Try 
playing around with the Project Interpreter inside VSCode + your project virtual 
environments, otherwise if you still can't find the issue, use PyCharm if you have to.

ANONYMOUS wrote:

> It's also doing this for any other extensions I try to add

trouble installing flask-admin

photo
From: ANONYMOUS  O.P.
Date: Sun 17th May, 12:55am
Actions: 
        Login-to-reply
Yep, PyCharm fixed this, thank you for the help. 
This Page


Program written by: [email protected]
Feedback welcome
Last modified:  8:27am May 24 2020