Installation check

Platform

Linux-6.2.6-060206-generic-x86_64-with-glibc2.35

Installation Method

pip install

pandas Version

1.5.3

Python Version

3.9.13.final.0

Installation Logs

Trying to upgrade to the latest pandas < 2 from 1.1. At some point between 1.1 and 1.5 optional dependencies were separated out, so for example openpyxl is not installed by default and you get complaints if you run code that tries to use it.

So I looked at the optional dependencies specified in pandas' pyproject.toml which lists "excel" on the most recent branch but that is not in the 1.5 branch. Is there some official way to install the required extras for the 1.5 branch or am I supposed to just manually add the dependencies to my local requirements file as I find the missing ones?

pip install pandas[excel]

WARNING: pandas 1.5.3 does not provide the extra 'excel'

>>> pd.show_versions() INSTALLED VERSIONS ------------------ commit : 2e218d10984e9919f0296931d92ea851c6a6faf5 python : 3.9.13.final.0 python-bits : 64 OS : Linux OS-release : 6.2.6-060206-generic Version : #202303130630 SMP PREEMPT_DYNAMIC Mon Mar 13 11:41:04 UTC 2023 machine : x86_64 processor : x86_64 byteorder : little LC_ALL : None LANG : en_US.UTF-8 LOCALE : en_US.UTF-8 pandas : 1.5.3 numpy : 1.24.2 pytz : 2022.7.1 dateutil : 2.8.2 setuptools : 58.1.0 pip : 23.0.1 Cython : None pytest : 7.1.2 hypothesis : None sphinx : None blosc : None feather : None xlsxwriter : None lxml.etree : 4.9.2 html5lib : None pymysql : 1.0.2 psycopg2 : 2.9.5 jinja2 : 3.0.3 IPython : None pandas_datareader: None bs4 : None bottleneck : None brotli : None fastparquet : None fsspec : None gcsfs : None matplotlib : None numba : None numexpr : None odfpy : None openpyxl : None pandas_gbq : None pyarrow : None pyreadstat : None pyxlsb : None s3fs : None scipy : None snappy : None sqlalchemy : 1.4.47 tables : None tabulate : 0.8.10 xarray : None xlrd : 1.2.0 xlwt : None zstandard : None tzdata : None

Comment From: mroeschke

pip extras are a new feature in 2.0: https://pandas.pydata.org/pandas-docs/version/2.0/whatsnew/v2.0.0.html#enhancements

So that install is only supported if you install the 2.0 release candidate (or wait a week until 2.0 is released)

Comment From: totalhack

So just to be clear/complete, in 1.5 the extra dependencies had been removed from the default with no shortcut to install them yet?

On Fri, Mar 24, 2023, 2:49 PM Matthew Roeschke @.***> wrote:

Closed #52172 https://github.com/pandas-dev/pandas/issues/52172 as completed.

— Reply to this email directly, view it on GitHub https://github.com/pandas-dev/pandas/issues/52172#event-8841826138, or unsubscribe https://github.com/notifications/unsubscribe-auth/AKNI2RC6BCV3K3UC2MKJQZTW5XUEHANCNFSM6AAAAAAWG4MRTU . You are receiving this because you authored the thread.Message ID: @.***>

Comment From: mroeschke

In 1.5 and earlier all optional dependencies needed to be installed manually one-by-one and did not support installing via pip extras.