Import pandas - No module named 'pandas'


It is my first time using trying to import pandas.

I’m getting the following error:

JsException(PythonError: Traceback (most recent call last): File “/lib/python3.10/site-packages/_pyodide/”, line 429, in eval_code .run(globals, locals) File “/lib/python3.10/site-packages/_pyodide/”, line 300, in run coroutine = eval(self.code, globals, locals) File “”, line 1, in ModuleNotFoundError: No module named ‘pandas’ )

and this is my html script:

		<link rel="stylesheet" href="" />
		<script defer src=""></script>
		- pandas
import pandas as pd

Any explanation to why I’m receiving such error?


What happens if you try running the folium example?

Dear Neil,

Thank you so much for the help you provided.
It is working now.
However, I’m facing an issue, which is that pandas not reading from my PC.

I executed the below lines:

import os

cwd = os.getcwd()
files = os.listdir(cwd) 
print("Files in %r: %s" % (cwd, files))

This is the output:

Files in ‘/home/pyodide’:

Which is not my PC.


/home/pyodide is the browser virtual file system. Applications (Python/JavaScript) running inside the browser cannot directly access a user’s local file system. Doing so would be a serious security problem. You must request file access using one of the browser APIs such as FileReader() or showOpenFilePicker(). These articles will help you: