I was unable to install the cPickle module using pip:

$ pip --version pip 1.5.6 from /usr/lib/python2.7/dist-packages (python 2.7) $ pip install cPickle ... Could not find any downloads that satisfy the requirement pickle 

Attempting installation with pip3 was also unsuccessful:

$ pip3 --version pip 1.5.6 from /usr/lib/python3/dist-packages (python 3.4) $ pip3 install cPickle ... Could not find any downloads that satisfy the requirement cPickle 

Could you help me in understanding why this doesn't work?

2 Answers

Python 2.7 and Python 3.4 include the pickle and cPickle modules already. You do not need to take any extra steps to install them. You can see a list of currently installed modules by typing

help('modules') 

from a Python prompt.

1

cPickle is by default part of the standard library, but the capital P could be confusing. You should use:

import cPickle 

With the capitial P.

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy