Error: When trying to convert Caffe model to CoreML model

Hi, I am facing few difficulties in converting the caffe models to CoreML models. I am currently using Macbook Air for my development purposes. When I used the commands provided in the documentation of `coremltools`, I am getting the following error:


```

Traceback (most recent call last): File "coreml.py", line 23, in <module> class_labels='synset_words.txt') File "/ return MLModel(model_path) File "/ self.__proxy__ = _get_proxy_from_spec(model) File "/ return _MLModelProxy.fromSpec(filename) RuntimeError: Got non-zero exit code 72 from xcrun. Output was: xcrun: error: unable to find utility "coremlcompiler", not a developer tool or in PATH

```


It will be really helpful if anyone can tell me what is causing this issue and what is the solution for the same.

Answered by srir4ghu in 235460022

Thank you!


In case you are facing the error as stated above, try changing the command-line path:


sudo xcode-select --switch /Applications/Xcode-beta.app/Contents/Developer


And the conversion runs normally 🙂

I am facing the same error when I upgrade my mac to 10.13 beta !! It works fine when 10.12.4. Reinstalling coremltools is not helping. If you find any solution please tell me.

Did you try changing the command-line path to the Xcode beta? You can use `xcode-select` in the Terminal for this.

Accepted Answer

Thank you!


In case you are facing the error as stated above, try changing the command-line path:


sudo xcode-select --switch /Applications/Xcode-beta.app/Contents/Developer


And the conversion runs normally 🙂

Awesome! Thank you!!

I tried this and the conversion still wouldn't work, it came up with the same error - do you have any other ideas?

Error: When trying to convert Caffe model to CoreML model
 
 
Q