Skip to content

Documentation Error - pandas2ri causes ModuleNotFoundError #22412

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
webartifex opened this issue Aug 18, 2018 · 5 comments · Fixed by #22424
Closed

Documentation Error - pandas2ri causes ModuleNotFoundError #22412

webartifex opened this issue Aug 18, 2018 · 5 comments · Fixed by #22424
Labels
Milestone

Comments

@webartifex
Copy link
Contributor

Code Sample, a copy-pastable example if possible

Compare
https://pandas.pydata.org/pandas-docs/version/0.23.3/r_interface.html
with
https://pandas.pydata.org/pandas-docs/version/0.23.4/r_interface.html

from rpy2.robjects import pandas2ri
...

Problem description

The import generates a ModuleNotFoundError

@WillAyd
Copy link
Member

WillAyd commented Aug 18, 2018

Not a pandas issue as rpy2 is a separate project, though the error points to that not even being installed

@WillAyd WillAyd closed this as completed Aug 18, 2018
@WillAyd WillAyd reopened this Aug 18, 2018
@WillAyd
Copy link
Member

WillAyd commented Aug 18, 2018

Sorry misread your issue - I see you are referring to the pandas docs and not an attempt to do this locally.

@WillAyd WillAyd changed the title pandas2ri causes ModuleNotFoundError Documentation Error - pandas2ri causes ModuleNotFoundError Aug 18, 2018
@WillAyd WillAyd added the Docs label Aug 18, 2018
@webartifex
Copy link
Contributor Author

I believe there is still a bug, but most likely it is in the rpy2 package.

When I install rpy2 version 2.8.* this ModuleNotFoundError does NOT occur.

However, with the latest 2.9.* release it does occur.

Explicitly pip installing the tzlocal package seems to fix it.

I conclude that tzlocal is not installed together with rpy2.

Maybe someone wants to confirm this behavior?

@jorisvandenbossche
Copy link
Member

There is already an issue at rpy2: https://bitbucket.org/rpy2/rpy2/issues/458/tzlocal-dependency

Apparently, tzlocal is an optional dependency of rpy2 (just as pandas is as well), so the user (i.e. we, for the docs) is responsible to make sure to install it.

@TomAugspurger
Copy link
Contributor

The docs are built with a this environment: https://github.com/pandas-dev/pandas/blob/master/ci/travis-36-doc.yaml

@webartifex can you make a PR adding tzlocal to that environment?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants