1

My OS is win 10 Home. I have a Python 3.6 script that updates an MSSql DB, using pymssql. The script works fine locally. Now I need to upload it as aws lambda, so I followed this using the cmd:

python -m venv .
Scripts\activate
pip install pymssql

Then I copied my py function to the Lib\site-packages dir, ziped all the dir content and uploaded it to the Lambda service.

The result was this error:

Unable to import module 'validationLambda': No module named 'pymssql'

How to fix this?

asked Jun 30, 2019 at 11:21
1
  • What is your functions handler method? Commented Jun 30, 2019 at 13:42

2 Answers 2

1

I am not strong with Windows environments but you should probably try to do the opposite. Copy the Lib\site-packages\pymssql directory to the root of your package (same level with your_function.py

answered Jun 30, 2019 at 20:51
Sign up to request clarification or add additional context in comments.

Comments

0

Try to import cython along with pymssql.

answered Nov 29, 2021 at 15:32

Comments

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.