汇总系列: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

  1. sudo apt-get install python3.7
  2.  
  3. sudo apt-get install python3.7-dbg
  4.  
  5. curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py
  6.  
  7. sudo python3.7 get-pip.py

  8. sudo pip3.7 install pycodestyle
  9. sudo pip3.7 install yapf

VSCode配置文件:

  1. // 设置Python的路径
  2. "python.pythonPath": "python3.7",
  3. // "python.pythonPath": "/home/dnt/anaconda3/bin/python",
  4. // 设置Python的代码格式化
  5. "python.formatting.provider": "yapf",
  6. // 设置Python的代码检查
  7. "python.linting.flake8Path": "pycodestyle",
  8. "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. 自定义一个全屏的AlertDialog。

    ........... final MyDialog dialog = new MyDialog(this); LayoutInflater inflater = getLayoutInflater( ...

  2. 基础环境系列:MySQL8.0.12

    机型与版本:windows10(64-bits) Mysql环境配置:mysql8.0.12 一.MySQL安装 Mysql的安装有两种方法,一种是通过.msi一种是通过压缩包.穷呢,大家就老实下社区 ...

  3. [安卓]ListView 与 RecyclerView的比较

    ListView与RecyclerView在在app应用非常广泛,相对于其他的view(button textview)来说比较复杂,接下来我将讲一下创建的流程以及两者的不同. 代码来自<第一行 ...

  4. Python使用Plotly绘图工具,绘制水平条形图

    水平条形图与绘制柱状图类似,大家可以先看看我之前写的博客,如何绘制柱状图 水平条形图需要在Bar函数中设置orientation= 'h' 其他的参数与柱状图相同.也可以通过设置barmode = ' ...

  5. Mysql学习路线

    本文内容: mysql学习路线 首发日期:2018-04-19 由于现在很多都是有api了,很多问题都转接到编程语言上来处理了,所以这篇mysql之路仅仅是作为“了解”之用.不深究mysql. 很多东 ...

  6. UE4分支的Git Flow

    UE4作为开源商业引擎,其代码托管在私有库:https://github.com/EpicGames/UnrealEngine 为了能看到并下载UE4的代码,开发者需要有GitHub账号和Unreal ...

  7. mysql备份与还原!

    一.备份常用操作基本命令 1.备份命令mysqldump格式 格式:mysqldump -h主机名  -P端口 -u用户名 -p密码 –database 数据库名 > 文件名.sql 2.备份M ...

  8. EF ORM

    //新增 UserInfo userInfo = new UserInfo(); userInfo.UserName = "YANG"; userInfo.UserPass = & ...

  9. CSS盒子模型(Box Model)

    一.背景 作为CSS的重点,三大模块之一的盒子模型,这部分无论如何也要精通透彻.在任何一个网页当中,都有自己的布局方式,所谓网页布局方式就是如何把网页里面的文字.图片,很好的排版成美工设计的样式,这时 ...

  10. iOS 12.1 跳转页面时 tabBar闪动

    最新iOS 12.1系统,self.hidesBottomBarWhenPushed = YES,tabBar发生闪动 设置为不透明就行了.[[UITabBar appearance] setTran ...