Module Import error(Python package)

i get this error always which ever python library i use.
{
“errorMessage”: “Unable to import module ‘handler’: No module named ‘sklearn’”,
“errorType”: “Runtime.ImportModuleError”
}

Error --------------------------------------------------

Error: Invoked function failed
at AwsInvoke.log (/usr/local/lib/node_modules/serverless/lib/plugins/aws/invoke/index.js:105:31)
at AwsInvoke.tryCatcher (/usr/local/lib/node_modules/serverless/node_modules/bluebird/js/release/util.js:16:23)
at Promise._settlePromiseFromHandler (/usr/local/lib/node_modules/serverless/node_modules/bluebird/js/release/promise.js:547:31)
at Promise._settlePromise (/usr/local/lib/node_modules/serverless/node_modules/bluebird/js/release/promise.js:604:18)
at Promise._settlePromise0 (/usr/local/lib/node_modules/serverless/node_modules/bluebird/js/release/promise.js:649:10)
at Promise._settlePromises (/usr/local/lib/node_modules/serverless/node_modules/bluebird/js/release/promise.js:729:18)
at _drainQueueStep (/usr/local/lib/node_modules/serverless/node_modules/bluebird/js/release/async.js:93:12)
at _drainQueue (/usr/local/lib/node_modules/serverless/node_modules/bluebird/js/release/async.js:86:9)
at Async._drainQueues (/usr/local/lib/node_modules/serverless/node_modules/bluebird/js/release/async.js:102:5)
at Immediate.Async.drainQueues [as _onImmediate] (/usr/local/lib/node_modules/serverless/node_modules/bluebird/js/release/async.js:15:14)
at processImmediate (internal/timers.js:445:21)
at process.topLevelDomainCallback (domain.js:135:15)

 For debugging logs, run again after setting the "SLS_DEBUG=*" environment variable.

Your Environment Information ---------------------------
Operating System: darwin
Node Version: 13.5.0
Framework Version: 1.60.5
Plugin Version: 3.2.7
SDK Version: 2.2.1
Components Core Version: 1.1.2
Components CLI Version: 1.4.0

My S3 bucket contains the files.
Predict-price(zip folder uploaded in S3 and contains following files)

  • sklearn
  • scipy
  • numpy
  • joblib
  • bin
  • requirements.txt
  • package.json
  • package-lock.json
  • model_predict_visit
  • handler.py
  • event.json

i am missing any files that should be uploaded.
sls invoke --function predict-price --path event.json (this is how invoke)

Did you ever figure it out?

The “ModuleNotFoundError: No module named ‘sklearn’” error occurs in Python when you try to import the ‘sklearn’ module, which is part of the scikit-learn library, but Python cannot find it in your current environment. To fix this, you need to install scikit-learn using a package manager like pip. Open your terminal or command prompt and run the following command: pip install scikit-learn. This will download and install the scikit-learn library, allowing you to import and use it in your Python scripts. Make sure you have a working Python environment set up and that pip is properly configured to install packages.