1

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'
>>>
Bhaskar
  • 1,838
  • 1
  • 16
  • 29
user2945234
  • 418
  • 6
  • 12
  • This installation way install `flask_script` on your sistem. So if you are not using a virtual environment then this means the package is installed for python2. To install it for python3 use pip3. But it’s better to use virtual environment. – metmirr Jun 14 '18 at 20:25
  • Thank you for the reply. I tried installing with pip3 and obtained the same result? – user2945234 Jun 14 '18 at 21:20

1 Answers1

1

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.

SuperStormer
  • 4,997
  • 5
  • 25
  • 35
yogender
  • 496
  • 4
  • 7