ModuleNotFoundError: no module named ‘pandas’

"ModuleNotFoundError: no module named ‘pandas’ ", but I am importing pandas, could you please check, here is link:

Try opening the Shell tab and running:

poetry add pandas

If that fails, try:

pip install pandas

Strange (I tried FP’s answer on a fork). I ran the repl, got ModuleNotFoundError: No module named 'pandas'.

Ran poetry add pandas and got this:

The following packages are already present in the pyproject.toml and will be skipped:

  • pandas

If you want to update it to the latest compatible version, you can use `poetry update package`.
If you prefer to upgrade it to the latest available version, you can use `poetry add package@latest`.

Nothing to add.

I still got the error, though.

pip seemed to do something, I didn’t get the initial error but got

Traceback (most recent call last):
  File "", line 6, in <module>
  File "/home/runner/plip/", line 6, in calculate_demographic_data
    df = pd.DataFrame('')
  File "/home/runner/plip/venv/lib/python3.10/site-packages/pandas/core/", line 817, in __init__
    raise ValueError("DataFrame constructor not properly called!")
ValueError: DataFrame constructor not properly called!

which could be related to the program.

1 Like

Is there an update to this? I’m getting module not found error too.

poetry update package or pip install pandas or poetry add pandas doesn’t work?

If poetry add pandas says it’s already there, run poetry install.

1 Like

Worked now after logging out and logging in again, then deleting a couple of forks first (because I read in th forums that this solution worked – but it didn’t).
Now I’m encountering “TypeErrors index should be int or slice not str” in test_…py lines that have [•••] Edited my outputs by forcing them into lists, but no luck. Can’t seem to edit the which came with the fork. I don’t understand most of test_…py. Will post in a different thread, if I can’t make it work. Strange puzzle:)
Anyway, thanks for responding!!!

Soo… logging out then in helped?

Yes, plus deleting the other duplicate forks, which I did based on some solutions in the forum. I did both consecutively so I don’t know which action solved it.

Mark that as the solution then.


Can’t, because they aren’t OP.


Qwertyqwerty88 said I can’t mark that as the soluion. Thanks anyway.

1 Like

This topic was automatically closed after 4 days. New replies are no longer allowed.