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

推荐订阅源

Forbes - Security
Forbes - Security
C
CERT Recently Published Vulnerability Notes
NISL@THU
NISL@THU
I
Intezer
S
Schneier on Security
L
Lohrmann on Cybersecurity
cs.CL updates on arXiv.org
cs.CL updates on arXiv.org
月光博客
月光博客
G
Google Developers Blog
S
Securelist
WordPress大学
WordPress大学
T
Tailwind CSS Blog
IT之家
IT之家
C
Cybersecurity and Infrastructure Security Agency CISA
A
Arctic Wolf
C
CXSECURITY Database RSS Feed - CXSecurity.com
J
Java Code Geeks
宝玉的分享
宝玉的分享
阮一峰的网络日志
阮一峰的网络日志
V
Vulnerabilities – Threatpost
P
Privacy & Cybersecurity Law Blog
博客园 - 聂微东
D
Darknet – Hacking Tools, Hacker News & Cyber Security
The Cloudflare Blog
P
Privacy International News Feed
The Hacker News
The Hacker News
L
LINUX DO - 热门话题
爱范儿
爱范儿
Last Week in AI
Last Week in AI
博客园 - 【当耐特】
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
美团技术团队
有赞技术团队
有赞技术团队
博客园 - 司徒正美
C
Cyber Attacks, Cyber Crime and Cyber Security
大猫的无限游戏
大猫的无限游戏
Recent Commits to openclaw:main
Recent Commits to openclaw:main
G
GRAHAM CLULEY
小众软件
小众软件
T
Tenable Blog
Jina AI
Jina AI
Simon Willison's Weblog
Simon Willison's Weblog
Security Latest
Security Latest
Application and Cybersecurity Blog
Application and Cybersecurity Blog
AWS News Blog
AWS News Blog
T
Troy Hunt's Blog
博客园 - Franky
量子位
博客园_首页
P
Proofpoint News 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