0

I have installed pandas in cloud9 using pip, but it seems that I can't call this module when I run a function (using aws lambda) either locally or remotely.

when I confirm that the pandas is installed, by typing

pip show pandas

it returns

Name: pandas
Version: 0.24.2
Summary: Powerful data structures for data analysis, time series, and statistics
Home-page: http://pandas.pydata.org
Author: None
Author-email: None
License: BSD
Location: /home/ec2-user/.local/lib/python3.6/site-packages
Requires: python-dateutil, numpy, pytz
You are using pip version 9.0.3, however version 19.1.1 is available.
You should consider upgrading via the 'pip install --upgrade pip' command.

confirming that I do have pandas installed, but when I run the test function

import pandas as pd
def lambda_handler(event, context):
    return(pd.DataFrame([1,2,3]))

it returns

Function Logs
Unable to import module '(filename)/lambda_function': No module named 'pandas'

How is that possible there is no module although it seems to me I do have it?

John Rotenstein
  • 241,921
  • 22
  • 380
  • 470
HQMA
  • 125
  • 1
  • 8
  • Thank you Matrix Tai, seems my problem has been solved. – HQMA Jun 27 '19 at 07:28
  • can you please share how you installed pandas in cloud9 environment. I hope you installed it for python3.x version? – mnm Oct 02 '19 at 10:37

0 Answers0