Python Forum
Module not found error even though installed - Printable Version

+- Python Forum (https://python-forum.io)
+-- Forum: Python Coding (https://python-forum.io/forum-7.html)
+--- Forum: General Coding Help (https://python-forum.io/forum-8.html)
+--- Thread: Module not found error even though installed (/thread-42435.html)



Module not found error even though installed - NZGeorge - Jul-10-2024

I want to use paramiko for SFTP transfers on a Windows PC. Have installed it. By running command "pip list" tells me that paramiko 3.4.0 is installed.

first lines in python program are

import os
import fnmatch
import time
import shutil
import configparser
import paramiko

.... rest of code here
When run I get the error

Error:
File "C:\Apps\SFTP Code\SFtpFiles.py", line 9, in <module> import paramiko ModuleNotFoundError: No module named 'paramiko'
Any ideas why?

Regards

George


RE: Module not found error even though installed - Larz60+ - Jul-10-2024

Are you using a virtual environment?
if so, activate the environment, and then pip list

If paramiko is not present, reinstall pip install paramiko while virtual environment active.

If this is not the case, check both pip and python versions with:
python -V and pip -V
if they are paired, pip list

If the package is present, you should be good to go.
If not, reinstall as you most likely have two versions of python installed, and package is not in version (of python) being used,