VS code 下使用 python 拓展, 通常会提示安装 pip.
pip 是一个现代的, 通用的 Python 包管理工具. 提供了对 Python 包的查找, 下载, 安装, 卸载的功能.
安装 pip
使用以下脚本:
- wget https://bootstrap.pypa.io/get-pip.py
- sudo python get-pip.py
- pip -V #查看 pip 版本
另: 如果出现 VS code 中出现 Linter pylint is not installed, 点击 install 后仍出现 There is no Pip installer available in the selected environment. 提示框:
以 Ubuntu18.04 为例, 自带 Python 2.7.15+, 在有 python3 前提下 (若无 python3 需手动安装), 还需要安装 python3 相关 pip 包, 使用以下命令:
sudo apt install python3-pip
解决方案参考:
- https://www.tecmint.com/install-pip-in-linux/
- https://www.jianshu.com/p/efc1c2752b4d
来源: http://www.bubuko.com/infodetail-3224382.html