hey guys i’m using pyscrit with pandas but i get the following message
JsException(PythonError: Traceback (most recent call last): File “/lib/python3.10/site-packages/_pyodide/_base.py”, line 429, in eval_code .run(globals, locals) File “/lib/python3.10/site-packages/_pyodide/_base.py”, line 300, in run coroutine = eval(self.code, globals, locals) File “”, line 1, in ModuleNotFoundError: No module named ‘pandas’ )
in my web site but the code i wrote in sublime not in using anaconda
Since you presented the detailed error code and source code, it was easy to understand the cause.
For details, please refer to the following URL, but it can be easily corrected.
hello sir @ktsh.tanaka.2020 i would tell you that i can use python normaly (what i tested yesterday’s print(‘hello’) i can see the result in my web site normaly without appering any error message also i tried this code
<py-script>
from datetime import datetime
now = datetime.now()
now.strftime("%d/%m/%Y, %H:%M:%S")
</py-script>
it’s working perfectly but why pandas it’s not working that’s what i want to know i saw some videos on youtube talking about pandas and using pyscript but no one get the same error message i has i hope i can find a solution cause i really need to connect my python script to my browzer
In pyscript, Pandas often doesn’t work because the numpy, pytz, and dateutil needed to run Pandas are often not imported.
I think this is because the current pyscript specification requires you to specify the required packages directly.
In other words, libraries that are located directly in the /lib/python3.9 directory instead of site-packages will be imported without doing anything, but in the case of other libraries, if they are not directly located. I don’t think it has been imported.
Especially in the case of numpy and scipy, not only python scripts but also libraries such as dll and lib.so are used.
In other words, pyscript is not a runtime engine, but an interface for launching Python on the base system.
If you have any requests for improvement in the future, we would appreciate it if you could contact us.