yhat / ggpy

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

ggplot installs for python3.9.1.0, but import ggplot gets error re pandas attribute tslib #674

Open jrbrearley opened 3 years ago

jrbrearley commented 3 years ago

ggplot-0.11.5-py2.py3-none-any.whl from pypi.org will install on python3.9.1.0 using the WinPython Control Panel. However, when I use IDLE GUI to do "import ggplot", I get the error:

Traceback (most recent call last): File "<pyshell#29>", line 1, in import ggplot File "C:\WinPython\python-3.9.1.amd64\lib\site-packages\ggplot__init.py", line 19, in 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 File "C:\WinPython\python-3.9.1.amd64\lib\site-packages\ggplot\geoms__init__.py", line 1, in from .geom_abline import geom_abline File "C:\WinPython\python-3.9.1.amd64\lib\site-packages\ggplot\geoms\geom_abline.py", line 1, in from .geom import geom File "C:\WinPython\python-3.9.1.amd64\lib\site-packages\ggplot\geoms\geom.py", line 3, in from ..ggplot import ggplot File "C:\WinPython\python-3.9.1.amd64\lib\site-packages\ggplot\ggplot.py", line 13, in from .aes import aes File "C:\WinPython\python-3.9.1.amd64\lib\site-packages\ggplot\aes.py", line 11, in from . import utils File "C:\WinPython\python-3.9.1.amd64\lib\site-packages\ggplot\utils.py", line 81, in pd.tslib.Timestamp, File "C:\WinPython\python-3.9.1.amd64\lib\site-packages\pandas\init.py", line 258, in getattr__ raise AttributeError(f"module 'pandas' has no attribute '{name}'") AttributeError: module 'pandas' has no attribute 'tslib'

Is this project supported on python3? If not, please update docs at pypi.org and other places to show python2 only / deprecated.

mb1069 commented 3 years ago

@jrbrearley A temporary solution could be to change the imports in ggplot2 https://stackoverflow.com/questions/58143253/module-pandas-has-no-attribute-tslib

This is not pretty though and could really do with a PR

nharrisanalyst commented 1 year ago

Pretty disappointed that this issue is over a year old and this package is unusable currently.

Python2 has been completely depreciated.