当我尝试在我的 python 文件中导入 turicreate 时出现 modulenotfounderror。我已经安装了 Anaconda 并使用以下语句来安装 turicreate:
conda create -n turi python=3.7 anaconda
source activate turi
pip install turicreate
安装后出现以下错误:
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
环境:
Macos:10.13.6 python:3.7.3 conda:4.1.10
一些代码:
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()