1

I'm python beginner and have issues with running a the following command:

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

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

I have installed Python 3.7.4 on my mac and tied to run this in the IDLE. But it says "SyntaxError: invalid syntax" regarding "clone". Do I need to install something else first to be able to run this?

2
  • 1
    you have to install git Commented Oct 10, 2019 at 9:41
  • Interactive python is for executing python statements, not OS command lines. If you start python from a command line, you will see the same error. IDLE's Shell simulates interactive python quite closely. Commented Oct 10, 2019 at 18:39

2 Answers 2

9

you just need to '!' before the command

Your command would be like,

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

NOTE : if you are using anaconda navigator or googlecolab

Sign up to request clarification or add additional context in comments.

Comments

1

It's because you can't use git clone in IDLE.
To clone a git repository you should open a terminal and go the location in which you want to clone the repo, and then type the following command:
git clone https://github.com/marksgraham/OCT-Converter.git
If it still give you an error then you need to install git, for Mac you can use this installer.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.