Search code examples
ioscoreml

No matching distribution found for coremltools


I tried to use coremltools to convert caffemodel to mlmodel on my Mac.

Following the " pip install -U coremltools " , i got this: " Collecting coremltools Could not find a version that satisfies the requirement coremltools (from versions: ) No matching distribution found for coremltools " enter image description here

And, my python version is "Python 2.7.10", numpy version is "numpy (1.12.1)", protobuf version is "protobuf (3.2.0)"

i used " pip search coremltools ", and got " coremltools (0.3.0) - Community Tools for CoreML ", but " pip install coremltools==0.3 " got " Could not find a version that satisfies the requirement coremltools==0.3 (from versions: ) No matching distribution found for coremltools==0.3 "

wtf ? Does anyone get this as well ?


Solution

  • Try installing coremltools in a virtualenv that runs Python 2.7. Note that it currently doesn't work with Python 3.x

    Installing virtualenv

    Once virtualenv is installed, create a new environment that runs Python 2.7

    virtualenv --python=/usr/bin/python2.7 <DIR>
    

    Next, activate the environment

    source <DIR>/bin/activate
    

    Then proceed with installing coremltools per usual

    pip install -U coremltools