推荐学习书目
› 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
liuyzh
V2EX  ›  Python

原来让 vscode 支持 virtualenv 这么简单

  •  
  •   liuyzh · Feb 18, 2017 · 7511 views
    This topic created in 3510 days ago, the information mentioned may be changed or developed.

    之前不知道,还傻乎乎得修改 launch.json 配置文件

    今天才发现原来在命令行激活虚拟环境后,直接用 code 打开项目文件夹就行了。。。

    XXX>venv\scripts\activate
    (venv) XXX>code project_name/
    

    Win 系统

    neosfung
        1
    neosfung  
       Feb 18, 2017   ❤️ 1
    python 的话,如果要语法提示补全,还是要把 site-packages 加入到 settings.json 中
    ivechan
        2
    ivechan  
       Feb 18, 2017
    为什么我感觉还不如修改 launch.json 呢. 你这样岂不是每次打开都要输入一次命令.
    liuyzh
        3
    liuyzh  
    OP
       Feb 18, 2017
    @ivechan 可以写一个批处理
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Privacy   ·   Solana   ·   4373 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 26ms · UTC 09:51 · PVG 17:51 · LAX 02:51 · JFK 05:51
    ♥ Do have faith in what you're doing.