flask_script issue python 3.4

1k Views Asked by At

The CentOS system I am on can't find flask_script. I have installed Flask-Script (see below) no luck (see bottom of post) Any suggestions?

Thanks,

Richard

sudo pip install Flask-Script
[sudo] password for : 

Requirement already satisfied: Flask-Script in /usr/lib/python3.4/site-packages (0.6.7)

Requirement already satisfied: Flask in /usr/lib/python3.4/site-packages (from Flask-Script) (0.10.1)

Requirement already satisfied: Werkzeug>=0.7 in /usr/lib/python3.4/site-packages (from Flask->Flask-Script) (0.14.1)

Requirement already satisfied: Jinja2>=2.4 in /usr/lib/python3.4/site-packages (from Flask->Flask-Script) (2.10)

Requirement already satisfied: itsdangerous>=0.21 in /usr/lib/python3.4/site-packages (from Flask->Flask-Script) (0.24)

Requirement already satisfied: MarkupSafe>=0.23 in /usr/lib/python3.4/site-packages (from Jinja2>=2.4->Flask->Flask-Script) (0.23)

[]$ python3.4
Python 3.4.4 (default, Jan 20 2017, 10:00:51) 
[GCC 4.8.5 20150623 (Red Hat 4.8.5-11)] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> from flask_script import Manager
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
ImportError: No module named 'flask_script'
>>>
1

There are 1 best solutions below

0
yogender On

You are using pip to install python3 dependencies. As visible by your path </usr/lib/python3.4/site-packages>

try to do:

sudo pip3 install Flask-Script

and migrate it with:

python3 manage.py db init

because you installed everything for python3 now.