ydataai / ydata-profiling

1 Line of code data quality profiling & exploratory data analysis for Pandas and Spark DataFrames.
https://docs.profiling.ydata.ai
MIT License
12.41k stars 1.67k forks source link

Installation issues on macOS #810

Closed firasm closed 3 years ago

firasm commented 3 years ago

Describe the bug

I've had pandas_profiling working in the past, but at the moment I'm not able to instal or use it.

First, from the readme the install instructions suggest:

▶ pip install pandas-profiling[notebook]
zsh: no matches found: pandas-profiling[notebook]

Then, second when bypassing the [notebook] and installing pandas-profiling, on macOS 11.5.1 running Python 3.8.3 inside a JupyterLab notebook I get this error:

AttributeError: type object 'Boolean' has no attribute 'register_relationship'

Full Stack Trace:

``` --------------------------------------------------------------------------- AttributeError Traceback (most recent call last) in 2 import numpy as np 3 import matplotlib.pyplot as plt ----> 4 import pandas_profiling 5 6 sns.set_theme(style="white", ~/.pyenv/versions/3.8.3/lib/python3.8/site-packages/pandas_profiling/__init__.py in 4 """ 5 ----> 6 from pandas_profiling.controller import pandas_decorator 7 from pandas_profiling.profile_report import ProfileReport 8 from pandas_profiling.version import __version__ ~/.pyenv/versions/3.8.3/lib/python3.8/site-packages/pandas_profiling/controller/pandas_decorator.py in 2 from pandas import DataFrame 3 ----> 4 from pandas_profiling.profile_report import ProfileReport 5 6 ~/.pyenv/versions/3.8.3/lib/python3.8/site-packages/pandas_profiling/profile_report.py in 9 import yaml 10 from tqdm.auto import tqdm ---> 11 from visions import VisionsTypeset 12 13 from pandas_profiling.config import Config, Settings ~/.pyenv/versions/3.8.3/lib/python3.8/site-packages/visions/__init__.py in 2 3 from visions import types, typesets, utils ----> 4 from visions.backends import * 5 from visions.declarative import create_type 6 from visions.functional import ( ~/.pyenv/versions/3.8.3/lib/python3.8/site-packages/visions/backends/__init__.py in 7 import pandas as pd 8 ----> 9 import visions.backends.pandas 10 from visions.backends.pandas.test_utils import pandas_version 11 ~/.pyenv/versions/3.8.3/lib/python3.8/site-packages/visions/backends/pandas/__init__.py in ----> 1 import visions.backends.pandas.types ~/.pyenv/versions/3.8.3/lib/python3.8/site-packages/visions/backends/pandas/types/__init__.py in ----> 1 import visions.backends.pandas.types.boolean 2 import visions.backends.pandas.types.categorical 3 import visions.backends.pandas.types.complex 4 import visions.backends.pandas.types.count 5 import visions.backends.pandas.types.date ~/.pyenv/versions/3.8.3/lib/python3.8/site-packages/visions/backends/pandas/types/boolean.py in 41 42 ---> 43 @Boolean.register_relationship(Object, pd.Series) 44 @series_handle_nulls 45 def object_is_boolean(series: pd.Series, state: dict) -> bool: AttributeError: type object 'Boolean' has no attribute 'register_relationship' ```

Version information:

``` absl-py==0.10.0 aiohttp==3.6.3 alabaster==0.7.12 altair==4.1.0 altair-data-server==0.4.1 altair-saver==0.5.0 altair-viewer==0.3.0 anyio==2.0.2 appdirs==1.4.4 appnope==0.1.0 arrow==0.14.7 asteval==0.9.22 async-generator==1.10 async-timeout==3.0.1 attrs==19.3.0 Automat==20.2.0 Babel==2.8.0 backcall==0.2.0 beautifulsoup4==4.9.1 binaryornot==0.4.4 black==21.5b1 bleach==3.1.5 bokeh==2.2.3 Bottleneck==1.3.2 branca==0.4.2 Brotli==1.0.9 bs4==0.0.1 CacheControl==0.12.6 cachetools==4.1.1 cachy==0.3.0 canvasapi==1.0.0 certifi==2020.6.20 cffi==1.14.4 cfgv==3.2.0 chardet==3.0.4 chat-exporter==1.3.0.4 cleo==0.8.1 click==7.1.2 click-plugins==1.1.1 cligj==0.7.1 clikit==0.6.2 colorama==0.4.3 configobj==5.0.6 confuse==1.3.0 constantly==15.1.0 cookiecutter==1.7.3 coverage==5.3 crashtest==0.3.1 cryptography==3.4.6 cssselect==1.1.0 cycler==0.10.0 dash==1.19.0 dash-bootstrap-components==0.11.3 dash-core-components==1.15.0 dash-html-components==1.1.2 dash-renderer==1.9.0 dash-table==4.11.2 decorator==4.4.2 defusedxml==0.6.0 Deprecated==1.2.10 discord.py==1.5.1 distlib==0.3.1 dnspython==1.16.0 docopt==0.6.2 docutils==0.16 emoji==1.2.0 entrypoints==0.3 fett==0.3.2 filelock==3.0.12 Fiona==1.8.18 flake8==3.8.4 Flask==1.1.2 Flask-Compress==1.5.0 folium==0.12.1 future==0.18.2 geopandas==0.9.0 ghp-import==1.0.0 gitdb==4.0.5 GitPython==3.1.7 google-auth==1.11.0 google-auth-oauthlib==0.4.1 grapheme==0.6.0 html5lib==1.1 htmlmin==0.1.12 hyperlink==21.0.0 hypothesis==5.41.2 icalendar==4.0.6 ics==0.7 identify==1.5.9 idna==2.8 ImageHash==4.1.0 imagesize==1.2.0 importlib-metadata==4.0.1 importlib-resources==1.5.0 incremental==21.3.0 iniconfig==1.1.1 interrogate==1.3.2 ipykernel==5.3.2 ipython==7.16.1 ipython-genutils==0.2.0 ipython-sql==0.4.0 ipywidgets==7.5.1 itemadapter==0.2.0 itemloaders==1.0.4 itsdangerous==1.1.0 jax==0.1.75 jaxlib==0.1.52 jedi==0.17.1 Jinja2==2.11.2 jinja2-time==0.2.0 jmespath==0.10.0 joblib==0.16.0 json5==0.9.5 jsonschema==3.2.0 jupyter==1.0.0 jupyter-book==0.11.1 jupyter-cache==0.4.1 jupyter-client==6.1.6 jupyter-console==6.4.0 jupyter-contrib-core==0.3.3 jupyter-contrib-nbextensions==0.5.1 jupyter-core==4.6.3 jupyter-highlight-selected-word==0.2.0 jupyter-latex-envs==1.4.6 jupyter-nbextensions-configurator==0.4.1 jupyter-packaging==0.7.12 jupyter-server==1.4.1 jupyter-sphinx==0.3.2 jupyterbook-latex==0.3.1 jupyterlab==3.1.0a10 jupyterlab-code-formatter==1.4.4 jupyterlab-server==2.3.0 jupyterthemes==0.20.0 jupytext==1.8.2 keyring==21.8.0 kiwisolver==1.2.0 latexcodec==2.0.1 lesscpy==0.14.0 libsass==0.20.0 linkify==1.4 linkify-it-py==1.0.1 llvmlite==0.34.0 lmfit==1.0.2 lockfile==0.12.2 lxml==4.5.2 Markdown==3.2.2 markdown-it-py==1.1.0 MarkupSafe==1.1.1 matplotlib==3.4.1 mccabe==0.6.1 md2canvas @ git+https://github.com/maracieco/md2canvas@093c748f28dbb723c4d68e02dc6004dd71ed9bab mdformat==0.7.6 mdformat-frontmatter==0.3.1 mdformat-gfm==0.3.1 mdformat-myst==0.1.3 mdformat-tables==0.4.1 mdit-py-plugins==0.2.6 missingno==0.4.2 mistune==0.8.4 mpmath==1.1.0 msgpack==1.0.2 multidict==4.7.6 multimethod==1.4 munch==2.5.0 mypy-extensions==0.4.3 mysql-connector-python==8.0.22 myst==1.0.3 myst-nb==0.12.3 myst-parser==0.13.5 natsort==7.0.1 nbclassic==0.2.5 nbclient==0.4.1 nbconvert==5.6.1 nbdime==2.0.0 nbformat==5.0.7 nbsphinx==0.8.0 nest-asyncio==1.3.3 nested-lookup==0.2.21 networkx==2.5 nibabel==3.2.1 nodeenv==1.5.0 notebook==6.0.3 notebook-as-pdf==0.3.1 nteract-on-jupyter==2.1.3 numba==0.51.2 numpy==1.20.3 oauthlib==3.1.0 opt-einsum==3.3.0 oset==0.1.3 packaging==20.4 pandas==1.3.1 pandas-flavor==0.2.0 pandas-profiling==3.0.0 pandas-vet==0.2.2 pandoc==1.0.2 pandocfilters==1.4.2 panel==0.10.3 param==1.10.1 parsel==1.6.0 parso==0.7.0 pastel==0.2.1 pathspec==0.8.1 pathtools==0.1.2 pexpect==4.8.0 phik==0.12.0 pickleshare==0.7.5 Pillow==8.0.0 pkginfo==1.7.0 plotly==4.10.0 pluggy==0.13.1 ply==3.11 poetry==1.1.6 poetry-core==1.0.3 portpicker==1.3.1 poyo==0.5.0 pre-commit==2.8.2 prettytable==0.7.2 problem-bank-helpers==0.1.3 problem-bank-scripts @ file:///Users/firasm/Sync/EL/Physics%20OER%20Bank/problem_bank_scripts prometheus-client==0.8.0 prompt-toolkit==3.0.5 Protego==0.1.16 protobuf==3.13.0 ptyprocess==0.6.0 py==1.9.0 py4j==0.10.9 pyasn1==0.4.8 pyasn1-modules==0.2.8 pybtex==0.22.2 pybtex-docutils==1.0.0 pycodestyle==2.6.0 pycparser==2.20 pyct==0.4.8 pydantic==1.8.2 pydata-sphinx-theme==0.6.3 PyDispatcher==2.0.5 pyee==7.0.2 pyflakes==2.2.0 PyGithub==1.53 Pygments==2.6.1 pyjanitor @ git+https://github.com/ericmjl/pyjanitor.git@782eb1f4ba7d35828bfb24d815a22243c8fbd14c PyJWT==1.7.1 pylev==1.3.0 pymongo==3.11.3 pyodbc==4.0.30 pyOpenSSL==20.0.1 pyparsing==2.4.7 PyPDF2==1.26.0 pyppeteer==0.2.2 pyproj==3.0.1 pyrsistent==0.16.0 pysketcher==0.0.7 pyspark==3.0.1 pysqlite3==0.4.3 pytest==6.1.2 pytest-azurepipelines==0.8.0 pytest-cov==2.10.1 python-dateutil==2.8.1 python-jsonrpc-server==0.3.4 python-slugify==5.0.2 pytz==2019.1 pyviz-comms==2.0.1 PyWavelets==1.1.1 PyYAML==5.4.1 pyzmq==19.0.1 qtconsole==5.1.0 QtPy==1.9.0 queuelib==1.5.0 regex==2020.7.14 requests==2.24.0 requests-oauthlib==1.3.0 requests-toolbelt==0.9.1 retrying==1.3.3 rise==5.7.1 rpy2==3.4.2 rsa==4.0 ruamel.yaml==0.17.4 ruamel.yaml.clib==0.2.2 scikit-learn==0.23.2 scipy==1.6.3 Scrapy==2.4.1 seaborn==0.11.0 selenium==3.141.0 Send2Trash==1.5.0 service-identity==18.1.0 Shapely==1.7.1 shellingham==1.4.0 sigfig==1.1.9 six==1.15.0 sklearn==0.0 smmap==3.0.4 sniffio==1.2.0 snooty-lextudio==1.9.1.dev0 snowballstemmer==2.0.0 sortedcontainers==2.3.0 soupsieve==2.0.1 Sphinx==3.4.1 sphinx-book-theme==0.1.0 sphinx-click==3.0.0 sphinx-comments==0.0.3 sphinx-copybutton==0.2.12 sphinx-external-toc==0.2.0 sphinx-inline-tabs==2020.10.19b4 sphinx-panels==0.5.2 sphinx-rtd-theme==0.5.0 sphinx-thebe==0.0.8 sphinx-thebelab==0.0.6 sphinx-togglebutton==0.2.2 sphinxcontrib-applehelp==1.0.2 sphinxcontrib-bibtex==2.2.1 sphinxcontrib-devhelp==1.0.2 sphinxcontrib-fulltoc==1.2.0 sphinxcontrib-htmlhelp==1.0.3 sphinxcontrib-jsmath==1.0.1 sphinxcontrib-qthelp==1.0.3 sphinxcontrib-serializinghtml==1.1.4 sphinxext-rediraffe==0.2.7 SQLAlchemy==1.3.18 sqlparse==0.4.1 sympy==1.8 tabulate==0.8.7 tangled-up-in-unicode==0.1.0 TatSu==5.5.0 tenacity==6.0.0 terminado==0.8.3 testpath==0.4.4 text-unidecode==1.3 threadpoolctl==2.1.0 toml==0.10.1 tomlkit==0.7.0 toolz==0.10.0 tornado==6.1 tqdm==4.48.2 traitlets==4.3.3 Twisted==21.2.0 typed-ast==1.4.1 typing-extensions==3.7.4.3 tzlocal==2.1 uc-micro-py==1.0.1 ujson==1.35 uncertainties==3.1.5 unyt==2.8.0 urllib3==1.24.3 vega-datasets==0.8.0 virtualenv==20.1.0 visions==0.7.1 w3lib==1.22.0 watchdog==1.0.2 wcwidth==0.2.5 webencodings==0.5.1 websockets==8.1 Werkzeug==1.0.1 widgetsnbextension==3.5.1 wrapt==1.12.1 xarray==0.16.0 xlrd==1.2.0 xlwt==1.3.0 yarl==1.5.1 zipp==3.1.0 zope.interface==5.2.0 ```
firasm commented 3 years ago

update: Protip: if you are getting the AttributeError issue, it went away after I restarted my Jupyter Lab session. If that's not in the instructions anywhere, let me know and I can make a PR to make that recommendation.

The other issue of no matches found on pip still persists.

sbrugman commented 3 years ago

Thanks for reporting!

The other issue will probably be solved by https://github.com/pandas-profiling/pandas-profiling/commit/aa1a563ab55743af4ad814d9ef4554fa0a557a72