Open mowi-mb opened 2 years ago
I'm getting the same error when running pip install lazypredict
I also tried following these instructions before attempting to install lazypredict, but still received the same error.
$ python -V
Python 3.10.2
$ conda -V
conda 4.11.0
$ pip -V
pip 22.0.3 from ~/.pyenv/versions/miniforge3/envs/lazypredict/lib/python3.10/site-packages/pip (python 3.10)
$ file $(pyenv which python)
~/.pyenv/versions/lazypredict/bin/python: Mach-O 64-bit executable arm64
file $(pyenv which conda)
~/.pyenv/versions/miniforge3/condabin/conda: Python script text executable, ASCII text
$ conda env list
# conda environments:
#
…
lazypredict * ~/.pyenv/versions/miniforge3/envs/lazypredict
$ conda info
active environment : lazypredict
active env location : ~/.pyenv/versions/miniforge3/envs/lazypredict
shell level : 0
user config file : ~/.condarc
populated config files : ~/.pyenv/versions/miniforge3/.condarc
~/.condarc
conda version : 4.11.0
conda-build version : not installed
python version : 3.9.7.final.0
virtual packages : __osx=12.2.1=0
__unix=0=0
__archspec=1=arm64
base environment : ~/.pyenv/versions/miniforge3 (writable)
conda av data dir : ~/.pyenv/versions/miniforge3/etc/conda
conda av metadata url : None
channel URLs : https://conda.anaconda.org/conda-forge/osx-arm64
https://conda.anaconda.org/conda-forge/noarch
package cache : ~/.pyenv/versions/miniforge3/pkgs
~/.conda/pkgs
envs directories : ~/.pyenv/versions/miniforge3/envs
~/.conda/envs
platform : osx-arm64
user-agent : conda/4.11.0 requests/2.27.1 CPython/3.9.7 Darwin/21.3.0 OSX/12.2.1
UID:GID : 501:20
netrc file : None
offline mode : False
$ pip list
Package Version
------------- -------
joblib 1.1.0
lightgbm 3.3.2
numpy 1.22.2
pip 22.0.3
scikit-learn 1.0.2
scipy 1.8.0
setuptools 60.8.2
threadpoolctl 3.1.0
wheel 0.37.1
xgboost 1.5.1
$ conda list
# packages in environment at ~/.pyenv/versions/miniforge3/envs/lazypredict:
#
# Name Version Build Channel
_py-xgboost-mutex 2.0 cpu_0 conda-forge
bzip2 1.0.8 h3422bc3_4 conda-forge
ca-certificates 2021.10.8 h4653dfc_0 conda-forge
joblib 1.1.0 pyhd8ed1ab_0 conda-forge
libblas 3.9.0 13_osxarm64_openblas conda-forge
libcblas 3.9.0 13_osxarm64_openblas conda-forge
libcxx 12.0.1 h168391b_1 conda-forge
libffi 3.4.2 h3422bc3_5 conda-forge
libgfortran 5.0.0.dev0 11_0_1_hf114ba7_23 conda-forge
libgfortran5 11.0.1.dev0 hf114ba7_23 conda-forge
liblapack 3.9.0 13_osxarm64_openblas conda-forge
libopenblas 0.3.18 openmp_h5dd58f0_0 conda-forge
libxgboost 1.5.1 hcfdfaf5_0 conda-forge
libzlib 1.2.11 hee7b306_1013 conda-forge
lightgbm 3.3.2 py310h9799b42_0 conda-forge
llvm-openmp 13.0.1 hf3c4609_0 conda-forge
ncurses 6.3 hc470f4d_0 conda-forge
numpy 1.22.2 py310h567df17_0 conda-forge
openssl 3.0.0 h3422bc3_2 conda-forge
pip 22.0.3 pyhd8ed1ab_0 conda-forge
py-xgboost 1.5.1 py310hbe9552e_0 conda-forge
python 3.10.2 h38ef502_3_cpython conda-forge
python_abi 3.10 2_cp310 conda-forge
readline 8.1 hedafd6a_0 conda-forge
scikit-learn 1.0.2 py310h5f111c3_0 conda-forge
scipy 1.8.0 py310h6ecf4ae_1 conda-forge
setuptools 60.8.2 py310hbe9552e_0 conda-forge
sqlite 3.37.0 h72a2b83_0 conda-forge
threadpoolctl 3.1.0 pyh8a188c0_0 conda-forge
tk 8.6.11 he1e0b03_1 conda-forge
tzdata 2021e he74cb21_0 conda-forge
wheel 0.37.1 pyhd8ed1ab_0 conda-forge
xgboost 1.5.1 py310hab06bbd_0 conda-forge
xz 5.2.5 h642e427_1 conda-forge
zlib 1.2.11 hee7b306_1013 conda-forge
$ python
Python 3.10.2 | packaged by conda-forge | (main, Feb 1 2022, 19:29:01) [Clang 11.1.0 ] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> quit()
$ pip install --no-cache-dir lazypredict 1 ↵
Collecting lazypredict
Downloading lazypredict-0.2.9-py2.py3-none-any.whl (12 kB)
Collecting joblib==1.0.0
Downloading joblib-1.0.0-py3-none-any.whl (302 kB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 303.0/303.0 KB 5.5 MB/s eta 0:00:00
Collecting numpy==1.19.1
Downloading numpy-1.19.1.zip (7.3 MB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 7.3/7.3 MB 6.2 MB/s eta 0:00:00
Installing build dependencies ... done
Getting requirements to build wheel ... done
Preparing metadata (pyproject.toml) ... done
Collecting PyYAML==5.3.1
Downloading PyYAML-5.3.1.tar.gz (269 kB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 269.4/269.4 KB 7.0 MB/s eta 0:00:00
Preparing metadata (setup.py) ... done
Collecting lightgbm==2.3.1
Downloading lightgbm-2.3.1.tar.gz (679 kB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 679.3/679.3 KB 6.3 MB/s eta 0:00:00
Preparing metadata (setup.py) ... done
Collecting click==7.1.2
Downloading click-7.1.2-py2.py3-none-any.whl (82 kB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 82.8/82.8 KB 6.6 MB/s eta 0:00:00
Collecting tqdm==4.56.0
Downloading tqdm-4.56.0-py2.py3-none-any.whl (72 kB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 72.5/72.5 KB 9.7 MB/s eta 0:00:00
Collecting xgboost==1.1.1
Downloading xgboost-1.1.1.tar.gz (731 kB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 731.9/731.9 KB 6.3 MB/s eta 0:00:00
Preparing metadata (setup.py) ... done
Collecting scipy==1.5.4
Downloading scipy-1.5.4.tar.gz (25.2 MB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 25.2/25.2 MB 6.3 MB/s eta 0:00:00
Installing build dependencies ... error
error: subprocess-exited-with-error
× pip subprocess to install build dependencies did not run successfully.
│ exit code: 1
╰─> [3385 lines of output]
Please see the attached file for the remainder of the output.
I also get this error if I conda install python=3.8.8
first
I also get this error if I force use of a python binary running on the x86_64 instruction set via Rosetta2
I get the same error using pip. Also running on mac. macOS 11.6.5
EDIT: Just solved this issue by creating a new python 3.8 environment and installing lazy predict before any other libraries.
Can confirm that @Naycat 's solution is working on macOS 12.3.1 (x86) but not macOS 12.3.1 (arm64). Seems like either this library or required packages are not compatible with Apple Silicon
EDIT: I was able to get the script working on Apple Silicon by manually installing the packages required, and downloading the Supervised.py file under lazypredict/Supervised.py. The installation error seems to be stemming from the version numbers defined in the requirements file. A lot of the versions are outdated and hence do not support Apple Silicon.
I've made a quick blog post to get it working on Apple Silicon: https://medium.com/@tanujwadhi/installing-lazy-predict-on-apple-silicon-5bef0d56b9ef
@TanujW !!!!! THANK YOU THAT WORKED!!! Whooooo
@TanujW thank you for this :) It works !!!
I encountered an error after I followed @Naycat solution
note: This error originates from a subprocess, and is likely not a problem with pip.
error: legacy-install-failure
× Encountered error while trying to install package.
╰─> lightgbm
Using Apple M2 MacOS Ventura 13.0
Solved it with two steps:
First, to get CMake by running brew install cmake libomp
as mentioned in this forum:
https://stackoverflow.com/questions/74566704/cannot-install-lightgbm-3-3-3-on-apple-silicon
Second, update python to the latest version using conda update python
Then rerun pip install lazypredict
It worked fine for me. The output:
Successfully built lightgbm
Installing collected packages: lightgbm, lazypredict
Successfully installed lazypredict-0.2.12 lightgbm-3.3.5
Describe the bug I am not able to install lazypredict. I have a Macbook with the "new" M1 chip and faced some issues regarding the new chip with some other packages in the past. Here it seems to be a version issue with numpy (I need np 1.19.5 because of my tensorflow setup). Is there a way to solve this?
Thanks a lot in advance!
To Reproduce Steps to reproduce the behavior:
pip install lazypredict
(I also tried with conda forge:conda install -c conda-forge lazypredict
Error Message
Desktop (please complete the following information):
Additional context pip list: