Search code examples
volttron

Error Importing Pandas in Volttron Platform


I have created a Volttron agent and trying to use pandas library.

But I am getting error of pandas not being installed, while its there.

Pandas installed in Volttron

ERROR:volttron.platform.packaging:b'Traceback (most recent call last):\n  File "setup.py", line 11, in <module>
    _temp = __import__(agent_module, globals(), locals(), [\'__version__\'], 0)
    File "/tmp/tmpd_5srlls/pkg/weather/agent.py", line 12, in <module>
    import pandas as pd
    File "/home/pi/volttron/env/lib/python3.7/site-packages/pandas/__init__.py", line 17, in <module>
    "Unable to import required dependencies:\\n" + "\\n".join(missing_dependencies)
    ImportError: Unable to import required dependencies:\nnumpy: 
    
    IMPORTANT: PLEASE READ THIS FOR ADVICE ON HOW TO SOLVE THIS ISSUE!
    Importing the numpy C-extensions failed. This error can happen for many reasons, often due to issues with your setup or how NumPy was\ninstalled.\n\nWe have compiled some common reasons and troubleshooting tips at:
    https://numpy.org/devdocs/user/troubleshooting-importerror.html\n\nPlease note and check the following:\n\n  * The Python version is: Python3.7 from "/home/pi/volttron/env/bin/python"
    * The NumPy version is: "1.19.5"\n\nand make sure that they are the versions you expect.\nPlease carefully study the documentation linked above for further help.Original error was: libf77blas.so.3: cannot open shared object file: No such file or directory\n\n'

Traceback (most recent call last):
  File "scripts/install-agent.py", line 340, in <module>
    if not os.path.isfile(opts.package):
  File "/usr/lib/python3.7/genericpath.py", line 30, in isfile
    st = os.stat(path)
TypeError: stat: path should be string, bytes, os.PathLike or integer, not NoneType

Solution

  • The shared library cannot be located. Please try:

    sudo apt-get install libatlas-base-dev