惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
C
Cisco Blogs
T
The Exploit Database - CXSecurity.com
G
GRAHAM CLULEY
AI
AI
腾讯CDC
月光博客
月光博客
P
Privacy International News Feed
aimingoo的专栏
aimingoo的专栏
博客园 - 聂微东
Latest news
Latest news
宝玉的分享
宝玉的分享
The Last Watchdog
The Last Watchdog
H
Hacker News: Front Page
博客园 - 【当耐特】
H
Hackread – Cybersecurity News, Data Breaches, AI and More
G
Google Developers Blog
D
Docker
D
DataBreaches.Net
O
OpenAI News
IT之家
IT之家
T
Threat Research - Cisco Blogs
S
Securelist
S
Secure Thoughts
V
Visual Studio Blog
Security Archives - TechRepublic
Security Archives - TechRepublic
A
Arctic Wolf
I
Intezer
Simon Willison's Weblog
Simon Willison's Weblog
L
Lohrmann on Cybersecurity
C
Cyber Attacks, Cyber Crime and Cyber Security
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
T
Tor Project blog
Google DeepMind News
Google DeepMind News
J
Java Code Geeks
Help Net Security
Help Net Security
K
KPMG report finds enterprise disconnect between AI and its ROI | CIO
N
Netflix TechBlog - Medium
F
Fortinet All Blogs
Attack and Defense Labs
Attack and Defense Labs
D
Darknet – Hacking Tools, Hacker News & Cyber Security
博客园 - Franky
C
Check Point Blog
美团技术团队
Hugging Face - Blog
Hugging Face - Blog
罗磊的独立博客
Forbes - Security
Forbes - Security
F
Full Disclosure
S
Security @ Cisco Blogs
B
Blog RSS Feed

博客园 - wintersoft

加入mapstruct后出现 找不到符号 符号: 方法 setXX 的解决方法 解决docker容器日志导致主机磁盘空间满了的情况 prometheus安装(docker) 在Github或Gitee上用hexo搭建个人博客 jenkins更新为国内源 让sentinel-dashboard的流控配置持久化到nacos Yarn和Zookeeper的区别 360关闭系统服务导致开机鼠标需重拔插才用的问题 flink安装启动(docker) jenkins安装启动(docker) arthas安装进docker kafka安装运行(docker) docker port is already allocated 的解决方案 docker删除名称为<none>的镜像 VS Code中python代码自动格式化 代码自动检查 安装tensorflow-gpu2.0(windows) 安装anaconda和tensorflow(windows) sentinel-dashboard安装、运行(docker) nacos-server安装、运行 (docker)
vs code搭建python和tensorflow环境
wintersoft · 2019-10-07 · via 博客园 - wintersoft

anaconda 安装tensorflow-gpu环境见https://www.cnblogs.com/wintersoft/p/11620267.html

vscode中设置python虚拟环境
Ctrl+Shift+P,选择Python:Select Interpreter,选中tensorflow-gpu虚拟环境
会自动在settings.json文件中生成,如:

{
  "python.pythonPath": "C:\\ProgramData\\Anaconda3\\envs\\tensorflow-gpu\\python.exe"
}

或手动配置,自己在.vscode文件夹里新建settings.json

{
  "python.pythonPath": "C:\\ProgramData\\Anaconda3\\envs\\tensorflow-gpu\\python.exe",
  "python.autoComplete.extraPaths": [
    "C:\\ProgramData\\Anaconda3\\envs\\tensorflow-gpu",
    "C:\\ProgramData\\Anaconda3\\envs\\tensorflow-gpu\\Lib\\site-packages"
  ],
  "python.autoComplete.addBrackets": true,
  "python.jediEnabled": true, }

F5调式特定启动文件,可修改为:

{

    // Use IntelliSense to learn about possible attributes.

    // Hover to view descriptions of existing attributes.

    // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387

    "version": "0.2.0",

    "configurations": [

        {

            "name": "Python: 当前文件",

            "type": "python",

            "request": "launch",

            // "pythonPath": "C:\\ProgramData\\Anaconda3\\envs\\tensorflow-gpu\\python.exe",

            "pythonPath": "${config:python.pythonPath}",

            // "program": "${file}",

            "program": "${workspaceRoot}\\hello.py",

            "console": "integratedTerminal",

            "stopOnEntry": false,

            // "env": {"PYTHONPATH":"${workspaceRoot}"},

            // "envFile": "${workspaceRoot}/.env",

        }

    ]

}

VS code python 环境下提示找不到 module报unresolved import "xxx"
https://github.com/DonJayamanne/pythonVSCode


进入launch.json文件,configurations节点下加入:
"env": {"PYTHONPATH":"${workspaceRoot}"},
"envFile": "${workspaceRoot}/.env",

进入settings.json文件,加入:
"python.jediEnabled": true,

然后重启vs code

注:"python.jediEnabled": true后,安装pylint后会报:
No name 'python' in module 'tensorflow'pylint(no-name-in-module)和
Unable to import 'tensorflow.python.client'pylint(import-error) 之类的错

推荐插件安装:

Python

Visual Studio IntelliCode

Anaconda Extension Pack

Settings Sync

Beautify

Atuo Rename Tag

Project Manager