Using Python with Anaconda and Visual Studio Code (Windows)

Поділитися
Вставка
  • Опубліковано 9 лис 2024

КОМЕНТАРІ • 107

  • @Cash_is_King727
    @Cash_is_King727 2 роки тому +2

    Best explanation I've seen after days of digging around the net. Much appreciated.

  • @lukasv1683
    @lukasv1683 Рік тому +3

    Very clear explanation. It solved the issue why I couldnt use Anaconda in VSC. Thank you very much.

  • @jannaa7017
    @jannaa7017 4 роки тому +11

    Spent hours trying to make it work before finding your video! Thank you so much!

  • @shuvamsarkar4742
    @shuvamsarkar4742 3 роки тому +1

    Thanks a lot. Much needed help. Just wasted 1 whole day on this to get working before founding this video.

  • @_drdoof_
    @_drdoof_ 2 роки тому +1

    8:49 moving to command prompt worked for me (no restart in my case). Thanx for the help

  • @harshkanodia9794
    @harshkanodia9794 3 роки тому +6

    Beautiful explanation. Saved me from lots of lost time and unnecessary frustration

  • @lucatirel7301
    @lucatirel7301 Рік тому +1

    He solves the problem of "conda is not recognized bla bla bla..."!!!!!!!!!

  • @uche589
    @uche589 2 роки тому

    Thank you soooo much for this...after being frustrated for two days this saved me. I really appreciate you

  • @samllanwarne6512
    @samllanwarne6512 3 роки тому +1

    Wasted 5 hours on select default shell, unbelievable... Thanks for posting, not sure how I would have been without this. But also darn you computer world, why make things so difficult.
    (p.s. I also have that return bug when it autocompletes when you want to go to new line instead)

  • @swilks06
    @swilks06 2 роки тому

    Thank you! I spent an hour trying to figure this out.

  • @nicholaswhite6113
    @nicholaswhite6113 4 роки тому +10

    This probably should have been obvious but after having issues importing packages with the vscode/anaconda set up I found that opening vscode from the anaconda navigator rather than directly opening vscode from my desktop fixed the issue

    • @unsunken4710
      @unsunken4710 4 роки тому +3

      The problem is the vscode launch is not in the navigator

    • @nicholaswhite6113
      @nicholaswhite6113 4 роки тому

      @@unsunken4710 does it not show up in the same area as jupyterlab and spyder under applications for you?

    • @unsunken4710
      @unsunken4710 4 роки тому +2

      Nicholas White no it’s just not there. There’s spyder, jupytr, Jupytr notebook, everything else but not VSCode

    • @avikgangal4235
      @avikgangal4235 4 роки тому

      @Nicholas White it still shows a pop up in VS Code (Opened through Anaconda Navigator) stating "Duplicate entries in "env"", and asks me to open launch.json file.

    • @KarenPaulinaH
      @KarenPaulinaH 4 роки тому +1

      It worked, thank you!

  • @Diego0wnz
    @Diego0wnz 4 роки тому +38

    After wasting 7 hours on this it was the “select default shell” for me

    • @phucatnguyen4856
      @phucatnguyen4856 3 роки тому

      love you bro ? youre a life saver

    • @anthonylwalker
      @anthonylwalker 3 роки тому +6

      To add to this, in the terminal section the drop down selection on the right has the option to select default shell. I checked cmd.exe rather than powershell and then restarted VSC and this worked for me.

    • @svenjaherb6001
      @svenjaherb6001 3 роки тому

      Thank you for saving the rest of us those 7 hours!!

    • @akshatasingh5429
      @akshatasingh5429 3 роки тому +1

      Seriously man, that's a life saver..!

    • @danielvillalpando8724
      @danielvillalpando8724 3 роки тому

      5 hours, you saved me 2, thx

  • @LuisMedina040199
    @LuisMedina040199 2 роки тому

    I don't have any idea as to what you did on this video but it worked uno. Thanks.

  • @xXGuiCostaXx
    @xXGuiCostaXx 4 роки тому +3

    the command prompt made the whole difference for me, thanks man

  • @tswannack
    @tswannack 3 роки тому +1

    Selecting the cmd prompt through 'Select Default Option' worked for me. Thanks for this video!

    • @markk364
      @markk364 2 роки тому

      Perhaps you mean to say "Select Default Profile" - in the Terminal drop-down, as I do not see Select Default Option in any other VS Code menu -- -anyone care to bring this comment home?

  • @andr3wpex
    @andr3wpex 3 роки тому +11

    Thanks for this video. I finally got this working based on this and some of the comments. Let me summarize what worked for me . (.. and I have tried everything before)
    1 follow the steps in the beginning of the video and add the 2 paths to system variables and as usual set default interpreter in vsc
    2 change the default terimal in vsc to cmd. (this is what I was missing as used PowerShell before)
    running py files outsied from vsc, directly from cmd still requires -for me- to activate the selected env first. I dind it more convenient that it is done under the hood in vsc and no need for that extra line.

    • @levy9777
      @levy9777 2 роки тому

      thanks Andrew! step 2 fixed it for me!

    • @郑昊天-o9p
      @郑昊天-o9p 2 роки тому

      Thanks! Never thought the type of terminal would cause so many troubles.

    • @theoceanman6221
      @theoceanman6221 2 роки тому

      This is the issue I have, but it's still not working. I can use conda commands in the normal command prompt, but in VSC, they don't work.

  • @yuanhangzhang9555
    @yuanhangzhang9555 4 роки тому +13

    This method doesn't work for me. But I found a better way: just right click the mouse and choose "Run current file in python interactive window", you can see plots,outputs, and observe variables there, just like Spyder

  • @avikgangal4235
    @avikgangal4235 4 роки тому +4

    Hi,
    Thanks for the video. However, even after setting the environment setting as shown above, I am getting an "Exception has occured: ImportError", "Importing the numpy c-extensions failed". I also tried to make it work by opening VS Code from within Anaconda Navigator, then it gives me a pop-up message stating "Duplicate entries in env", and asks me to open "Launch.json". Please advise, how I may be able to solve the issue.
    Thanks in advance.

  • @swastiksarkar
    @swastiksarkar 4 роки тому +5

    Hello, can you please tell me how to get that "python" as an output interpreter instead of the default "powershell". What settings do I need? Please tell me this.

  • @er1csarav1a34
    @er1csarav1a34 Рік тому +1

    This video was super insightful! I am trying to follow the Data Science from Scratch by Joel Grus, and the book is good but very general on details.

  • @JoshuaPereiraJMPSUDTOD
    @JoshuaPereiraJMPSUDTOD 4 роки тому +2

    Thank you so much!
    I have been looking for a way to get the conda terminal for 3 days finally !!!!!

  • @besma702
    @besma702 6 місяців тому

    a life saveer thank youuuu

  • @arewenotsenal
    @arewenotsenal 11 місяців тому

    Thanks a lot man, really helpful even now

  • @hasanmalkoc8861
    @hasanmalkoc8861 Рік тому

    Thanks for video, I want to ask How can I add new library to my environment. Do I need just pip install when i choose py37

  • @janm20
    @janm20 2 роки тому +1

    Thanks, this was very helpful!

  • @SamChaneyProductions
    @SamChaneyProductions 2 роки тому +1

    Thanks, I got rid of the errors but VSCode still isn't working right. Intellisense doesn't suggest basic stuff like existing variable names, and I can't go to definition of functions in the same file, giving "no definition found" even when the function is defined right next to the call

    • @SamChaneyProductions
      @SamChaneyProductions 2 роки тому +1

      FINALLY found the solution. It was my Python Language Server in Settings which was set to None. I set it to Plyance, then restarted VSCode and it finally all works properly

  • @marshallsweatherhiking1820
    @marshallsweatherhiking1820 2 роки тому

    Thank you! I'm just trying to figure out an IDE to use on windows in conjunction with Anaconda. Unfortunately, I didn't like any of the ones that can be installed directly through anaconda. The stuff I'm working on has grown too complicated to conveniently run/test with the jupyter-notebook copy-paste / command-line / text-editor trio.

  • @priyadarshan4032
    @priyadarshan4032 4 роки тому +3

    I am getting an error :
    Your shell has not been properly configured to use 'conda activate'

    • @RickyMixMaster
      @RickyMixMaster 4 роки тому

      i have the same problem :/

    • @yongzuogoh5286
      @yongzuogoh5286 4 роки тому

      try conda init

    • @treychambers5755
      @treychambers5755 4 роки тому +2

      get rid of the word 'conda'... you should be using 'activate base' see video at 10:05

    • @mdrahmatullah75951
      @mdrahmatullah75951 4 роки тому

      try conda init powershell
      It works

    • @CapeSkill
      @CapeSkill 3 роки тому

      @@rexlaurus5894 thats because you're god awful at following the tutorial. All you have to do is change the default terminal.

  • @ridwanshittu617
    @ridwanshittu617 4 роки тому +2

    Thank you for this tutorial. I am able to set the path for my python.

  • @mdrahmatullah75951
    @mdrahmatullah75951 4 роки тому +1

    Can you please make vedio on jupyter notebook with anaconda interpreter with some environment in vs code.
    When I run .ipynb in vs code ,I get message in vs code
    Time out waiting to get a heartbeat from kernel.
    Please sort out this problem.

  • @theoceanman6221
    @theoceanman6221 2 роки тому

    I can use conda commands in the normal command prompt, but in VSC, they still don't work.

  • @nialld2638
    @nialld2638 Рік тому

    Hi, thanks so much for this. i am new to the area and trying to get set up. i have all the steps done but i notice in my vs code terminal when running python code that i get message "Shell integration failed to activate". i have followed all your other steps i can run in command prompt etc. Just wondering if you may have any tips on same?

  • @NuPhyAir75
    @NuPhyAir75 2 роки тому

    Thank you so much for this video!😁

  • @cleisonmanriqueaguirre8184
    @cleisonmanriqueaguirre8184 2 роки тому

    Why when I change the environment(conda activate "---" ) the python version remains with the previous environment ?

  • @zeeshanzafar4532
    @zeeshanzafar4532 11 місяців тому +1

    still helpful

  • @user-td1jj8ll8y
    @user-td1jj8ll8y 3 роки тому

    2:00 when witness protection kicks in

  • @christopherwilliams2682
    @christopherwilliams2682 2 роки тому +1

    I do not have Python Path in VS Code

  • @yourskoolboy
    @yourskoolboy Рік тому

    Thank you soooo much!!

  • @somnathbiradar8258
    @somnathbiradar8258 3 роки тому +1

    Thanks dear

  • @jaykaku7646
    @jaykaku7646 4 роки тому +1

    Thanks a lot for this

  • @lifeinthefoyer8687
    @lifeinthefoyer8687 Рік тому

    I've followed this video closely, but I am running into an issue where import as a command isn't functioning. I have been able to run any code from my VS scripts, very confusing. Any ideas on what to do next? I've selected my interpreter, typed python into my terminal, no luck. Any ideas?

    • @geospatialschool
      @geospatialschool  Рік тому

      @lifeinthefoyer8687 This video is a little dated and a few things have changed. My most recent content on this subject is this free course: geospatialschool.com/courses/python-quickstart/

  • @yt.pratyush
    @yt.pratyush Рік тому

    my code runs but the terminal says that the conda is not recognised

  • @JosephARomo
    @JosephARomo 3 роки тому +1

    i keep getting
    Original error was: DLL load failed while importing _multiarray_umath: The specified module could not be found.

  • @toti1724
    @toti1724 4 роки тому +1

    Importing the numpy c-extensions failed. :(

    • @techineer5714
      @techineer5714 4 роки тому

      he just gave an example by experimenting with numpy; He already downloaded numpy before hand, and you might not have. you can experiment by typing something like this:
      print('hello')

  • @Bot_Tech.
    @Bot_Tech. 4 роки тому

    how to solve mypy problem in python 2.7 in vscode?

  • @alejandrososa1732
    @alejandrososa1732 4 роки тому

    I accidentally turned conda interpreter on how do I turn it off???

  • @gooadify
    @gooadify 4 роки тому +1

    This works... but it really isn’t the advised way to do it.. anaconda doesn’t add itself to the path because it can “interfere with other software” which you even mention in your video.. then proceed to add it to the path anyway...

  • @anditheslayer7357
    @anditheslayer7357 4 роки тому +1

    Thank you so much!

  • @kaijiahuang1141
    @kaijiahuang1141 4 роки тому +1

    thank you !

  • @lucaas_pg
    @lucaas_pg 4 роки тому +1

    THANK YOUUUUU!

  • @sarvocchgupta1413
    @sarvocchgupta1413 4 роки тому

    I'm not able to add multiple path values under path variables in the environment variable settings on Windows 8.1, the next value overwrites the previous one. Anyone with similar issue?

    • @boruut2909
      @boruut2909 4 роки тому

      WIndows 8.1, like WIndows 7, has a single line dialog to edit the path variable. To add paths to the path variable, use semicolon between paths. Be careful not to accidentaly delete existing paths. I suggest you to copy whole variable content to a text editor, edit the paths there and paste them back to the variable by overwriting all the existing ones.

  • @mauriciomolina592
    @mauriciomolina592 3 роки тому

    I fucking love you bra.

  • @SiavashSiavashS
    @SiavashSiavashS 3 роки тому

    Windows 7 is a little different when you click on the path :(

  • @shruh493
    @shruh493 4 роки тому

    we cant activate base environment in powershell, conda commands works in cmd shell after activating conda base environment in terminal

  • @alexanderhrachov6270
    @alexanderhrachov6270 4 роки тому +1

    Importing the numpy c-extensions failed. help ((

    • @techineer5714
      @techineer5714 4 роки тому

      he just gave an example by experimenting with numpy; He already downloaded numpy before hand, and you might not have. you can experiment by typing something like this:
      print('hello')

  • @SparklingWalrus
    @SparklingWalrus 3 роки тому

    LMFAO it still doesn’t work, screw windows

  • @definty
    @definty 3 роки тому

    The only reason you don't need 'conda activate env' is becuase you added Scripts which has activate.bat init.

  • @andresfrodri
    @andresfrodri 3 роки тому +1

    Thank you!