0
所以我試圖爲我的燒瓶應用程序安裝pybuilder,並且出於某種原因,它不安裝依賴項?它顯示了這個當我運行 'PYB install_dependencies'PyBuilder不會安裝Flask?
PyBuilder version 0.11.10
Build started at 2017-07-17 11:57:23
------------------------------------------------------------
[INFO] Building flask-example version 0.1.2
[INFO] Executing build in /home/aalred/flask-example
[INFO] Going to execute task install_dependencies
[INFO] Installing all dependencies
[INFO] Processing batch dependency 'coverage'
[INFO] Processing batch dependency 'pyassert'
[INFO] Processing batch dependency 'pyfix'
[INFO] Processing batch dependency 'flask'
------------------------------------------------------------
BUILD SUCCESSFUL
------------------------------------------------------------
但後來當我做了命令:
python hello.py
我收到以下錯誤:
from flask import Flask, render_template
ImportError: No module named flask
可有人請解釋什麼正在進行?這讓我很困惑,我似乎無法找到一個直截了當的答案。
這是我build.py是否有幫助太:
from pybuilder.core import init, use_plugin
use_plugin("python.core")
use_plugin("python.install_dependencies")
#use_plugin("python.unittest")
default_task = ['install_dependencies', 'publish']
@init
def initialize(project):
project.build_depends_on('pyfix')
project.build_depends_on('pyassert')
project.depends_on('flask')
project.depends_on('flask-mysql')