After watching ML Core in Depth (one of WWDC 2017 video), I have decided to try coremltools on my MacBook Pro (MacOS Sierra, Version 10.12.4).
When I type,
# pip install coremltools
it fails with the following error message:
Could not find a version that satisfies the requirement coremltools (from versions: )
No matching distribution found for coremltools
This is because Python on my MacOS is 3.5.2, while coremltools requires 2.7.
To solve this problem, I have installed virtualenv by typing
# pip install virtualenv
which will install vittualenv (globally).
Then, I created a virtual environment "py27" with following command
# virtualenv --python=/usr/bin/python2.7 py27
where py27 is the name of directory (to hold this environment).
Once this environment is created, I can activate it by typing
# source py27/bin/activate
You can verify it by typing
(p27)# python --version
Python 2.7.10
Now you are ready to install coremltools by typing
(p27)# pip install -U coremltools
By the way, you can exit from this virtual environment by typing
(p27)# deactivate
Comments
You can follow this conversation by subscribing to the comment feed for this post.