我所使用的CentOS系统无法找到flask_script。我已经安装了Flask-Script(见下文)没有运气(见帖子底部)有什么建议吗?
谢谢,
理查德
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'
>>>
答案 0 :(得分:0)
您正在使用pip安装python3依赖项。如你所见
</usr/lib/python3.4/site-packages>
尝试做:
sudo pip3 install Flask-Script
并使用以下命令进行迁移:
python3 manage.py db init
因为您现在已经为python3安装了所有内容。