8

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?

Kevin Bowen
  • 19,615
  • 55
  • 79
  • 83
donnie
  • 81

2 Answers2

7

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.

blendenzo
  • 922
  • I have Python 2.7.6 and when I type help('modules'), I do see pickle there but no cpickle. – Roman Dec 05 '16 at 08:16
5

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.

muru
  • 197,895
  • 55
  • 485
  • 740
G M
  • 209
  • 3
  • 11