ImportError: No module named 'paramiko'

I did through other questions online here and I feel like my other is to guarantee a new question.

So, I have a Centos 6 box that runs a small website for me, acts as an office git server, and I'm trying to configure Python3 on it.

So, I followed these steps to configure Python3 on the server. However, it seems that I cannot import paramiko into my script.

I downloaded paramiko rpm, but I got this message:

When I try to import paramiko, I get:

 [ root@GIT Python-3.4.2]# rpm -ivh /usr/lib/Python-3.4.2/Modules/python-paramiko-1.7.5-2.1.el6.noarch.rpm Preparing... ########################################### [100%] package python-paramiko-1.7.5-2.1.el6.noarch is already installed 

When I run python3 directly:

 [ root@GIT inserv_health_check]# python3 Python 3.4.2 (default, Jan 21 2015, 06:28:04) [GCC 4.4.7 20120313 (Red Hat 4.4.7-11)] 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' >>> 

I am sure there is a simple solution to this problem, maybe the path is wrong, or I should have placed a symbolic link somewhere. Any help would be appreciated :)

Before anyone asks what python output is:

 [ root@GIT Python-3.4.2]# which python /usr/bin/python [ root@GIT Python-3.4.2]# which pytho~n3 /usr/bin/which: no pytho~n3 in (/usr/lib64/qt-3.3/bin:/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/root/bin) [ root@GIT Python-3.4.2]# which python3 /usr/local/bin/python3 

thanks

+6
source share
1 answer

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

+6
source

Source: https://habr.com/ru/post/981612/


All Articles