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

vscode 打开的终端为什么会有 2 个 conda 环境

  •  
  •   huc2 · Feb 20, 2024 · 4587 views
    This topic created in 818 days ago, the information mentioned may be changed or developed.

    电脑自己打开的终端是正常的 自带的终端:

    (base) ➜  ~
    

    vscode 终端:

    (base) (base) ➜  ~ 
    
    5 replies    2024-08-05 11:04:12 +08:00
    NoOneNoBody
        1
    NoOneNoBody  
       Feb 21, 2024
    你的终端应该有个加载脚本,vscode 上终端时加载了一次,然后在加载解析器时又加载了一次?
    jerrywaffle
        2
    jerrywaffle  
       Feb 22, 2024
    这题我会:
    在 settings.json 加一行:
    "terminal.integrated.shellIntegration.enabled": false,

    另外,如果要设定 default python env
    "python.defaultInterpreterPath": "~/anaconda3/path/to/your/env/bin/python",

    再附送一个配置,运行 line or selection in ipython
    "python.terminal.launchArgs": ["-m", "IPython", "-i", "--no-autoindent"],
    huc2
        3
    huc2  
    OP
       Feb 24, 2024
    @jerrywaffle 谢谢大佬,关了这个确实不会显示两个环境了。但我还是好奇,之前明明可以打开一个新 shell 的时候自动激活 python 指定环境的(不会出现两个环境的情况),不知道为什么前几天就出现两个环境了;现在关了后如果自己要输命令跑还得自己激活一下
    jianyisiqian
        4
    jianyisiqian  
       Jun 11, 2024
    @jerrywaffle 不错,解决了,当两个名字相同时,就这样解决
    GarrickLin
        5
    GarrickLin  
       Aug 5, 2024
    conda config --set auto_activate_base false
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   5238 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 51ms · UTC 07:30 · PVG 15:30 · LAX 00:30 · JFK 03:30
    ♥ Do have faith in what you're doing.