Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
menu search
person
Welcome To Ask or Share your Answers For Others

Categories

I've tried a virtualenv, changing my python type to 2.7x, and installing it manually.

However, I keep getting the error of

Could not find a version that satisfies the requirement coremltools>=0.8 (from tfcoreml) (from versions: ) No matching distribution found for coremltools>=0.8 (from tfcoreml)

When I search using pip search coremltools for the versions I only get coremltools (2.1.0) - Community Tools for CoreML and it still won't let me get that version.

I need help. Can somebody either tell me what I am doing wrong or walk me step-by-step of how I can install this properly?

Thanks.

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
176 views
Welcome To Ask or Share your Answers For Others

1 Answer

Just worked my way through the same error, in which coremltools==0.8 showed up as a dependency for turicreate.

The problem is that for coremltools >= 6.2, the versions pip can see are pre-built and are only available for Mac OSX >= 10.12 and Linux.

(I'm running Mac OSX 10.11, and I suspect the error is Apple's way of trying to encourage an upgrade.)

I was able to build and install coremltools from source by downloading the appropriate release from https://github.com/apple/coremltools/releases and following its README.

In particular, this meant:

  • Manually install dependencies:

    pip install numpy>=1.10
    pip install protobuf>=3.1
    
  • I did not have the command cmake, so I downloaded it from https://cmake.org. Inside the GUI were directions for installing its symlinks into /usr/local/bin:

    sudo "/Applications/CMake.app/Contents/bin/cmake-gui" --install
    
  • From the coremltools source directory, run:

    cmake . -DPYTHON=$(which python) -DPYTHON_CONFIG=$(which python-config)
    make
    

    and

    python setup.up install
    

Pip could then see coremltools and it carried on with installing turicreate.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
...