【SyntaxError: invalid syntax】

SyntaxError: invalid syntax


`


foreword


python git clone invalid syntax

One, git clone problem

Example:
insert image description here

I encountered a syntax error when trying to run the git clone command using Python.

If you want to use the git clone command in Python, then you can use the subprocess module to invoke system commands.

import subprocess
subprocess.run(["git", "clone", "http://www.modelscope.cn/damo/nlp_bart_text-error-correction_chinese.git"])

This will successfully run the git clone command in Python.

Guess you like

Origin blog.csdn.net/qq_42700796/article/details/129425830