Anano import error: no cPickle module
>>> import theano Traceback (most recent call last): File "<stdin>", line 1, in <module> File "/Library/Python/2.7/site-packages/theano/__init__.py", line 52, in <module> from theano.gof import ( File "/Library/Python/2.7/site-packages/theano/gof/__init__.py", line 38, in <module> from theano.gof.cc import \ File "/Library/Python/2.7/site-packages/theano/gof/cc.py", line 30, in <module> from theano.gof import link File "/Library/Python/2.7/site-packages/theano/gof/link.py", line 18, in <module> from theano.gof.type import Type File "/Library/Python/2.7/site-packages/theano/gof/type.py", line 17, in <module> from theano.gof.op import CLinkerObject File "/Library/Python/2.7/site-packages/theano/gof/op.py", line 25, in <module> from theano.gof.cmodule import GCC_compiler File "/Library/Python/2.7/site-packages/theano/gof/cmodule.py", line 8, in <module> import six.moves.cPickle as pickle ImportError: No module named cPickle I am sure there is no problem with cPickle . Could this be a problem with other dependencies? It is true that this morning I updated all the packages so that a version conflict may occur. However, the problem still exists after I switched to the extreme version of theano. Anyone help me figure this out?
PS: My evolving device is the Macbook Pro 13 (early 2015); my system version is OS X 10.10.5; Python version - 2.7.10
============================ Second editing ====================== ===============
I seem to have the latest version of six installed on my Mac.
YiqundeMacBook-Pro:~ Leo$ pip show six --- Metadata-Version: 2.0 Name: six Version: 1.9.0 Summary: Python 2 and 3 compatibility utilities Home-page: http://pypi.python.org/pypi/six/ Author: Benjamin Peterson Author-email: benjamin@python.or g License: MIT Location: /Library/Python/2.7/site-packages Requires: I had the same issue and six issues were updated:
sudo easy_install --upgrade six Try to avoid using sudo at all costs. Open a python session and run
import six print six.__version__ print six.__file__ The version will most likely not be the last (1.10.0), so manually delete the six.py and six.pyc files in the imported path, and then run pip install six . Python should now import the latest version of six compatible with Theano :)