Paramiko Module Not Found

ImportError: No module named 'paramiko'

You need to do pip install paramiko so that python sees that module. If you work on a virtual environment, you need to workon <env_name> first and then pip install the desired module.

Paramiko module not found

Issue was with pip. The pip and pip3 I had installed in the same path, /usr/lib/python3/dist-packages. I installed a pip specifically for python 2.7. Using this. Now pip installs for python and pip3 for python3.

Paramiko not recognised by Python 3

As you can see from the path pip shows:

/usr/lib/python2.7/

You have paramiko isntalled in Python 2.7 and not 3.

Use pip3(python installer for 3.x version) with pip3 install paramiko (using sudo if necessary) or python3 -m pip install paramiko to get the version of pip which installs to the directory for Python 3.

AWS Lambda function can't import paramiko - Unable to import module 'lambda_function': No module named

Lambda unzips layers to /opt.

The Python path contains /opt/python.

You therefore need to sure that your directory structure inside your zip layer should include a top-level python directory and the libraries should all be in that python directory.

Why am I getting : Unable to import module 'handler': No module named 'paramiko'?

A comprehensive guide tutorial exists at :

https://serverless.com/blog/serverless-python-packaging/

Using the serverless-python-requirements package
as serverless node plugin.

Creating a virtual env and Docker Deamon will be required to packup your serverless project before deploying on AWS lambda



Related Topics



Leave a reply



Submit