汇总系列:https://www.cnblogs.com/dunitian/p/4822808.html#ai

CentOS安装Python3.7:https://www.cnblogs.com/dotnetcrazy/p/9360831.html

Update

2018-08-08:pip install [--user] rope :让Python对象支持批量重命名(eg:Ctrl+R+R)

独立安装python3的:

用户设置里面添加一下python3的路径即可

附录:

如果先安装Anaconda,再通过anaconda安装VSCode则不用管环境配置(会配置好),如果先安装vscode就自己配置下环境吧:

如果没配置你自己配置一下,以Linux来说:(先查看路径,再配置

扩充(配置规范提示格式化):

命令参考:pip install [--user] xxx

规范化提示:pycodestyle or flake8(旧名字)

代码格式化:yapf or autopep8

VSCode配置参考:(Conda默认安装了pycodestyle

附录:安装本地开发环境Python3.7

sudo apt-get install python3.7

sudo apt-get install python3.7-dbg

curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py

sudo python3.7 get-pip.py

sudo pip3.7 install pycodestyle
sudo pip3.7 install yapf

VSCode配置文件:

// 设置Python的路径
"python.pythonPath": "python3.7",
// "python.pythonPath": "/home/dnt/anaconda3/bin/python",
// 设置Python的代码格式化
"python.formatting.provider": "yapf",
// 设置Python的代码检查
"python.linting.flake8Path": "pycodestyle",
"python.linting.flake8Enabled": true,

sudo apt-get install python3.7
正在读取软件包列表... 完成
正在分析软件包的依赖关系树
正在读取状态信息... 完成
将会同时安装下列软件:
libpython3.7-minimal libpython3.7-stdlib python3.7-minimal
建议安装:
python3.7-venv python3.7-doc
下列【新】软件包将被安装:
libpython3.7-minimal libpython3.7-stdlib python3.7 python3.7-minimal
升级了 0 个软件包,新安装了 4 个软件包,要卸载 0 个软件包,有 0 个软件包未被升级。
需要下载 4,011 kB 的归档。
解压缩后会消耗 22.8 MB 的额外空间。
您希望继续执行吗? [Y/n] y
获取:1 http://mirrors.ustc.edu.cn/ubuntu bionic/universe amd64 libpython3.7-minimal amd64 3.7.0~b3-1 [544 kB]
获取:2 http://mirrors.ustc.edu.cn/ubuntu bionic/universe amd64 python3.7-minimal amd64 3.7.0~b3-1 [1,563 kB]
获取:3 http://mirrors.ustc.edu.cn/ubuntu bionic/universe amd64 libpython3.7-stdlib amd64 3.7.0~b3-1 [1,685 kB]
获取:4 http://mirrors.ustc.edu.cn/ubuntu bionic/universe amd64 python3.7 amd64 3.7.0~b3-1 [219 kB]
已下载 4,011 kB,耗时 6秒 (691 kB/s)
正在选中未选择的软件包 libpython3.7-minimal:amd64。
(正在读取数据库 ... 系统当前共安装有 205966 个文件和目录。)
正准备解包 .../libpython3.7-minimal_3.7.0~b3-1_amd64.deb ...
正在解包 libpython3.7-minimal:amd64 (3.7.0~b3-1) ...
正在选中未选择的软件包 python3.7-minimal。
正准备解包 .../python3.7-minimal_3.7.0~b3-1_amd64.deb ...
正在解包 python3.7-minimal (3.7.0~b3-1) ...
正在选中未选择的软件包 libpython3.7-stdlib:amd64。
正准备解包 .../libpython3.7-stdlib_3.7.0~b3-1_amd64.deb ...
正在解包 libpython3.7-stdlib:amd64 (3.7.0~b3-1) ...
正在选中未选择的软件包 python3.7。
正准备解包 .../python3.7_3.7.0~b3-1_amd64.deb ...
正在解包 python3.7 (3.7.0~b3-1) ...
正在处理用于 mime-support (3.60ubuntu1) 的触发器 ...
正在处理用于 desktop-file-utils (0.23-1ubuntu3.18.04.1) 的触发器 ...
正在设置 libpython3.7-minimal:amd64 (3.7.0~b3-1) ...
正在设置 python3.7-minimal (3.7.0~b3-1) ...
正在处理用于 bamfdaemon (0.5.3+18.04.20180207.2-0ubuntu1) 的触发器 ...
Rebuilding /usr/share/applications/bamf-2.index...
正在处理用于 man-db (2.8.3-2) 的触发器 ...
正在处理用于 gnome-menus (3.13.3-11ubuntu1) 的触发器 ...
正在设置 libpython3.7-stdlib:amd64 (3.7.0~b3-1) ...
正在设置 python3.7 (3.7.0~b3-1) ...


sudo apt-get install python3.7-dbg

正在读取软件包列表... 完成
正在分析软件包的依赖关系树
正在读取状态信息... 完成
将会同时安装下列软件:
libpython3.7-dbg
建议安装:
python3-gdbm-dbg python3-tk-dbg
下列【新】软件包将被安装:
libpython3.7-dbg python3.7-dbg
升级了 0 个软件包,新安装了 2 个软件包,要卸载 0 个软件包,有 0 个软件包未被升级。
需要下载 25.1 MB 的归档。
解压缩后会消耗 86.1 MB 的额外空间。
您希望继续执行吗? [Y/n] y
获取:1 http://mirrors.ustc.edu.cn/ubuntu bionic/universe amd64 libpython3.7-dbg amd64 3.7.0~b3-1 [10.9 MB]
获取:1 http://mirrors.ustc.edu.cn/ubuntu bionic/universe amd64 libpython3.7-dbg amd64 3.7.0~b3-1 [10.9 MB]
获取:2 http://mirrors.ustc.edu.cn/ubuntu bionic/universe amd64 python3.7-dbg amd64 3.7.0~b3-1 [14.2 MB]
已下载 23.4 MB,耗时 1分 55秒 (203 kB/s)
正在选中未选择的软件包 libpython3.7-dbg:amd64。
(正在读取数据库 ... 系统当前共安装有 206572 个文件和目录。)
正准备解包 .../libpython3.7-dbg_3.7.0~b3-1_amd64.deb ...
正在解包 libpython3.7-dbg:amd64 (3.7.0~b3-1) ...
正在选中未选择的软件包 python3.7-dbg。
正准备解包 .../python3.7-dbg_3.7.0~b3-1_amd64.deb ...
正在解包 python3.7-dbg (3.7.0~b3-1) ...
正在设置 libpython3.7-dbg:amd64 (3.7.0~b3-1) ...
正在处理用于 libc-bin (2.27-3ubuntu1) 的触发器 ...
正在设置 python3.7-dbg (3.7.0~b3-1) ...
正在处理用于 man-db (2.8.3-2) 的触发器 ...


安装pip:https://bootstrap.pypa.io/get-pip.py

sudo python3.7 get-pip.py
[sudo] dnt 的密码:
The directory '/home/dnt/.cache/pip/http' or its parent directory is not owned by the current user and the cache has been disabled. Please check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag.
The directory '/home/dnt/.cache/pip' or its parent directory is not owned by the current user and caching wheels has been disabled. check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag.
Collecting pip
Downloading https://files.pythonhosted.org/packages/5f/25/e52d3f31441505a5f3af41213346e5b6c221c9e086a166f3703d2ddaf940/pip-18.0-py2.py3-none-any.whl (1.3MB)
100% |████████████████████████████████| 1.3MB 1.7MB/s
Collecting wheel
Downloading https://files.pythonhosted.org/packages/81/30/e935244ca6165187ae8be876b6316ae201b71485538ffac1d718843025a9/wheel-0.31.1-py2.py3-none-any.whl (41kB)
100% |████████████████████████████████| 51kB 1.0MB/s
Installing collected packages: pip, wheel
Successfully installed pip-18.0 wheel-0.31.1
dnt@MZY-PC:~/下载$ pip
pip pip3 pip3.7
dnt@MZY-PC:~/下载$ pip3.7 -V
pip 18.0 from /usr/local/lib/python3.7/dist-packages/pip (python 3.7)


sudo pip3.7 install pycodestyle
The directory '/home/dnt/.cache/pip/http' or its parent directory is not owned by the current user and the cache has been disabled. Please check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag.
The directory '/home/dnt/.cache/pip' or its parent directory is not owned by the current user and caching wheels has been disabled. check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag.
Collecting pycodestyle
Downloading https://files.pythonhosted.org/packages/e5/c6/ce130213489969aa58610042dff1d908c25c731c9575af6935c2dfad03aa/pycodestyle-2.4.0-py2.py3-none-any.whl (62kB)
100% |████████████████████████████████| 71kB 144kB/s
Installing collected packages: pycodestyle
Successfully installed pycodestyle-2.4.0


sudo pip3.7 install yapf

The directory '/home/dnt/.cache/pip/http' or its parent directory is not owned by the current user and the cache has been disabled. Please check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag.
The directory '/home/dnt/.cache/pip' or its parent directory is not owned by the current user and caching wheels has been disabled. check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag.
Collecting yapf
Downloading https://files.pythonhosted.org/packages/d5/ae/9d2e8f43f2ce467991c8310e361bbf4f1e1bf32afc6441b4e3416685b7ef/yapf-0.22.0-py2.py3-none-any.whl (166kB)
100% |████████████████████████████████| 174kB 495kB/s
Installing collected packages: yapf
Successfully installed yapf-0.22.0


可选安装:apt-get install python3.7-*

正在读取软件包列表... 完成
正在分析软件包的依赖关系树
正在读取状态信息... 完成
注意,根据Glob 'python3.7-*' 选中了 'python3.7-2to3'
注意,根据Glob 'python3.7-*' 选中了 'python3.7-tk'
注意,根据Glob 'python3.7-*' 选中了 'python3.7-venv'
注意,根据Glob 'python3.7-*' 选中了 'python3.7-distutils'
注意,根据Glob 'python3.7-*' 选中了 'python3.7-dbg'
注意,根据Glob 'python3.7-*' 选中了 'python3.7-dev'
注意,根据Glob 'python3.7-*' 选中了 'python3.7-doc'
注意,根据Glob 'python3.7-*' 选中了 'python3.7-gdbm'
注意,根据Glob 'python3.7-*' 选中了 'python3.7-minimal'
注意,根据Glob 'python3.7-*' 选中了 'python3.7-lib2to3'
注意,根据Glob 'python3.7-*' 选中了 'python3.7-examples'
注意,选中 'python3-distutils' 而非 'python3.7-distutils'
注意,选中 'python3-gdbm' 而非 'python3.7-gdbm'
注意,选中 'python3-lib2to3' 而非 'python3.7-lib2to3'
注意,选中 'python3-tk' 而非 'python3.7-tk'
python3-distutils 已经是最新版 (3.6.5-3)。
python3-distutils 已设置为手动安装。
python3-gdbm 已经是最新版 (3.6.5-3)。
python3-lib2to3 已经是最新版 (3.6.5-3)。
python3-lib2to3 已设置为手动安装。
python3.7-dbg 已经是最新版 (3.7.0~b3-1)。
python3.7-minimal 已经是最新版 (3.7.0~b3-1)。
python3.7-minimal 已设置为手动安装。
将会同时安装下列软件:
blt javascript-common libexpat1-dev libjs-jquery libjs-underscore
libpython3.7 libpython3.7-dev python-pip-whl tk8.6-blt2.5
建议安装:
blt-demo apache2 | lighttpd | httpd tix python3-tk-dbg
下列【新】软件包将被安装:
blt javascript-common libexpat1-dev libjs-jquery libjs-underscore
libpython3.7 libpython3.7-dev python-pip-whl python3-tk python3.7-dev
python3.7-doc python3.7-examples python3.7-venv tk8.6-blt2.5
升级了 0 个软件包,新安装了 14 个软件包,要卸载 0 个软件包,有 0 个软件包未被升级。
需要下载 16.6 MB 的归档。
解压缩后会消耗 78.0 MB 的额外空间。
您希望继续执行吗? [Y/n] y
获取:1 http://mirrors.ustc.edu.cn/ubuntu bionic/main amd64 tk8.6-blt2.5 amd64 2.5.3+dfsg-4 [572 kB]
获取:2 http://mirrors.ustc.edu.cn/ubuntu bionic/main amd64 blt amd64 2.5.3+dfsg-4 [4,944 B]
获取:3 http://mirrors.ustc.edu.cn/ubuntu bionic/main amd64 javascript-common all 11 [6,066 B]
获取:4 http://mirrors.ustc.edu.cn/ubuntu bionic/main amd64 libexpat1-dev amd64 2.2.5-3 [122 kB]
获取:5 http://mirrors.ustc.edu.cn/ubuntu bionic/main amd64 libjs-jquery all 3.2.1-1 [152 kB]
获取:6 http://mirrors.ustc.edu.cn/ubuntu bionic/main amd64 libjs-underscore all 1.8.3~dfsg-1 [59.9 kB]
获取:7 http://mirrors.ustc.edu.cn/ubuntu bionic/universe amd64 libpython3.7 amd64 3.7.0~b3-1 [1,507 kB]
获取:8 http://mirrors.ustc.edu.cn/ubuntu bionic/universe amd64 libpython3.7-dev amd64 3.7.0~b3-1 [2,361 kB]
获取:9 http://mirrors.ustc.edu.cn/ubuntu bionic-updates/universe amd64 python-pip-whl all 9.0.1-2.3~ubuntu1 [1,652 kB]
获取:10 http://mirrors.ustc.edu.cn/ubuntu bionic/main amd64 python3-tk amd64 3.6.5-3 [100 kB]
获取:11 http://mirrors.ustc.edu.cn/ubuntu bionic/universe amd64 python3.7-dev amd64 3.7.0~b3-1 [501 kB]
获取:12 http://mirrors.ustc.edu.cn/ubuntu bionic/universe amd64 python3.7-doc all 3.7.0~b3-1 [9,171 kB]
获取:13 http://mirrors.ustc.edu.cn/ubuntu bionic/universe amd64 python3.7-examples all 3.7.0~b3-1 [422 kB]
获取:14 http://mirrors.ustc.edu.cn/ubuntu bionic/universe amd64 python3.7-venv amd64 3.7.0~b3-1 [6,036 B]
已下载 16.6 MB,耗时 24秒 (702 kB/s)
正在选中未选择的软件包 tk8.6-blt2.5。
(正在读取数据库 ... 系统当前共安装有 206847 个文件和目录。)
正准备解包 .../00-tk8.6-blt2.5_2.5.3+dfsg-4_amd64.deb ...
正在解包 tk8.6-blt2.5 (2.5.3+dfsg-4) ...
正在选中未选择的软件包 blt。
正准备解包 .../01-blt_2.5.3+dfsg-4_amd64.deb ...
正在解包 blt (2.5.3+dfsg-4) ...
正在选中未选择的软件包 javascript-common。
正准备解包 .../02-javascript-common_11_all.deb ...
正在解包 javascript-common (11) ...
正在选中未选择的软件包 libexpat1-dev:amd64。
正准备解包 .../03-libexpat1-dev_2.2.5-3_amd64.deb ...
正在解包 libexpat1-dev:amd64 (2.2.5-3) ...
正在选中未选择的软件包 libjs-jquery。
正准备解包 .../04-libjs-jquery_3.2.1-1_all.deb ...
正在解包 libjs-jquery (3.2.1-1) ...
正在选中未选择的软件包 libjs-underscore。
正准备解包 .../05-libjs-underscore_1.8.3~dfsg-1_all.deb ...
正在解包 libjs-underscore (1.8.3~dfsg-1) ...
正在选中未选择的软件包 libpython3.7:amd64。
正准备解包 .../06-libpython3.7_3.7.0~b3-1_amd64.deb ...
正在解包 libpython3.7:amd64 (3.7.0~b3-1) ...
正在选中未选择的软件包 libpython3.7-dev:amd64。
正准备解包 .../07-libpython3.7-dev_3.7.0~b3-1_amd64.deb ...
正在解包 libpython3.7-dev:amd64 (3.7.0~b3-1) ...
正在选中未选择的软件包 python-pip-whl。
正准备解包 .../08-python-pip-whl_9.0.1-2.3~ubuntu1_all.deb ...
正在解包 python-pip-whl (9.0.1-2.3~ubuntu1) ...
正在选中未选择的软件包 python3-tk:amd64。
正准备解包 .../09-python3-tk_3.6.5-3_amd64.deb ...
正在解包 python3-tk:amd64 (3.6.5-3) ...
正在选中未选择的软件包 python3.7-dev。
正准备解包 .../10-python3.7-dev_3.7.0~b3-1_amd64.deb ...
正在解包 python3.7-dev (3.7.0~b3-1) ...
正在选中未选择的软件包 python3.7-doc。
正准备解包 .../11-python3.7-doc_3.7.0~b3-1_all.deb ...
正在解包 python3.7-doc (3.7.0~b3-1) ...
正在选中未选择的软件包 python3.7-examples。
正准备解包 .../12-python3.7-examples_3.7.0~b3-1_all.deb ...
正在解包 python3.7-examples (3.7.0~b3-1) ...
正在选中未选择的软件包 python3.7-venv。
正准备解包 .../13-python3.7-venv_3.7.0~b3-1_amd64.deb ...
正在解包 python3.7-venv (3.7.0~b3-1) ...
正在设置 libjs-jquery (3.2.1-1) ...
正在设置 python-pip-whl (9.0.1-2.3~ubuntu1) ...
正在设置 libjs-underscore (1.8.3~dfsg-1) ...
正在处理用于 install-info (6.5.0.dfsg.1-2) 的触发器 ...
正在设置 python3.7-venv (3.7.0~b3-1) ...
正在设置 python3.7-examples (3.7.0~b3-1) ...
正在处理用于 libc-bin (2.27-3ubuntu1) 的触发器 ...
正在设置 tk8.6-blt2.5 (2.5.3+dfsg-4) ...
正在设置 libpython3.7:amd64 (3.7.0~b3-1) ...
正在处理用于 doc-base (0.10.8) 的触发器 ...
Processing 9 added doc-base files...
正在设置 libexpat1-dev:amd64 (2.2.5-3) ...
正在处理用于 man-db (2.8.3-2) 的触发器 ...
正在设置 javascript-common (11) ...
正在设置 python3.7-doc (3.7.0~b3-1) ...
正在设置 blt (2.5.3+dfsg-4) ...
正在设置 libpython3.7-dev:amd64 (3.7.0~b3-1) ...
正在设置 python3-tk:amd64 (3.6.5-3) ...
正在设置 python3.7-dev (3.7.0~b3-1) ...
正在处理用于 libc-bin (2.27-3ubuntu1) 的触发器 ...

vscode设置python3.7调试环境(已更新)的更多相关文章

  1. 将VSCode设置成中文语言环境

    VSCode是一款轻量级的好用的编译软件,今天小编来将软件默认的英文语言环境变为我们熟悉的中文语言环境. 工具/原料   电脑一台 安装有VSCode 方法/步骤     首先打开VSCode软件,可 ...

  2. vscode+phpstudy构建php调试环境

    由于vs code开源和跨平台,而且插件很多,所以打算以后编写和调试php都用vs code. 配置vs code+phpstudy的php调试环境步骤如下: 1.配置phpstudy,其他选项菜单- ...

  3. vscode设置VUE eslint开发环境

    我的使用vscode开发VUE的常用设置 1.安装插件 ESLint Vetur Beautify Prettier - Code formatter Auto Rename Tag -重命名标签,闭 ...

  4. Windbg双机调试环境配置(Windows7/Windows XP+VirtualBox/VMware+WDK7600)

    简介:Windbg双机调试内核.驱动 下载软件: 下载Windbg(GRMWDK_EN_7600_1.ISO) 下载VirtualBox 5.2/VMware 12 一.安装WDK,这里要提一点的是D ...

  5. 玩转VSCode-完整构建VSCode开发调试环境

    随着VSCode的不断完善和强大,是时候将部分开发迁移到VS Code中了. 目前使用VS2019开发.NET Core应用,一直有一个想法,在VS Code中复刻VS的开发环境,同时迁移到VS Co ...

  6. 使用 VSCode 在 Mac 上配置 C/C++ 调试环境

    Background VSCode是微软开发的一款开源代码编辑器,具有可拓展性强,多语言支持,跨平台等优点,在不同的个性化配置下几乎可以用作所有的轻量级开发.我在初学C的时候也使用的是类似于Xcode ...

  7. VSCode配置python调试环境

    VSCode配置python调试环境 很久之前的一个东东,翻出来看看 VSCode配置python调试环境 * 1.下载python解释器 * 2.在VSCode市场中安装Python插件 * 4.在 ...

  8. Blackey win10 + python3.6 + VSCode + tensorflow-gpu + keras + cuda8 + cuDN6N环境配置(转载)

    win10 + python3.6 + VSCode + tensorflow-gpu + keras + cuda8 + cuDN6N环境配置   写在前面的话: 再弄这个之前,我对python也好 ...

  9. vscode加MinGw三步搭建c/c++调试环境

    vscode加MinGw三步搭建c/c++调试环境 step1:安装vscode.MinGw 1.1 vscod常规安装:https://code.visualstudio.com/ 1.2 MinG ...

随机推荐

  1. nodejs+express+mongodb写api接口的简单尝试

    1:启动mongodb服务 我的mongoDB的安装目录:E:\mongoDB\bin,版本:3.4.9 打开cmd  -> e:(进入e盘) -> cd mongoDB/bin(进入mo ...

  2. 测者的测试技术笔记:揭开java method的一个秘密--巨型函数

    相信,很多人都不知道Java的Method的上限为64K.本文将超过这个上限的函数叫做巨型函数. 巨型函数的问题 1.如果代码超过了这个限制,Java编译器就报"Code too large ...

  3. [转]QQ空间、新浪微博、腾讯微博等一键分享API链接代码

    转自------ 1.新浪微博:http://service.weibo.com/share/share.php?url= count=表示是否显示当前页面被分享数量(1显示)(可选,允许为空)&am ...

  4. [spring transaction],service实现类中非事务方法直接调用自身事务方法导致事务无效的原因

    首先,准备service接口,两个 public interface AccountService { public void createAccount(Account account, int t ...

  5. AngularJS学习之旅—AngularJS Http(九)

    1.AngularJS XMLHttpRequest $http 是 AngularJS 中的一个核心服务,用于读取远程服务器的数据. eg: // 简单的 GET 请求,可以改为 POST $htt ...

  6. mysql免安装版初次使用

    在自己电脑上安装一个mysql数据库并启动,碰到一些问题,总结一下 1.下载免安装版mysql数据库,百度下载了了5.7.25版本 2.在bin文件夹下找到my-defaults.ini文件,我这没有 ...

  7. 【原】Java学习笔记007 - 流程控制

    package cn.temptation; public class Sample01 { public static void main(String[] args) { // for循环 // ...

  8. IOS开发protocol使用

    1.什么是protocol? protocol(协议)是用来定义对象的属性和行为,用于回调. 2.protocol分类? 协议中有三个修饰关键字@required和@optional和@propert ...

  9. MFC桌面电子时钟的设计与实现

    目录 核心技术 需求分析 程序设计 程序展示 (一)核心技术 MFC(Micosoft Foundation Class Libay,微基础类库)是微基于Windows平台下的C++类库集合,MFC包 ...

  10. Ubuntu18.04 安装jdk1.8

    1.oracle官网下载压缩包,点击链接. 2.解压 1 tar -zxvf jdk-8u171-linux-x64.tar.gz 3.移动到制定目录 ##将文件从下载目录 挪到/usr/local下 ...