• Re: ModuleNotFoundError: No module named 'Paramiko'

    From Sravan Kumar Chitikesi@21:1/5 to python-list@python.org on Mon Apr 8 23:12:55 2024
    pip may be pointed to another python version. try to remove other python versions and re install pip

    Regards,
    *Sravan Chitikesi*
    AWS Solutions Architect - Associate


    On Mon, Apr 8, 2024 at 10:58 PM Wenyong Wei via Python-list < python-list@python.org> wrote:


    Dear Sir/Madam,

    Recently I encounter a problem that I can't import paramiko in my
    computer. My PC running on window 10 64 bits. I have investigate this issue via internet, there are a lot of solutions for this issue, after trying
    most of the steps, I still can't run this module, the major steps I have
    try are:


    1.
    Install python ver 3.7.1 or 3.11.8 by itself or customer installation (changing the installation folder) and check add python to the path.
    2.
    pip install paramiko, if ver 3.7.1 installed, need to upgrade the pip version.
    3.
    Checking the environment path, there are two path related to the python,
    one for python.exe, the other for \Lib\site-packages\paramiko

    can you please provide advice on this issue?



    BR

    Ken
    --
    https://mail.python.org/mailman/listinfo/python-list


    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Wenyong Wei@21:1/5 to All on Mon Apr 8 01:31:57 2024
    Dear Sir/Madam,

    Recently I encounter a problem that I can't import paramiko in my computer. My PC running on window 10 64 bits. I have investigate this issue via internet, there are a lot of solutions for this issue, after trying most of the steps, I still can't run
    this module, the major steps I have try are:


    1.
    Install python ver 3.7.1 or 3.11.8 by itself or customer installation (changing the installation folder) and check add python to the path.
    2.
    pip install paramiko, if ver 3.7.1 installed, need to upgrade the pip version.
    3.
    Checking the environment path, there are two path related to the python, one for python.exe, the other for \Lib\site-packages\paramiko

    can you please provide advice on this issue?



    BR

    Ken

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Dietmar Schwertberger@21:1/5 to All on Mon Apr 8 20:01:08 2024
    To be sure, you can always go the the directory of the Python
    interpreter and open a cmd window there.
    (By entering 'cmd' into the explorer address bar.)
    Then enter 'python.exe -mpip install paramiko'.
    This way you can be sure that you're not running a pip.exe that belongs
    to another Python interpreter.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Thomas Passin@21:1/5 to Dietmar Schwertberger via Python-li on Mon Apr 8 14:31:29 2024
    On 4/8/2024 2:01 PM, Dietmar Schwertberger via Python-list wrote:
    To be sure, you can always go the the directory of the Python
    interpreter and open a cmd window there.
    (By entering 'cmd' into the explorer address bar.)
    Then enter 'python.exe -mpip install paramiko'.
    This way you can be sure that you're not running a pip.exe that belongs
    to another Python interpreter.

    This is not quite right. The best name of the Python executable may or
    may not be "python.exe". The command line needs a space after the "-m":

    <python executable> -m pip install <package>

    For <python executable>, you can check if "python" runs the intended
    version by using the -V option (must be capitalized):

    python -V

    On Windows, Python from python.org usually installs a launcher named
    "py", which will run the last version installed:

    py -m pip install ...

    Or it can run a specific version, e.g.:

    py -3.7 -m pip install ...

    This will run Python 3.7 if installed.

    On Linux, you can run the desired version with, e.g.,

    python3.7 -m pip ...

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Thomas Passin@21:1/5 to Keith Thompson via Python-list on Mon Apr 8 18:35:41 2024
    On 4/8/2024 3:35 PM, Keith Thompson via Python-list wrote:
    Thomas Passin <list1@tompassin.net> writes:
    On 4/8/2024 2:01 PM, Dietmar Schwertberger via Python-list wrote:
    To be sure, you can always go the the directory of the Python
    interpreter and open a cmd window there.
    (By entering 'cmd' into the explorer address bar.)
    Then enter 'python.exe -mpip install paramiko'.
    This way you can be sure that you're not running a pip.exe that
    belongs to another Python interpreter.

    This is not quite right. The best name of the Python executable may or
    may not be "python.exe". The command line needs a space after the
    "-m":

    No, the option and its argument can be bundled. "-mpip" is equivalent
    to "-m pip". (The space might make it clearer for human readers.)

    Oh, surprise, thanks for the correction. My apologies to Dietmar. I'd
    stick with the space, though, because it's often required by other
    programs. No sense developing a conflicting habit...

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Mats Wichmann@21:1/5 to Wenyong Wei via Python-list on Tue Apr 9 07:50:12 2024
    On 4/7/24 19:31, Wenyong Wei via Python-list wrote:

    Dear Sir/Madam,

    Recently I encounter a problem that I can't import paramiko in my computer. My PC running on window 10 64 bits. I have investigate this issue via internet, there are a lot of solutions for this issue, after trying most of the steps, I still can't run
    this module, the major steps I have try are:


    1.
    Install python ver 3.7.1 or 3.11.8 by itself or customer installation (changing the installation folder) and check add python to the path.
    2.
    pip install paramiko, if ver 3.7.1 installed, need to upgrade the pip version.
    3.
    Checking the environment path, there are two path related to the python, one for python.exe, the other for \Lib\site-packages\paramiko

    can you please provide advice on this issue?

    Going to be more explicit than the other answers:

    ===
    If an attempted import gives you ModuleNotFound, that *always* means the package is not installed... not at all, or just not in the paths that
    copy of Python is looking in.
    ===

    The problem arises in part because most package installation
    instructions take the simplest approach and just tell you to (for example)

    pip install paramiko

    So it's installed. But where did it go? You can check where it went:

    pip show paramiko

    That path ("location") needs to be one where your Python interpreter is looking.

    If all goes well, "pip" and "python" are perfectly matched, but in the
    current world, there are often several Python interpreters installed
    (projects may require a specific version, an IDE may grab its own
    version, something may create and setup a virtualenv, alternate worlds
    like Conda may set up a Python, the list goes on), and for any given installation on Windows, python.exe and the pip excutable pip.exe go in different directories anyway, and the Windows PATH doesn't always
    include both, and you easily get mismatches.

    As others have said, the way to avoid mismatches is to use pip As A
    Module, specifically a module of the Python you want to use. So if
    you're using the Python Launcher, that looks like:

    py -m pip install paramiko

    Hope this helps.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Wenyong Wei@21:1/5 to All on Tue Apr 9 23:36:03 2024
    aGkgU3JhdmFuLA0KDQpUaGFua3MgZm9yIHlvdXIgcmVzcG9uc2UsIGNoZWNrZWQgYW5kIGZvdW5k IHRoZXJlIGlzIG9ubHkgb25lIHB5dGhvbiBpbiBteSBQQy4NCg0KDQoNCl9fX19fX19fX19fX19f X19fX19fX19fX19fX19fX19fDQpGcm9tOiBTcmF2YW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