Rory Rozzer Hodgson
Rory Rozzer Hodgson

Reputation: 69

Unable to install coremltools

I am trying to convert a pb file to a coreml file. to do this i need to install coremltools. However, when i try to install it by pip it comes up with this error : ERROR: Could not find a version that satisfies the requirement coremltools (from versions: none) ERROR: No matching distribution found for coremltools

i have tried to install it in a python 2.7 environment, still no joy

pip install coremltools Collecting coremltools ERROR: Could not find a version that satisfies the requirement coremltools (from versions: none) ERROR: No matching distribution found for coremltools Rorys-MBP:~ roryhodgson$

Upvotes: 0

Views: 1094

Answers (2)

Wenzheng Du
Wenzheng Du

Reputation: 1

If you install from GitHub, then you will not need to install Python 2.7 or fiddle with virtual environments.

pip install "git+https://github.com/apple/coremltools"

The code above will let you install coremltools by cloning the Git repository.

Upvotes: 0

Hector Acosta
Hector Acosta

Reputation: 198

The only reason I could found out that explains why this is happening is that coremltools require python 2.7, make sure you are running it pip --version. If you just typed pip install coremltools the chances are that your machine (assuming it is running macOS) pip command is running the default version of macOS python which probably is 3.5.2 or greater.

I could fix this issue by creating an environment in which my python version was 2.7:

pip install virtualenv

Create a virtual environment:

virtualenv --python=/usr/bin/python2.7 py27

Activate it:

source py27/bin/activate

Lastly, install coremltools:

pip install -U coremltools

When you are done just deactivate the environment running deactivate in the terminal and that's it.

All this is available at the following source: satoshi.blogs.com

Upvotes: 2

Related Questions