在WinPython和PortableGit中使用nbdime时出现FileNotFoundError

时间:2020-08-31 16:21:26

标签: python-3.x windows git version-control

我正在尝试使用nbdime在Windows上进行jupyter笔记本版本控制。我使用WinPython 3.7.2和PortableGit,并配置了WinPython环境变量,以便它知道“ git”命令。

我按照nbdime文档中描述的安装和配置步骤进行操作,nbdime config-git --enable --global命令最终出现以下错误:

Traceback (most recent call last):
File "d:\users\myuser\documents\portable\wpy64-3720\python-3.7.2.amd64\lib\runpy.py", line 193, in _run_module_as_main
    "__main__", mod_spec)
File "d:\users\myuser\documents\portable\wpy64-3720\python-3.7.2.amd64\lib\runpy.py", line 85, in _run_code
    exec(code, run_globals)
File "D:\Users\myuser\Documents\Portable\WPy64-3720\python-3.7.2.amd64\Scripts\nbdime.exe\__main__.py", line 9, in <module>
File "d:\users\myuser\documents\portable\wpy64-3720\python-3.7.2.amd64\lib\site-packages\nbdime\__main__.py", line 95, in main_dispatch
    diff_driver(args) or
File "d:\users\myuser\documents\portable\wpy64-3720\python-3.7.2.amd64\lib\site-packages\nbdime\vcs\git\diffdriver.py", line 128, in main
    opts.config_func(opts.scope)
File "d:\users\myuser\documents\portable\wpy64-3720\python-3.7.2.amd64\lib\site-packages\nbdime\vcs\git\diffdriver.py", line 41, in enable
    check_call(cmd + ['diff.jupyternotebook.command', 'git-nbdiffdriver diff'])
File "d:\users\myuser\documents\portable\wpy64-3720\python-3.7.2.amd64\lib\subprocess.py", line 342, in check_call
    retcode = call(*popenargs, **kwargs)
File "d:\users\myuser\documents\portable\wpy64-3720\python-3.7.2.amd64\lib\subprocess.py", line 323, in call
    with Popen(*popenargs, **kwargs) as p:
File "d:\users\myuser\documents\portable\wpy64-3720\python-3.7.2.amd64\lib\subprocess.py", line 775, in __init__
    restore_signals, start_new_session)
File "d:\users\myuser\documents\portable\wpy64-3720\python-3.7.2.amd64\lib\subprocess.py", line 1178, in _execute_child
    startupinfo)
FileNotFoundError: [WinError 2] The system cannot find the file specified

这是怎么了?谢谢!

0 个答案:

没有答案