Skip to content

[INSTALL]: AttributeError: module 'numpy' has no attribute 'float'. #3322

@KhalidAmine

Description

@KhalidAmine

Installation check

Platform

macOS-10.15.7-x86_64-i386-64bit

Installation Method

pip install

pycaret Version

2.3.10

Python Version

3.8.8

Description

After trying to install pycaret (pip install pycaret) and doing from pycaret.classification import * , i get this error:


AttributeError Traceback (most recent call last)
Cell In[1], line 5
3 import statsmodels.api as sm
4 import numpy as np
----> 5 from pycaret.classification import *
6 import matplotlib.pyplot as plt

File ~/Desktop/dev/Eth_ML_predictor/ML-env/lib/python3.8/site-packages/pycaret/classification.py:10
7 import pandas as pd
8 import numpy as np
---> 10 import pycaret.internal.tabular
11 from pycaret.loggers.base_logger import BaseLogger
12 from pycaret.parallel import ParallelBackend

File ~/Desktop/dev/Eth_ML_predictor/ML-env/lib/python3.8/site-packages/pycaret/internal/tabular.py:16
10 from pycaret import loggers
11 from pycaret.internal.meta_estimators import (
12 PowerTransformedTargetRegressor,
13 CustomProbabilityThresholdClassifier,
14 get_estimator_from_meta_estimator,
15 )
---> 16 from pycaret.internal.pipeline import (
17 add_estimator_to_pipeline,
18 get_pipeline_estimator_label,
...

AttributeError: module 'numpy' has no attribute 'float'.
np.float was a deprecated alias for the builtin float. To avoid this error in existing code, use float by itself. Doing this will not modify any behavior and is safe. If you specifically wanted the numpy scalar type, use np.float64 here.
The aliases was originally deprecated in NumPy 1.20; for more details and guidance see the original release note at:
https://numpy.org/devdocs/release/1.20.0-notes.html#deprecations

Installation Logs

Replace this line with the installation logs.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions