I succesfully installed scikit-flow by using pip but somehow it doesn't work when I import and use it
Question: I've already installed scikitlearn the other day and The code which I tried to
execute is as follows.

    
    
    import skflow
    from sklearn import datasets, metrics
    
    iris = datasets.load_iris()
    classifier = skflow.TensorFlowLinearClassifier(n_classes=3)
    classifier.fit(iris.data, iris.target)
    score = metrics.accuracy_score(classifier.predict(iris.data),     iris.target)
    print("Accuracy: %f" % score)
    

Above code is the one I found in Githubgist page. And the rusult was

ImportError Traceback (most recent call last) in () \----> 1 import skflow 2
from sklearn import datasets, metrics 3 4 iris = datasets.load_iris() 5
classifier = skflow.TensorFlowLinearClassifier(n_classes=3)

/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-
packages/skflow/**init**.py in () 16 import pkg_resources as pkg_rs 17 import
numpy as np \---> 18 import tensorflow as tf 19 20 from skflow.io import *

/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-
packages/tensorflow/**init**.py in () 21 from **future** import print_function
22 \---> 23 from tensorflow.python import *

/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/tensorflow/python/**init**.py in () 43 _default_dlopen_flags = sys.getdlopenflags() 44 sys.setdlopenflags(_default_dlopen_flags | ctypes.RTLD_GLOBAL) \---> 45 from tensorflow.python import pywrap_tensorflow 46 sys.setdlopenflags(_default_dlopen_flags) 47 

/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-
packages/tensorflow/python/pywrap_tensorflow.py in () 26 fp.close() 27 return
_mod \---> 28 _pywrap_tensorflow = swig_import_helper() 29 del
swig_import_helper 30 else:

/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-
packages/tensorflow/python/pywrap_tensorflow.py in swig_import_helper() 22 if
fp is not None: 23 try: \---> 24 _mod = imp.load_module('_pywrap_tensorflow',
fp, pathname, description) 25 finally: 26 fp.close()

ImportError:
dlopen(/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-
packages/tensorflow/python/_pywrap_tensorflow.so, 10): no suitable image
found. Did find:
/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-
packages/tensorflow/python/_pywrap_tensorflow.so: mach-o, but wrong
architecture

I started coding very recently so I can't handle with this problem at all..
What does 'wrong architecture' mean here?? Hope anyone answer this.


Answer: Looks like you have a wrong version of tensorflow installed. Wrong
architecture in this case probably means that you installed linux version of
TF on your OS X.

I would recommend uninstalling both tensorflow and skflow and then running
this command (for OS X with Python2.7):

    
    
    sudo easy_install --upgrade six
    sudo pip install --upgrade https://storage.googleapis.com/tensorflow/mac/tensorflow-0.8.0rc0-py2-none-any.whl
    

Skflow is now part of the TensorFlow, so you can use by importing `import
tensorflow.contrib.learn as skflow` instead of `import skflow`.

