【发布时间】:2020-06-29 12:24:19
【问题描述】:
我正在尝试从 Access VBA 运行 Jupyter 笔记本:
Sub import_hawk()
Dim objShell As Object
Dim PythonExe, PythonScript As String
Set objShell = VBA.CreateObject("Wscript.Shell")
PythonExe = """C:\Users\Philip\.conda\envs\latest\python.exe"""
PythonScript = "C:\Users\Philip\OneDrive\Betting\Capra\Tennis\polgara\polgara.ipynb"
objShell.run PythonExe & PythonScript
End Sub
当我运行它时,一个框会短暂出现然后消失。我已经手动运行了笔记本,它工作正常。最令人沮丧的是,它工作了大约 5 分钟,现在不行了……
【问题讨论】:
-
你不应该用
jupyter notebook <notebook>运行笔记本吗? -
您也没有在 PythonExe 和 PythonScript 之间提供空格
-
@michalwa - 恐怕我在这方面还很陌生 - VBA 中的哪个位置?
-
@ErikA - 添加空间无济于事:(
-
将python的路径替换为
jupyter notebook,其中jupyter可以替换为jupyter的完整路径。
标签: python vba ms-access jupyter-notebook