Hello to the freeCodeCamp community!
In the following project: Data Analysis with Python Projects - Demographic Data Analyzer
I get the error ModuleNotFoundError: No module named ‘pandas’. So I “pip install pandas”, no more error on this, but minutes later, I once again get the same error, as if I had uninstalled pandas!!
Hi @Brice1. After googling the error message a bit, I came across this question on Stackoverflow which recommends running the following commands in succession. It appears to fix the error when I tried. You can try it as well. Hopefully it will work.
Repl.it uses poetry as its package/environment manager for python and typically it just works when you run the project, but for some reason it didn’t when I just tried it. I didn’t see anything obviously wrong with your files and I ran poetry update (this is the poetry command to update/install required packages) in the repl.it console and it installed numpy and pandas. I was able to run your project at that point. I’m not sure why the poetry update part is not automatically running, but you can run it manually and everything works.
Just in case anybody is still struggling with this issue, I found out that the reason I was getting this error was because I had forgotten to fork the project, as the instructions said. Once I did it, it worked perfectly. So it might be something worth checking out.