pythonanacondaturi-create

Failed to install turicreate by anaconda


Got modulenotfounderror when I try to import turicreate in my python file. I've installed Anaconda and use the following statements to install turicreate:

conda create -n turi python=3.7 anaconda

source activate turi

pip install turicreate

got following error after install:

Solving environment: failed with current_repodata.json, will retry with next repodata source.
Collecting package metadata (repodata.json): done
Solving environment: failed

PackagesNotFoundError: The following packages are not available from current channels:

  - turicreate

Current channels:

  - https://repo.anaconda.com/pkgs/main/osx-64
  - https://repo.anaconda.com/pkgs/main/noarch
  - https://repo.anaconda.com/pkgs/r/osx-64
  - https://repo.anaconda.com/pkgs/r/noarch

Environment:

Macos:10.13.6 python:3.7.3 conda:4.1.10

some code:

import pandas as pd
import numpy as np
import time
import turicreate as tc
from sklearn.cross_validation import train_test_split

import sys
sys.path.append("..")
customers=pd.read_csv('bijing/testdata/data/recommend_1.csv')
transactions=pd.read_csv('bijing/testdata/data/trx_data.csv')
print(customers.shape)
customers.head()

Solution

  • #Create a new environment named `trui` with a specific version of Python=3.6 
    $ conda create -n trui python=3.6
    #Activate the environment - trui
    $ conda activate trui
    $ pip install -U turicreate
    

    Then you do everything under this environment.