1

Hello Last few days i am trying to run one script for creating the Modal for machine learning. but I am not able to install the Turicreate package in Pycharm editor.

I follow these steps to run the script.

  1. Download Python 3.7 in this link:
    (https://www.python.org/downloads/)
  2. Download the Pycharm Editor(https://www.jetbrains.com/pycharm/)

After that, I set the project interpreter in latest python3.7 and trying to install turicreate but always I got error.


Collecting turicreate Using cached https://files.pythonhosted.org/packages/db/54/167837569bcb816b3fe68f003f18d07ab9d5ac31b2b12b8f9b07b1ccc7a4/turicreate-4.2.tar.gz Building wheels for collected packages: turicreate Running setup.py bdist_wheel for turicreate: started Running setup.py bdist_wheel for turicreate: finished with status 'error' Complete output from command /Users/tikam/MLTikam1/venv/bin/python -u -c "import setuptools, tokenize;file='/private/var/folders/rh/qx_0gvzn6kzbqjvvbbh66t080000gn/T/pycharm-packaging1/turicreate/setup.py';f=getattr(tokenize, 'open', open)(file);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, file, 'exec'))" bdist_wheel -d /private/var/folders/rh/qx_0gvzn6kzbqjvvbbh66t080000gn/T/pip-wheel-qez5g2v_ --python-tag cp37: running bdist_wheel running build installing to build/bdist.macosx-10.9-x86_64/wheel running install

      ==================================================================================
      ERROR

      If you see this message, pip install did not find an available binary package
      for your system. Supported platforms are:

      * Linux x86_64 (including WSL on Windows 10).
      * macOS 10.12+ x86_64.
      * Python 2.7, 3.5, or 3.6.

      Other possible causes of this error are:

      * Outdated pip version (try `pip install -U pip`).

      ==================================================================================

Running setup.py clean for turicreate Failed to build turicreate Installing collected packages: turicreate Running setup.py install for turicreate: started Running setup.py install for turicreate: finished with status 'error' Complete output from command /Users/tikam/MLTikam1/venv/bin/python -u -c "import setuptools, tokenize;file='/private/var/folders/rh/qx_0gvzn6kzbqjvvbbh66t080000gn/T/pycharm-packaging1/turicreate/setup.py';f=getattr(tokenize, 'open', open)(file);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, file, 'exec'))" install --record /private/var/folders/rh/qx_0gvzn6kzbqjvvbbh66t080000gn/T/pip-record-kjt0p8as/install-record.txt --single-version-externally-managed --compile --install-headers /Users/tikam/MLTikam1/venv/include/site/python3.7/turicreate: running install

        ==================================================================================
        ERROR

        If you see this message, pip install did not find an available binary package
        for your system. Supported platforms are:

        * Linux x86_64 (including WSL on Windows 10).
        * macOS 10.12+ x86_64.
        * Python 2.7, 3.5, or 3.6.

        Other possible causes of this error are:

        * Outdated pip version (try `pip install -U pip`).

        ==================================================================================



----------------------------------------

Failed building wheel for turicreate Command "/Users/tikam/MLTikam1/venv/bin/python -u -c "import setuptools, tokenize;file='/private/var/folders/rh/qx_0gvzn6kzbqjvvbbh66t080000gn/T/pycharm-packaging1/turicreate/setup.py';f=getattr(tokenize, 'open', open)(file);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, file, 'exec'))" install --record /private/var/folders/rh/qx_0gvzn6kzbqjvvbbh66t080000gn/T/pip-record-kjt0p8as/install-record.txt --single-version-externally-managed --compile --install-headers /Users/tikam/MLTikam1/venv/include/site/python3.7/turicreate" failed with error code 1 in /private/var/folders/rh/qx_0gvzn6kzbqjvvbbh66t080000gn/T/pycharm-packaging1/turicreate/


Please suggest what step i need to follow to install the turicreat package.

I want to run this script:

Script **************

import turicreate as tc

data = tc.SFrame('photoLabel.sframe')
model = tc.image_classifier.create(data, target='photoLabel')
predictions = model.predict(data)
model.export_coreml('MyClassifier.mlmodel')
  • installs it successfully on my python 3.6 - mac. As it says, 3.6 seems to be the latest version it currently supports. – Reveille Sep 25 '18 at 15:29
  • The error message says it does only support Python 3.5 and 3.6, not 3.7. So if you really need to use this librarie, you need need to downgrade your Python to version 3.6.x – Eskapp Sep 25 '18 at 18:26
  • @Hapalop Thanks, I was spending too much time in 3.7 version – tikamchandrakar Sep 26 '18 at 05:15

1 Answers1

1

It is not supported Python 3.7 right now. So you have to return to the previous Python version.

brew unlink python
brew install https://raw.githubusercontent.com/Homebrew/homebrew-core/f2a764ef944b1080be64bd88dca9a1d80130c558/Formula/python.rb

Source:https://github.com/apple/turicreate/issues/788

Or you can create virtual env to run turicreate on

Download the Python3.6 tgz file from the official website (eg. Python-3.6.6.tgz)

Unpack it with tar -xvzf Python-3.6.6.tgz
cd Python-3.6.6
run ./configure
run make altinstall to install it 

(install vs altinstall explanation here Difference in details between "make install" and "make altinstall") You'll normally find your new python install under /usr/local/bin. Now you can create a new virtualenv specifying the python version with: virtualenv --python=python3.6 env3.6 Get into the virtualenv running the command source env3.6/source/bin/activate. Install turicreate with the classic pip install turicreate

source:https://github.com/tensorflow/tensorflow/issues/17022

I_Al-thamary
  • 3,385
  • 2
  • 24
  • 37