rationalmatter / Juno-Issue-Tracker

Defect Tracker for Juno
78 stars 1 forks source link

Pinned packages that need to be updated #411

Open neg2sode opened 3 months ago

neg2sode commented 3 months ago

Describe the bug Calling ggplot in plotnine triggers dependency errors, due to incompatible versions of pinned packages.

Steps to reproduce

  1. Creat a new Jupyter notebook.
  2. Run the code below.
  3. See “ModuleNotFoundError: No module named 'matplotlib.layout_engine’” raised from ggplot.py

`import numpy as np import pandas as pd import statsmodels.api as sm import statsmodels.formula.api as smf from itertools import combinations import plotnine as p

import ssl ssl._create_default_https_context = ssl._create_unverified_context def read_data(file): return pd.read_stata("https://github.com/scunning1975/mixtape/raw/master/" + file)

auto = pd.read_stata('https://github.com/scunning1975/mixtape/raw/master/auto.dta') auto['length'] = auto['length'] - auto['length'].mean()

lm1 = sm.OLS.from_formula('price ~ length', data=auto).fit() lm2 = sm.OLS.from_formula('price ~ length + weight + headroom + mpg', data=auto).fit()

coef_lm1 = lm1.params coef_lm2 = lm2.params resid_lm2 = lm2.resid

auto['y_single'] = coef_lm1[0] + coef_lm1[1]auto['length'] auto['y_multi'] = coef_lm1[0] + coef_lm2[1]auto['length']

p.ggplot(auto) +\ p.geom_point(p.aes(x = 'length', y = 'price')) +\ p.geom_smooth(p.aes(x = 'length', y = 'y_multi'), color = "blue") +\ p.geom_smooth(p.aes(x = 'length', y = 'y_single'), color="red")`

Expected behavior Expected to run normally, with graphs presented in the output.

Screenshots Capture d’écran   2024-07-08 à 13 03 42

Environment (please complete the following information):

alexstaravoitau commented 3 months ago

Thanks for reporting @neg2sode—yep, I'm planning to update the pinned packages soon.

neg2sode commented 3 months ago

Good to hear! I look forward to see that in future updates.

AndreFelixM commented 3 months ago

Not sure why this has been closed when the update has not been done yet. I am also just missing an update to pandas to be able to use this program properly. Having the version that is over 1y old is blocking me to use it.

alexstaravoitau commented 3 months ago

@AndreFelixM Yep agreed, reopening for now.

andre-f-m commented 1 month ago

Hi Alex, is there any update on this? Do you have an ETC for the package updates? Thank you

alexstaravoitau commented 3 weeks ago

@andre-f-m There are still a couple of requested packages I want to add before starting on the upgrade (which will be a bit of a journey because of internal dependencies and cross-dependencies between packages). Don't have an ETA I'm afraid, but will update the issue when there are any developments.