I have to use a script written in Python 3 which requires paramiko.
I installed paramiko by doing:
pip install paramiko
and got:
Requirement already satisfied (use --upgrade to upgrade): paramiko in /usr/lib/python2.7/dist-packages Requirement already satisfied (use
--upgrade to upgrade): pycrypto>=2.1,!=2.4 in /usr/lib/python2.7/dist-packages (from paramiko) Cleaning up...
I tried executing import paramiko for Python and Python 3 and it did not work for Python 3, as given below:
Python:
Python 2.7.6 (default, Jun 22 2015, 17:58:13)
[GCC 4.8.2] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import paramiko
>>>
Python 3:
Python 3.4.3 (default, Oct 14 2015, 20:28:29)
[GCC 4.8.4] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import paramiko
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ImportError: No module named 'paramiko'
>>>
How can I make paramiko visible to 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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With