我在 VSCode 中有一个 jupyter 笔记本,我试图使用 VSCode 中的内置按钮将其导出为 html,但是我不断收到此错误,提示“jupyter-nbconvert
找不到 Jupyter 命令”。
我正在使用 pip 并已 pip 安装了我能想到的与 jupyter 相关的任何内容: jupyter、jupyterlab、nbconvert、notebook。
有什么想法可能导致这个问题吗?我使用的是 Windows 10。
> C:\Python38\python.exe c:\Users\Toshiba\.vscode\extensions\ms-python.python-2020.9.114305\pythonFiles\pyvsc-run-isolated.py jupyter nbconvert --version
> C:\Python38\python.exe c:\Users\Toshiba\.vscode\extensions\ms-python.python-2020.9.114305\pythonFiles\pyvsc-run-isolated.py jupyter nbconvert --version
Error 2020-10-26 10:40:19: Export failed [r [Error]: Traceback (most recent call last):
File "c:\Users\Toshiba\.vscode\extensions\ms-python.python-2020.9.114305\pythonFiles\pyvsc-run-isolated.py", line 26, in <module>
runpy.run_module(module, run_name="__main__", alter_sys=True)
File "C:\Python38\lib\runpy.py", line 207, in run_module
return _run_module_code(code, init_globals, run_name, mod_spec)
File "C:\Python38\lib\runpy.py", line 97, in _run_module_code
_run_code(code, mod_globals, init_globals,
File "C:\Python38\lib\runpy.py", line 87, …
Run Code Online (Sandbox Code Playgroud) python python-3.x jupyter visual-studio-code jupyter-notebook
我有一个问题,我有一组具有给定生产能力的仓库,它们以给定的成本将一些产品发送给客户列表。我试图将发送产品的总成本降至最低,以便满足每个客户的需求。那部分是排序的。
现在我需要添加一个新的目标(或约束),我尝试以最低的成本满足所有客户的需求,同时尽可能使用最少的仓库数量。假设从 5 个仓库开始,如果问题是不可能的,则尝试 6、7、8 等,直到找到解决方案,如果我使用尽可能少的仓库数量来满足所有需求。
我如何使用 or-tool 约束编程模块来解决这个问题?甚至有可能吗?我仔细查看了文档,但找不到任何似乎符合这个想法的约束或函数。