V2EX = way to explore
V2EX 是一个关于分享和探索的地方
Sign Up Now
For Existing Member  Sign In
推荐学习书目
Learn Python the Hard Way
Python Sites
PyPI - Python Package Index
http://diveintopython.org/toc/index.html
Pocoo
值得关注的项目
PyPy
Celery
Jinja2
Read the Docs
gevent
pyenv
virtualenv
Stackless Python
Beautiful Soup
结巴中文分词
Green Unicorn
Sentry
Shovel
Pyflakes
pytest
Python 编程
pep8 Checker
Styles
PEP 8
Google Python Style Guide
Code Style from The Hitchhiker's Guide
SeanZhaoOrZXY
V2EX  ›  Python

求助: VScode 写 Python 无法使用 autocomplete/intellisence

  •  
  •   SeanZhaoOrZXY · Mar 16, 2018 · 9999 views
    This topic created in 2965 days ago, the information mentioned may be changed or developed.

    我已经下载了官方 python 插件,并在 setting.json 中正确设置了 pythonPath 路径。 目前问题是,只有 if,while 这一类能给出补全提示,print,import 这些都不行。(如输入 pri,不会给出任何东西) 但程序可以正常运行,输完关键字也会高亮显示。 VScode 版本 1.21 ,python3.6.4

    9 replies    2018-03-18 08:42:23 +08:00
    SeanZhaoOrZXY
        2
    SeanZhaoOrZXY  
    OP
       Mar 16, 2018
    @lmusicwq 以前已经这样配置过了。。刚又执行了一下,在第三步时报错:"command 'python.setInterpreter' not found",而且状态栏没有让选择 python 环境的选项。。
    lmusicwq
        3
    lmusicwq  
       Mar 16, 2018
    @SeanZhaoOrZXY #2 你谷歌下这个错误,挺多答案的。
    建议卸载扩展重装,或者禁用其他扩展看是否还有错误。
    male110
        4
    male110  
       Mar 16, 2018
    感觉 wing 的提示功能是最强的.
    当然只说提示功能.
    SeanZhaoOrZXY
        5
    SeanZhaoOrZXY  
    OP
       Mar 16, 2018
    @lmusicwq 很感谢回复。但是重装拓展未能解决问题,禁用后 Command Palette 中连 python 相关选项都没了。。我在找找原因吧,多谢了。
    XYxe
        6
    XYxe  
       Mar 17, 2018
    我前两天也遇到过,把~/.vscode 文件夹删掉就好了。
    可以先用 settings sync 同步配置。
    SeanZhaoOrZXY
        7
    SeanZhaoOrZXY  
    OP
       Mar 18, 2018
    @XYxe 请问是删除项目根目录中的.vscode 文件夹吗?我试了下,没有生效。。
    XYxe
        8
    XYxe  
       Mar 18, 2018 via Android   ❤️ 1
    @SeanZhaoOrZXY 是用户目录下的.vscode 文件夹
    SeanZhaoOrZXY
        9
    SeanZhaoOrZXY  
    OP
       Mar 18, 2018
    @XYxe 删除后再重装插件,问题确实解决!请问是何原理呢?
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   5606 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 46ms · UTC 07:21 · PVG 15:21 · LAX 00:21 · JFK 03:21
    ♥ Do have faith in what you're doing.