【发布时间】:2018-06-04 16:48:48
【问题描述】:
我想将烧瓶服务器上传到 bluemix。我的项目结构是这样的
- 类
- functions.py
- 沃森
- bot.py
- requirements.txt
- runtime.txt
- 过程文件
- manifest.yml
我的 bot.py 有这个依赖:
from classes import functions
我尝试使用以下方式将其包含在清单中:
./classes 或 ./classes/functions
但我没有运气,它一直说找不到模块或 pip.exceptions.InstallationError: Invalid requirements: './classes/functions' 之类的东西
不知道怎么添加依赖
manifest.yml
---
applications:
- name: chatbotstest
random-route: true
memory: 256M
Procfile(我用来运行应用程序的文件)
web: python watson/bot.py
当我打印我的 sys.path 时,我得到了这个:
['..', '/home/vcap/app/watson', '/home/vcap/deps/0/python/lib/python36.zip', '/home/vcap/deps/0/py
e/vcap/deps/0/python/lib/python3.6/lib-dynload', '/home/vcap/deps/0/python/lib/python3.6/site-packages', '/home/vcap/deps/0/python/lib/python3.6/site-
-py3.6.egg', '/home/vcap/deps/0/python/lib/python3.6/site-packages/pip-9.0.1-py3.6.egg']
我尝试使用
将文件夹父级添加到我的脚本中非常感谢您的帮助!!!
【问题讨论】:
标签: python flask pip ibm-cloud requirements