yhat / ggpy

ggplot port for python
http://yhat.github.io/ggpy/
BSD 2-Clause "Simplified" License
3.7k stars 572 forks source link

unable to import in jupyter notebook #659

Open manjugb opened 5 years ago

manjugb commented 5 years ago

Hi I was trying import ggplot into my jupyter notebook steps i followed

Installed ggplot into my conda environment

when i try access/import from jupyter notebook i am getting following errormessage

from import ggplot * AttributeError: module 'pandas' has no attribute 'tslib' Is there any relation with pandas for importing ggplot? which version of pandas should work of ggplot? below is the full trace log:

AttributeError Traceback (most recent call last)

in 1 import pandas as pd ----> 2 from ggplot import * 3 ~/anaconda3/lib/python3.6/site-packages/ggplot/__init__.py in 17 18 ---> 19 from .geoms import geom_area, geom_blank, geom_boxplot, geom_line, geom_point, geom_jitter, geom_histogram, geom_density, geom_hline, geom_vline, geom_bar, geom_abline, geom_tile, geom_rect, geom_bin2d, geom_step, geom_text, geom_path, geom_ribbon, geom_now_its_art, geom_violin, geom_errorbar, geom_polygon 20 from .stats import stat_smooth, stat_density 21 ~/anaconda3/lib/python3.6/site-packages/ggplot/geoms/__init__.py in ----> 1 from .geom_abline import geom_abline 2 from .geom_area import geom_area 3 from .geom_bar import geom_bar 4 from .geom_bin2d import geom_bin2d 5 from .geom_blank import geom_blank ~/anaconda3/lib/python3.6/site-packages/ggplot/geoms/geom_abline.py in ----> 1 from .geom import geom 2 3 class geom_abline(geom): 4 """ 5 Line specified by slope and intercept ~/anaconda3/lib/python3.6/site-packages/ggplot/geoms/geom.py in 1 from __future__ import (absolute_import, division, print_function, 2 unicode_literals) ----> 3 from ..ggplot import ggplot 4 from ..aes import aes 5 ~/anaconda3/lib/python3.6/site-packages/ggplot/ggplot.py in 11 import warnings 12 ---> 13 from .aes import aes 14 from .legend import make_legend 15 from .themes import theme_gray ~/anaconda3/lib/python3.6/site-packages/ggplot/aes.py in 9 from patsy.eval import EvalEnvironment 10 ---> 11 from . import utils 12 13 import numpy as np ~/anaconda3/lib/python3.6/site-packages/ggplot/utils.py in 79 80 date_types = ( ---> 81 pd.tslib.Timestamp, 82 pd.DatetimeIndex, 83 pd.Period, AttributeError: module 'pandas' has no attribute 'tslib'
disposedtrolley commented 5 years ago

I've just run into the same issue after following the installation instructions on the ggplot homepage. I did a bit of digging and it looks like pandas.tslib has been removed in the latest version of pandas (0.24) thus causing the import to fail.

It would be great if the installation instructions specified the versions of dependencies which have been tested to work with ggplot :)

TPIMarienburg commented 5 years ago

Pretty sure that this project is dead based on responses to other issues: #654

manjugb commented 5 years ago

sorry for the late response I used below configuration OS:UALinux Description: Ubuntu*Pack 18.04 UALinux Release: 18.04 Codename: bionic

conda env: conda 4.6.4 python :3.6.8

userqin commented 5 years ago

did you fix your this issue? If yes, could you share the steps with us?

manjugb commented 5 years ago

Hi , I was not tried after that , will try this week see if i am able to do