Problems encountered while doing lab via Coursera:
Flask version 1.0.2 raises Jinja2 error.
ImportError: cannot import name 'Markup' from 'jinja2' (/home/coder/project/VENV/lib/python3.8/site-packages/jinja2/__init__.py)
Updating to version 2.2.2 resolves the issue.
Numpy installed by default is 1.24.1, which raises:
AttributeError: module 'numpy' has no attribute 'float'
on joblib.load(file_name) call.
Preinstalling numpy==1.23 resolves the issue.
prediction = list(clf.predict(scaled_payload)) on line 71 raises
raw_predictions = self.loss_.get_init_raw_predictions(
AttributeError: 'LeastSquaresError' object has no attribute 'get_init_raw_predictions'
Which can be resolved by downgrading scikit-learn to 0.20.3, but python3.8 + updated pip does not support installing it.
So, there is an open question about resolving it: use the latest versions and update the code (imports and logic would be different) or use previous Python versions.
Problems encountered while doing lab via Coursera:
Flask version 1.0.2 raises Jinja2 error.
ImportError: cannot import name 'Markup' from 'jinja2' (/home/coder/project/VENV/lib/python3.8/site-packages/jinja2/__init__.py)
Updating to version 2.2.2 resolves the issue.Numpy installed by default is 1.24.1, which raises:
AttributeError: module 'numpy' has no attribute 'float'
on joblib.load(file_name) call. Preinstalling numpy==1.23 resolves the issue.prediction = list(clf.predict(scaled_payload))
on line 71 raisesWhich can be resolved by downgrading scikit-learn to 0.20.3, but python3.8 + updated pip does not support installing it.
So, there is an open question about resolving it: use the latest versions and update the code (imports and logic would be different) or use previous Python versions.