DOC: Update CONTRIBUTING.md
State: closed

Add `ipython-notebook` as dependency. I had to install it otherwise sphinx was failing the build.


Labels:
name: Docs

Comments:
Hmm, this is strange. I wouldn't know why that is needed. Further, `ipython-notebook` is not a correct PyPI name (it is a conda package), and with IPython 4.0 it is also different.

What failure do you get? And which version of IPython are you using? 
This is maybe rather a bug in IPython

I've tried to remove ipython-notebook and build again the documentation but now it works, so I would conclude the problem was with one of the dependencies I've installed with ipython-notebook, which was needed also by Sphinx. The issue I got was about a missing Config file. I don't remember more honestly. I'll try to replicate the issue by end of the week. 

This is the result of a `pd.show_versions()`

```
INSTALLED VERSIONS
------------------
commit: a7bb3a48d290abc87b64ca4d7fbeb9fe2451bf84
python: 3.4.3.final.0
python-bits: 64
OS: Linux
OS-release: 3.13.0-24-generic
machine: x86_64
processor: x86_64
byteorder: little
LC_ALL: None
LANG: en_GB.UTF-8

pandas: 0.16.2
nose: 1.3.7
Cython: 0.23
numpy: 1.9.2
scipy: 0.16.0
statsmodels: 0.6.1
IPython: 3.2.1
sphinx: 1.3.1
patsy: 0.4.0
dateutil: 2.4.2
pytz: 2015.4
bottleneck: 1.0.0
tables: 3.2.1
numexpr: 2.4.3
matplotlib: 1.4.3
openpyxl: 2.0.2
xlrd: 0.9.4
xlwt: 1.0.0
xlsxwriter: 0.7.3
lxml: 3.4.4
bs4: 4.3.2
html5lib: 0.999
httplib2: None
apiclient: None
sqlalchemy: 1.0.8
pymysql: None
psycopg2: None
```

I would think of `pygments` or `jinja2` which are notebook deps but not plain IPython ones and which could be needed for the docs, _but_, those are also explicit sphinx dependencies already

If that may help, I've installed ipython and sphinx via conda.

> On 19 Aug 2015, at 00:33, Joris Van den Bossche notifications@github.com wrote:
> 
> I would think of pygments or jinja2 which are notebook deps but not plain IPython ones and which could be needed for the docs, but, those are also explicit sphinx dependencies already
> 
> —
> Reply to this email directly or view it on GitHub.

In that case, it should not be that difficult to try to reproduce the issue, just make a new environment with only packages `create -n test-docs pandas ipython sphinx` and see if the docs build

This is the traceback. I can leave the program running indefinitely but it won't complete.
`pygments` and `jinja2` were automatically installed in the environment.

```
(py34)gianluca@gianluca-Aspire-S3-391 ~/PycharmProjects/pandas-IamGianluca $ source activate test-docs
discarding /home/gianluca/Applications/anaconda/envs/py34/bin from PATH
prepending /home/gianluca/Applications/anaconda/envs/test-docs/bin to PATH
(test-docs)gianluca@gianluca-Aspire-S3-391 ~/PycharmProjects/pandas-IamGianluca $ cd doc
(test-docs)gianluca@gianluca-Aspire-S3-391 ~/PycharmProjects/pandas-IamGianluca/doc $ python make.py clean
(test-docs)gianluca@gianluca-Aspire-S3-391 ~/PycharmProjects/pandas-IamGianluca/doc $ python make.py --single merging
Running Sphinx v1.3.1
Exception occurred while building, starting debugger:
Traceback (most recent call last):
  File "/home/gianluca/Applications/anaconda/envs/test-docs/lib/python2.7/site-packages/Sphinx-1.3.1-py2.7.egg/sphinx/cmdline.py", line 244, in main
    opts.warningiserror, opts.tags, opts.verbosity, opts.jobs)
  File "/home/gianluca/Applications/anaconda/envs/test-docs/lib/python2.7/site-packages/Sphinx-1.3.1-py2.7.egg/sphinx/application.py", line 126, in __init__
    confoverrides or {}, self.tags)
  File "/home/gianluca/Applications/anaconda/envs/test-docs/lib/python2.7/site-packages/Sphinx-1.3.1-py2.7.egg/sphinx/config.py", line 277, in __init__
    execfile_(filename, config)
  File "/home/gianluca/Applications/anaconda/envs/test-docs/lib/python2.7/site-packages/Sphinx-1.3.1-py2.7.egg/sphinx/util/pycompat.py", line 128, in execfile_
    exec_(code, _globals)
  File "/home/gianluca/Applications/anaconda/envs/test-docs/lib/python2.7/site-packages/six.py", line 672, in exec_
    exec("""exec _code_ in _globs_, _locs_""")
  File "<string>", line 1, in <module>
  File "conf.py", line 16, in <module>
  File "/home/gianluca/PycharmProjects/pandas-IamGianluca/pandas/__init__.py", line 48, in <module>
    from pandas.io.api import *
  File "/home/gianluca/PycharmProjects/pandas-IamGianluca/pandas/io/api.py", line 15, in <module>
    from pandas.io.packers import read_msgpack, to_msgpack
  File "/home/gianluca/PycharmProjects/pandas-IamGianluca/pandas/io/packers.py", line 63, in <module>
    from pandas.msgpack import Unpacker as _Unpacker, Packer as _Packer, ExtType
  File "/home/gianluca/PycharmProjects/pandas-IamGianluca/pandas/msgpack/__init__.py", line 21, in <module>
    from pandas.msgpack._packer import Packer
ImportError: No module named _packer
> /home/gianluca/PycharmProjects/pandas-IamGianluca/pandas/msgpack/__init__.py(21)<module>()
-> from pandas.msgpack._packer import Packer
(Pdb) 
```

But this error seems to be related with pandas itself, eg that the c-extensions are not properly build?

It didn't fail but there were some warnings. I'll try to build the c-extensions again later today. Thanks Joris ;-)

@IamGianluca What IPython version are you using? Because I now just used the new 4.0, and I also got an error with something about Config (didn't look further into detail for now)

(Closing as the original changes will not be applied, but we can discuss further)

I'm using IPython: 3.2.1. I've posted the results of a `pd.show_versions()` a few posts above. I've tried to build again the c extensions but I don't see any error. Just some warnings. 

So it seems solved then?

Yes it seems solved!

I recently pulled from the master branch and now I am also getting the same issue as @IamGianluca 

`python make.py html`

The result is 

```
winterflower@winterflower-dev:~/open-source-projects/pandas/doc$ python make.py html
Running Sphinx v1.2.3
Exception occurred while building, starting debugger:
Traceback (most recent call last):
  File "/home/winterflower/anaconda/lib/python2.7/site-packages/sphinx/cmdline.py", line 253, in main
    warningiserror, tags, verbosity, parallel)
  File "/home/winterflower/anaconda/lib/python2.7/site-packages/sphinx/application.py", line 107, in __init__
    confoverrides or {}, self.tags)
  File "/home/winterflower/anaconda/lib/python2.7/site-packages/sphinx/config.py", line 229, in __init__
    execfile_(filename, config)
  File "/home/winterflower/anaconda/lib/python2.7/site-packages/sphinx/util/pycompat.py", line 105, in execfile_
    exec code in _globals
  File "conf.py", line 16, in <module>
  File "/home/winterflower/open-source-projects/pandas/pandas/__init__.py", line 48, in <module>
    from pandas.io.api import *
  File "/home/winterflower/open-source-projects/pandas/pandas/io/api.py", line 15, in <module>
    from pandas.io.packers import read_msgpack, to_msgpack
  File "/home/winterflower/open-source-projects/pandas/pandas/io/packers.py", line 63, in <module>
    from pandas.msgpack import Unpacker as _Unpacker, Packer as _Packer, ExtType
  File "/home/winterflower/open-source-projects/pandas/pandas/msgpack/__init__.py", line 21, in <module>
    from pandas.msgpack._packer import Packer
ImportError: No module named _packer
```

I'll do some debugging to find out why its failing.

@Winterflower you need to rebuild the extensions

`python setup.py build_ext --inplace`

or 

`make`

@jreback I did try to do that, but I a ran into another issue

Ubuntu 14.04
Cython 0.22.1

``` python
winterflower@winterflower-dev:~/open-source-projects/pandas$ python setup.py build_ext --inplace
Traceback (most recent call last):
  File "setup.py", line 567, in <module>
    **setuptools_kwargs)
  File "/home/winterflower/anaconda/lib/python2.7/distutils/core.py", line 111, in setup
    _setup_distribution = dist = klass(attrs)
  File "/home/winterflower/anaconda/lib/python2.7/site-packages/setuptools-18.1-py2.7.egg/setuptools/dist.py", line 272, in __init__
  File "/home/winterflower/anaconda/lib/python2.7/distutils/dist.py", line 287, in __init__
    self.finalize_options()
  File "/home/winterflower/anaconda/lib/python2.7/site-packages/setuptools-18.1-py2.7.egg/setuptools/dist.py", line 327, in finalize_options
  File "/home/winterflower/anaconda/lib/python2.7/site-packages/setuptools-18.1-py2.7.egg/pkg_resources/__init__.py", line 2355, in load

  File "/home/winterflower/anaconda/lib/python2.7/site-packages/setuptools-18.1-py2.7.egg/pkg_resources/__init__.py", line 2361, in resolve

  File "/home/winterflower/anaconda/lib/python2.7/site-packages/setuptools_cython.py", line 21, in <module>
    class build_cython(Cython.Distutils.build_ext, object):
AttributeError: 'module' object has no attribute 'Distutils'
```

I fudged something in Cython at some point...?
Same thing happens with `make`. 
Seems similar to this https://code.google.com/p/poly2tri/issues/detail?id=32

upgrade cython you seem to have an old one

 I hoped that a simple update to cython 0.23 would solve the issue, but in the end I had to create a new virtualenv. This is a hard one to reproduce so I suppose we just have to wait and see if more devs/users get this problem when trying to build docs and source.