-
-
Notifications
You must be signed in to change notification settings - Fork 18.8k
Description
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
# Code
import pandas as pd
df = pd.DataFrame({"Name":["Braund"]})
Issue Description
Venv
The venv is owned by root:root with 755 permissions.
Pandas version 2.3.1 (but also happens with 2.2.3)
Command
/opt/.venv/bin/python /home/user.name/python_scripts/sketches.py
Traceback Message
Traceback (most recent call last):
File "/home/user.name/python_scripts/sketches.py", line 7, in
df = pandas.DataFrame(
AttributeError: module 'pandas' has no attribute 'DataFrame'
Note: In fact, regardless of the method used, it seems to always output the same error message. I have used <user.name> to work with other packages in the same environment without any problem. However, if I use root user, then all the scripts I've tried with pandas work as expected.
Expected Behavior
No error message, and creation of a data frame.
Installed Versions
-> Replace this line with the output of pd.show_versions()
Using root privileges,
INSTALLED VERSIONS
commit : c888af6
python : 3.10.12
python-bits : 64
OS : Linux
OS-release : 5.15.0-142-generic
Version : #152-Ubuntu SMP Mon May 19 10:54:31 UTC 2025
machine : x86_64
processor : x86_64
byteorder : little
LC_ALL : None
LANG : en_US.UTF-8
LOCALE : en_US.UTF-8
pandas : 2.3.1
numpy : 1.26.4
pytz : 2025.2
dateutil : 2.9.0.post0
pip : 22.0.2
Cython : None
sphinx : 8.1.3
IPython : 8.35.0
adbc-driver-postgresql: None
adbc-driver-sqlite : None
bs4 : 4.13.3
blosc : None
bottleneck : None
dataframe-api-compat : None
fastparquet : None
fsspec : 2025.3.2
html5lib : None
hypothesis : None
gcsfs : None
jinja2 : 3.1.6
lxml.etree : 5.3.2
matplotlib : 3.10.1
numba : 0.61.2
numexpr : None
odfpy : None
openpyxl : 3.1.5
pandas_gbq : None
psycopg2 : None
pymysql : None
pyarrow : 19.0.1
pyreadstat : None
pytest : 8.3.5
python-calamine : None
pyxlsb : None
s3fs : None
scipy : 1.13.1
sqlalchemy : 2.0.40
tables : None
tabulate : None
xarray : None
xlrd : None
xlsxwriter : None
zstandard : None
tzdata : 2025.2
qtpy : None
pyqt5 : None