Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

No matching distribution found for coremltools

Tags:

ios

coreml

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 ?

like image 487
quanhai Avatar asked Dec 02 '22 13:12

quanhai


2 Answers

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
like image 186
Michael Pearce Avatar answered Dec 24 '22 14:12

Michael Pearce


I installed python 3.6 (i think all versions >= 2.7 will cause this problem). I had convert my default python version to 2.7 , but still not work.

And i use another Mac with python version 2.7 as default, it did not appear again. and now , i installed coremltools successfully:

" Collecting coremltools Downloading coremltools-0.3.0-py2.7-none-any.whl (1.4MB) 100% |████████████████████████████████| 1.4MB 171kB/s Requirement already up-to-date: numpy>=1.6.2 in /Library/Python/2.7/site-packages (from coremltools) Requirement already up-to-date: protobuf>=3.1.0 in /Library/Python/2.7/site-packages (from coremltools) Requirement already up-to-date: six>=1.9 in /Library/Python/2.7/site-packages (from protobuf>=3.1.0->coremltools) Requirement already up-to-date: setuptools in /Library/Python/2.7/site-packages (from protobuf>=3.1.0->coremltools) Installing collected packages: coremltools Successfully installed coremltools-0.3.0 "

like image 43
quanhai Avatar answered Dec 24 '22 13:12

quanhai