Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to install dill in IPython?

Right at the outset, I tried conda install dill, and conda was not able to find it on the internet.

Then I downloaded both .tgz and .zip files in my default IPython directory from here: https://pypi.python.org/pypi/dill

After which I tried the following commands:
conda install dill-0.2b1.zip
conda install "C:\<rest_of_the_complete_path>\dill-0.2b1.zip"
and likewise for .tgz. All four attempts yielded the error:
No packages found matching:

What is it that I am doing wrong? I am trying to repeat the examples given on the following link: http://nbviewer.ipython.org/gist/minrk/5241793

Edit 1: I had installed dill on my system by running the .exe file from https://pypi.python.org/pypi/dill. This step installed dill on my system python (C:\Python27) but not on my Anaconda Python. I am assuming that these two pythons are separate since I can import the usual modules (say numpy for instance) on both — the python I access through cmd and the one I access through my IPython notebooks — but I can import dill only on the python I accesses through cmd and not in my IPython notebooks.

like image 860
Shashank Sawant Avatar asked May 10 '14 04:05

Shashank Sawant


People also ask

How do I use dill in python?

dill can be used to store python objects to a file, but the primary usage is to send python objects across the network as a byte stream. dill is quite flexible, and allows arbitrary user defined classes and functions to be serialized.

What is dill pickle in python?

About Dilldill extends python's pickle module for serializing and de-serializing python objects to the majority of the built-in python types. Serialization is the process of converting an object to a byte stream, and the inverse of which is converting a byte stream back to a python object hierarchy.

Is dill faster than pickle?

Dill module might work as a great alternative to serialize the unpickable objects. It is more robust; however, it is slower than pickle — the tradeoff.

What is a .dill file?

dill is just the name for the file extension used for Kernel (AoT snapshots) Since Dart 2 VM no longer has the ability to directly execute Dart from raw source, instead VM expects to be given Kernel binaries (also called dill files) which contain serialized Kernel ASTs.


2 Answers

I read the quick start guide for Anaconda (link) which describes how to install packages not available in the Continuum Analytics Repository. Accordingly I went to binstar.org and searched for dill.

The following versions were available for Windows, of which I downloaded the file win-32\dill-0.2b1-py27_0.tar.bz2.
https://binstar.org/dhirschfeld/dill/0.2b1/files

Then I went to the directory where the file was downloaded and executed the following command:
conda install win-32-dill-0.2b1-py27_0.tar.bz2

I checked the package availability using the command conda list and it seems that dill is now installed for my IPython notebooks.

like image 145
Shashank Sawant Avatar answered Oct 04 '22 02:10

Shashank Sawant


If conda doesn't install it, it just means that it's not yet in the Continuum Anaconda repository. You can just do pip install dill, and that should work fine with Anaconda.

If pip isn't working for you, I have gone ahead and created a conda package for dill and uploaded it to my http://binstar.org channel. You can install via:

conda install -c pwang dill

like image 38
Peter Wang Avatar answered Oct 04 '22 02:10

Peter Wang