You do not need to do anything special. Just import the standard pickle module. It is already optimized with C code under the hood.
The pickle module automatically uses the C-accelerated version if available. There is no longer a separate cPickle module to import. How to "Install" or Use cPickle download cpickle
If you are looking to "download cPickle ," it is important to know that you typically do not need to download it as a separate package. cPickle was a built-in module in Python 2.x, and in Python 3.x, it has been integrated directly into the standard pickle library. Understanding cPickle vs. pickle You do not need to do anything special
Available as a separate built-in module called cPickle . cPickle was a built-in module in Python 2
If you are still using Python 2, you should attempt to import cPickle and fall back to pickle if it’s not available.