各位大佬,小白求助一个问题,
在本地pycharm上可以执行,无异常,
复制到tx云函数上显示:ModuleNotFoundError: No module named 'borax'
不知道tx云函数里面怎么导入这个模块
本地pycharm执行效果见下图:
本地pycharm上执行效果
tx云函数测试日志如下:
Traceback (most recent call last):
File "/var/runtime/python3/bootstrap.py", line 133, in init_handler
func_handler = get_func_handler(file.rsplit(".", 1)[0], func)
File "/var/runtime/python3/bootstrap.py", line 159, in get_func_handler
mod = imp.load_module(mname, *imp.find_module(mname))
File "/var/lang/python3/lib/python3.6/imp.py", line 234, in load_module
return load_source(name, filename, file)
File "/var/lang/python3/lib/python3.6/imp.py", line 172, in load_source
module = _load(spec)
File "<frozen importlib._bootstrap>", line 675, in _load
File "<frozen importlib._bootstrap>", line 655, in _load_unlocked
File "<frozen importlib._bootstrap_external>", line 678, in exec_module
File "<frozen importlib._bootstrap>", line 205, in _call_with_frames_removed
File "/var/user/index.py", line 4, in <module>
from borax.calendars.lunardate import LunarDate
ModuleNotFoundError: No module named 'borax'