python - 如何在 ubuntu 16.04 LTS 中安装 pip3 和 paramiko?

标签 python python-3.x ubuntu pip paramiko

我正在尝试安装 python paramiko使用以下命令:

pip3 install paramiko

然后我得到一个错误:
The program 'pip3' is currently not installed. You can install it by typing:
sudo apt install python3-pip

然后尝试安装pip使用上面的命令,结果是:

Reading package lists... Done Building dependency tree
Reading state information... Done python3-pip is already the newest version (8.1.1-2ubuntu0.4). The following packages were automatically installed and are no longer required: python3-babel python3-dateutil python3-decorator python3-funcsigs python3-gevent python3-greenlet python3-html2text python3-mock python3-ofxparse python3-passlib python3-pbr python3-psutil python3-psycopg2 python3-pydot python3-pyinotify python3-pypdf2 python3-serial python3-stdnum python3-tz python3-usb python3-vatnumber python3-werkzeug python3-yaml Use 'sudo apt autoremove' to remove them. 0 upgraded, 0 newly installed, 0 to remove and 82 not upgraded.



然后我尝试安装paramiko再次出现同样的错误,pip没有安装。

当我输入 pip3 --version输出是:
The program 'pip3' is currently not installed. You can install it by typing:
sudo apt install python3-pip


pip --version

输出是:
 pip 10.0.1 from /usr/local/lib/python2.7/dist-packages/pip (python 2.7)

我该如何解决这个问题?

最佳答案

对于 python 3 上的 pip,您必须输入以下命令:
sudo apt install python3-pip
希望这可以帮助

关于python - 如何在 ubuntu 16.04 LTS 中安装 pip3 和 paramiko?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/50563984/

相关文章:

python - 无法导入模块 'lambda_function' : cannot import name 'WinDLL' from 'ctypes' (/var/lang/lib/python3. 7/ctypes/__init__.py

c++ - VSCode C++ c_cpp_properties.json "defines"没有在ubuntu上定义符号

php - 授予执行 .c 文件的权限

python - 正则表达式避免不必要的组

python - Python 中成对相关的优化计算

python - Pygame 加载图像

apache - Magento2 安装后的 ERR_TOO_MANY_REDIRECTS 问题,可能是 Ubuntu 虚拟主机问题

python - 为什么我的 launch.json 上会出现 “Property pythonPath is not allowed”?

python - 正则表达式匹配相同分隔符之间的多个结果

python-3.x - argparse - 不带前缀的可选参数