Skip to content

BUG: Strange import issue when used inside Visual Studio Code #51739

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
3 tasks done
mapio opened this issue Mar 2, 2023 · 3 comments
Closed
3 tasks done

BUG: Strange import issue when used inside Visual Studio Code #51739

mapio opened this issue Mar 2, 2023 · 3 comments
Labels
Bug Needs Triage Issue that has not been reviewed by a pandas team member

Comments

@mapio
Copy link

mapio commented Mar 2, 2023

Pandas version checks

  • I have checked that this issue has not already been reported.

  • I have confirmed this bug exists on the latest version of pandas.

  • I have confirmed this bug exists on the main branch of pandas.

Reproducible Example

from pandas.io.formats.style import Styler

Issue Description

Raises ImportError: Pandas requires version '3.0.0' or newer of 'jinja2' (version '2.11.2' currently installed). but upon inspection Jinja2 installed version is 3.1.2!

Expected Behavior

No exception.

See also microsoft/vscode-jupyter#12981.

Installed Versions

INSTALLED VERSIONS

commit : 2e218d1
python : 3.10.6.final.0
python-bits : 64
OS : Linux
OS-release : 5.15.0-60-generic
Version : #66-Ubuntu SMP Fri Jan 20 14:29:49 UTC 2023
machine : x86_64
processor : x86_64
byteorder : little
LC_ALL : en_US.UTF-8
LANG : en_US.UTF-8
LOCALE : en_US.UTF-8

pandas : 1.5.3
numpy : 1.24.2
pytz : 2020.4
dateutil : 2.8.2
setuptools : 59.6.0
pip : 22.0.2
Cython : None
pytest : None
hypothesis : None
sphinx : None
blosc : None
feather : None
xlsxwriter : None
lxml.etree : None
html5lib : None
pymysql : None
psycopg2 : None
jinja2 : 2.11.2
IPython : 8.11.0
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 : None
tables : None
tabulate : None
xarray : None
xlrd : None
xlwt : None
zstandard : None
tzdata : None

Note that the same command executed inside the same virutalenv but outside the notebook reports the correct installed version that is 3.1.2.

@mapio mapio added Bug Needs Triage Issue that has not been reviewed by a pandas team member labels Mar 2, 2023
@MarcoGorelli
Copy link
Member

thanks for the report

Note that the same command executed inside the same virutalenv but outside the notebook reports the correct installed version that is 3.1.2.

sounds like an issue with vscode then, please report there - closing for now then

@mapio
Copy link
Author

mapio commented Mar 2, 2023

It actually seems so, I reported it also here because someone experiencing the same problem can be tempted to look in Pandas issues (not having the idea to test the thing outside of the editor). It was just a way to put a pointer to the issue I already reported on the editor bug tracker.

@rama24dec
Copy link

I have hit same issue today while running via self hosted runner.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Needs Triage Issue that has not been reviewed by a pandas team member
Projects
None yet
Development

No branches or pull requests

3 participants