Skip to content
Sign upLog in
← Back to Community

Pandas library on Django

Profile icon
cldscchttnHacker

I need to use some functions of the Pandas library on Django. But when I try to import pandas

import pandas as pd

I receive the message

ModuleNotFoundError: No module named 'pandas'

In Python Repl, pandas library is imported

Answered by Vandesm14 [earned 5 cycles]
View Answer
Voters
Profile icon
cldscchttn
Comments
hotnewtop
Profile icon
Vandesm14

You need to add pandas to your requirements.txt (if the file doesn't exist, create it)

Profile icon
RomainCHAPPOZ

@Vandesm14
how can i create it automatically? I try with :
"""

install

pip3 install pipreqs

Run in current directory

python3 -m pipreqs.pipreqs .
"""
it doesn't work

Profile icon
RomainCHAPPOZ

@RomainCHAPPOZ
finaly i creat the file using avery thing here : https://stackoverflow.com/questions/31684375/automatically-create-requirements-txt
but pandas in Jango still doesn't work for me