avatar

sunday

Sunday's Blog

  • 首页
Home 解决vscode上python代码无法解析导入
文章

解决vscode上python代码无法解析导入

Posted 昨天 Updated 昨天
By sunday
1~2 min read

1.已经生成了虚拟环境了,如以下结构

⏺ your-project/
  ├── .gitignore
  ├── api/
  │   └── index.py
  ├── requirements.txt
  └── .venv/
      └── (虚拟环境文件)

2.vscode上显示如下报错

      For the code present, we get this error:
```
无法解析导入“flask”
```
How can I resolve this? If you propose a fix, please make it concise.

解决:
按Cmd+Shift+P,输入Python: Select Interpreter,选择项目里的.venv里的Python。

软件安装, 疑难杂症
软件使用 疑难杂症
License:  CC BY 4.0
Share

Further Reading

Jul 25, 2025

解决vscode上python代码无法解析导入

1.已经生成了虚拟环境了,如以下结构 ⏺ your-project/ ├── .gitignore ├── api/ │ └── index.py ├── requirements.txt └── .venv/ └── (虚拟环境文件) 2.vscode上显示如下

Dec 30, 2024

解决Windows无法安装到这个磁盘 选中的磁盘具有MBR分区表

1.在Windows安装界面,按下 Shift + F10 组合键,打开命令提示符。 2.执行以下命令 diskpart list disk select disk 0 clean convert gpt #转换成功继续执行 exit #退出diskpart 可以关掉窗口了

Oct 10, 2024

docker-compose安装n8n自动化工作流

1.docker-compose.yml文件配置 services: n8n: image: docker.n8n.io/n8nio/n8n container_name: n8n restart: unless-stopped ports: - "5

OLDER

给 Claude Code 装个“铃声” - Ring Ring Claude提醒你继续vibe coding 🔔

NEWER

Recently Updated

  • 解决vscode上python代码无法解析导入
  • 给 Claude Code 装个“铃声” - Ring Ring Claude提醒你继续vibe coding 🔔
  • nextjs使用three.js写一个3D模型的查看器Viewer
  • nextjs15使用better-sqlite3的连接报错问题
  • nextjs + clerk + supabase + realtime 实时监听数据库更改

Trending Tags

nginx acme 强制跳转HTTPS nodejs 代理 mac 神器 vue3 工具 docker

Contents

©2025 sunday. Some rights reserved.

Using the Halo theme Chirpy