Warning: file_get_contents(/data/phpspider/zhask/data//catemap/8/python-3.x/16.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Python 3.x 如何解决git克隆代码的语法错误?_Python 3.x_Git_Command Line_Python Idle - Fatal编程技术网

Python 3.x 如何解决git克隆代码的语法错误?

Python 3.x 如何解决git克隆代码的语法错误?,python-3.x,git,command-line,python-idle,Python 3.x,Git,Command Line,Python Idle,我是python初学者,在运行以下命令时遇到问题: git clone https://github.com/marksgraham/OCT-Converter.git () 我已经在我的mac上安装了Python3.7.4,并准备在空闲时间运行它。但它说“SyntaxError:无效语法”关于“克隆”。我需要先安装其他东西才能运行此功能吗?这是因为您不能在空闲状态下使用git clone。 要克隆git存储库,您应该打开一个终端,转到要克隆repo的位置,然后键入以下命令: git克隆htt

我是python初学者,在运行以下命令时遇到问题:

git clone https://github.com/marksgraham/OCT-Converter.git
()


我已经在我的mac上安装了Python3.7.4,并准备在空闲时间运行它。但它说“SyntaxError:无效语法”关于“克隆”。我需要先安装其他东西才能运行此功能吗?

这是因为您不能在空闲状态下使用git clone。
要克隆git存储库,您应该打开一个终端,转到要克隆repo的位置,然后键入以下命令:
git克隆https://github.com/marksgraham/OCT-Converter.git


如果它仍然给你一个错误,那么你需要安装git,对于Mac你可以使用。

这是因为你不能在空闲状态下使用git clone。
要克隆git存储库,您应该打开一个终端,转到要克隆repo的位置,然后键入以下命令:
git克隆https://github.com/marksgraham/OCT-Converter.git


如果它仍然给你一个错误,那么你需要安装git,对于Mac你可以使用。

你只需要'!'在命令之前

你的命令是

!git clone https://github.com/marksgraham/OCT-Converter.git

注意:如果您使用的是anaconda navigator或googlecolab,您只需使用“!”在命令之前

你的命令是

!git clone https://github.com/marksgraham/OCT-Converter.git

注意:如果您使用的是anaconda navigator或googlecolab

,则必须安装交互式python以执行python语句,而不是OS命令行。如果从命令行启动python,您将看到相同的错误。IDLE的Shell非常接近于模拟交互式python。您必须安装交互式python是为了执行python语句,而不是操作系统命令行。如果从命令行启动python,您将看到相同的错误。IDLE的Shell非常接近于模拟交互式python。