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
Pip Install Unable to Find Ffi.H Even Though It Recognizes Libffi
How to List All Python Virtual Environments in Linux
Automatic Detection of Display Availability with Matplotlib
How to Convert .Pcm Files to .Wav Files (Scripting)
How to Properly Write to Fifos in Python
Asyncio in Corroutine Runtimeerror: No Running Event Loop
Get File Creation Time with Python on Linux
Cannot Get Environment Variables in Django Settings File
Redirecting Python's Stdout to the File Fails with Unicodeencodeerror
Syntax Error Near Unexpected Token '(' Python Script
Python3 Cgi Https Server Fails on Unix
Scrapy: Couldn't Bind: 24: Too Many Open Files
Detect User Logout/Shutdown in Python/Gtk Under Linux - Sigterm/Hup Not Received