1、查看Pipenv的位置
# 先激活Pipenv环境
pipenv shell
# 获取当前虚拟环境的位置
pipenv --venv
2、打开setting.json配置文件
-
Ctrl+Shift+P,输入settings,选择Open Settings(JSon)
-
将之前得到的Pipenv环境路径添加进去
"python.venvPath": "C:UsersAlgorithm.virtualenvs"
3、重启vscode
参考
https://segmentfault.com/a/1190000017558652
https://blog.csdn.net/weixin_34294649/article/details/87518937