简体   繁体   中英

Why can I use VS code with anaconda only when I open it from anaconda navigator?

I know this question is frequently asked, but none of the answers solved my problem.

I use VS code for bunch of things: Python, html css javascript php, Ruby etc. I use anaconda for Python. However, I can only run python with anaconda when I open VS code by the anaconda navigator.

I tried the to do the same thing as it automatically does with anaconda navigator: Setting the same interpreter, the good language etc. But when I try conda activate base (which is automatically written with anaconda and works), it gives me an error. It's not an huge problem, but it's just annoying to open anaconda everytime. What should I do?

make sure you have your anaconda path added to the windows path.

to add anaconda to the windows path follow this:

  1. search "environment" in windows search.

  2. click on "environment variables" 在此处输入图像描述

  3. in the system variables area. look for "path" variable. select it and click on edit. 在此处输入图像描述

  4. add the following (make sure the addresses are correct in your case first). 在此处输入图像描述

if you do not know where is anaconda installed on your PC. open cmd from anaconda navigator and write "where conda"

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM