How to install Python Libraries in Visual Studio Code

Поделиться
HTML-код
  • Опубликовано: 25 дек 2024

Комментарии • 584

  • @robertruta687
    @robertruta687 3 года назад +629

    For those missing green (venv). Solution:
    after you have typed the command "python -m venv ..." and have hit enter as my man Aditya does at 2:05 and have waited for it to make the venv directory, type into the terminal the following line:
    venv\scripts\activate
    and hit enter. Done. You should now how the green (venv) and be working with your virtual environment.
    !!ERROR!!
    If an error pops up about permissions or access being denied or something, go ahead and type into the terminal (you might want to reverse this change after you have done it btw, so read about this if you concerned):
    Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope Process
    and try executing "venv\scripts\activate" in the terminal again.
    !!ADDITIONAL POSSIBLE FIXES!!
    - make sure you're terminal is working in the correct directory (for example: C:\Users\Asus\Desktop\Project>) before executing "venv\scripts\activate"

    • @tanushsavadi988
      @tanushsavadi988 3 года назад +12

      Hey bro, thank you! May I know what 'Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope Process' does, please? Also, do you know how to revert back, please? Thank you :)

    • @robertruta687
      @robertruta687 3 года назад +19

      @@tanushsavadi988 I can’t give you a high level answer to this question, however, I can tell you for sure that it grants you permission to execute scripts. The -scope process makes it so that this permission is returned to its default value as soon as you’re done with whatever you’re currently doing. If you want to permanently grant yourself permission to execute these scripts, you just have to remove the “-scope process” part.
      In summary, you can using that command without worrying because all is returned to its original state after you’ve used venv\scripts\activate ;)

    • @tanushsavadi988
      @tanushsavadi988 3 года назад +6

      @@robertruta687 Cheers mate, thank you. I get the gist of it now

    • @bikikumarsahkalwar8477
      @bikikumarsahkalwar8477 3 года назад +2

      Thanks a lot!

    • @Jacob11227
      @Jacob11227 3 года назад +15

      hey for some reason after i installed the library i want the venv folder is still there unlike Aditya's and ist sayin there is no module called that

  • @noiiz666
    @noiiz666 2 года назад +5

    man, this is perhaps the best (the shortest and brief) video to solve the problem. thank you very much

  • @durb5259
    @durb5259 3 года назад +12

    I litterly searched this up because i needed to make a graph in python for school and u actually just did it with a graph xD

  • @huynna664
    @huynna664 2 года назад +1

    thanks a lot, I spent nearly a week and tried many ways but nothing actually happened until I followed your instructions. Many thanks!!!!!!!!!

  • @alexandrespiri4297
    @alexandrespiri4297 2 года назад

    Been stuck for ages ! Thanks so much. This shit about installing libraries takes 90% of my "coding" time.

  • @jeff3608
    @jeff3608 4 года назад +53

    Thank you so much! I have been searching for an easy to follow explanation like this for so long!

    • @AdityaThakurXD
      @AdityaThakurXD  4 года назад +4

      Thank you :) I am glad.

    • @YashvirGaming
      @YashvirGaming 3 года назад +1

      @@AdityaThakurXD help me fix this
      import requests could not be resolved from source vscode

  • @itsarshadahmad
    @itsarshadahmad 3 года назад +57

    To create virtual environment:
    -> py -m venv env
    To activate virtual environment:
    -> .\env\Scripts\activate
    To deactivate virtual environment:
    -> deactivate

    • @MrMenace3210
      @MrMenace3210 2 года назад +5

      you haven't even got the same syntax/arrangement as the video or the top example, yet your is the only one that works for me. Very grateful!

    • @kyberghost3607
      @kyberghost3607 9 месяцев назад

      @@MrMenace3210 Same here

  • @juhasimpson5412
    @juhasimpson5412 11 месяцев назад

    I can't believe I need this vedio even after I have been a senior student.

  • @marceloquesada8304
    @marceloquesada8304 3 года назад +44

    Thanks so much, i´ve been trying to solve this for ages and your tutorial was the first that i found that was intuitive and easy to follow, keep up the good work!

  • @johnreskusich2324
    @johnreskusich2324 2 года назад +8

    Your explanation is awesome. Been trying to figure it out for hours and I saw your video and it fixed everything. Much appreciated. Thank you

  • @RAWRCoding
    @RAWRCoding 2 года назад +52

    If VS Code is still throwing an error about the library import, make sure you select the correct interpreter (CTRL+SHIFT+P) and type "Interpreter" and choose the correct one.

    • @totsh2056
      @totsh2056 2 года назад +2

      Thank you so much. I struggled with this all day.

    • @gianlucaalfieri3607
      @gianlucaalfieri3607 Год назад +1

      You should be the second comment in the list tysm

    • @meekykols2917
      @meekykols2917 Год назад +1

      Please what's the correct interpreter

    • @casagrande__2526
      @casagrande__2526 Год назад

      you sir are the goat

    • @rajatdang8973
      @rajatdang8973 Год назад

      I am trying to do so but nothing is changing

  • @patrickkutal7166
    @patrickkutal7166 Год назад +2

    Thanks man, I have been trying to find the solution almost all day but this one thing cracked it for me finally! :)

  • @willykitheka7618
    @willykitheka7618 2 года назад

    Imagine I had to come back here again. Thanks Thakur!

  • @GreenSpeedPRO
    @GreenSpeedPRO 2 года назад

    I don't have slightest idea about coding but you fixed my problem.

  • @Gabugaburere
    @Gabugaburere 3 года назад +1

    If anyone is having trouble with installing using pip install ...
    First upgrade pip: py -m pip install --upgrade pip
    Otherwise, thanks so much Aditya! My man

  • @Nisal6868
    @Nisal6868 2 месяца назад

    you deserve a nobel price man
    thank you

  • @carlospincheira532
    @carlospincheira532 3 года назад

    I been stuck like almost 3 week until I saw this video, THANKS YOU!!!!!

  • @FriedPawnsForDinner
    @FriedPawnsForDinner 2 года назад

    Omg thankyou so much I cant believe I was trying to import using the terminal rather than the code space👀

  • @pumkinkidd1165
    @pumkinkidd1165 2 года назад

    bro you dont know how much u just saved me, ive been using vms and was gonna get a laptop cause my pc was being weird, this saved me tysm

  • @kidtoucher302
    @kidtoucher302 2 года назад

    WOW THIS INDIAN FRIEND SAVED MY LIFE!

  • @MaxamedAxmed-h9e
    @MaxamedAxmed-h9e Год назад

    Thanks sir it’s the eisiest way you can display your graphs keep going sir

  • @fakebuddy5390
    @fakebuddy5390 2 года назад +1

    bro huge thx
    its 5 pm
    i was trying to execute my project from morning itself but again n again m getting same error ,, but after watching this tutorial i got to know virtual environment is must thing
    thx buddy again
    (i m new to python )

  • @cyrix_1
    @cyrix_1 3 года назад +22

    Thank you for a well produced straightforward tutorial. Learned what I needed to without all the bs. 👍

  • @troychalmers3646
    @troychalmers3646 2 года назад +1

    thank you very much, it worked first time for me. I remember needing to do this in the spyder IDE but either it was easier or I had a teacher holding my hand the whole way

  • @chrisjones469
    @chrisjones469 3 года назад +5

    Thank you for this! I was following a Python tutorial, but I didn't want to use a new editor. I was having issues using Python modules until watching this.

  • @rosspatel3526
    @rosspatel3526 2 года назад

    this worked! Be sure to have powershell as your terminal type.

  • @yasminadjebbara7793
    @yasminadjebbara7793 2 года назад

    THNXXXX I HAD THE ERROR AND CORRECTED IT FOLLOWING THE STEPS IN YOUR FIRST COMMENT ^^

  • @earlsandersjr.2023
    @earlsandersjr.2023 3 года назад

    Thank you, I been trying to do this for 2 days . Watching your video I finally figure it out..Thanks

  • @mohammedarmankhan2152
    @mohammedarmankhan2152 Год назад

    Take love brother from Bangladesh. This vedio is very helpful for me.And easily solved my problem.I think you create more vedio.Thank you.💓

  • @mingji753
    @mingji753 2 года назад

    very thank you sir, i had trouble running pygame code. I fixed it now. thanks. Keep making these type of videos.

  • @dishakumbhar3657
    @dishakumbhar3657 3 года назад

    HATSS OFF I WAS SEARCHING FROM WHEN LIKE SUPER QUICKLY !!!THANKYOU U MADE ME EASY

  • @rafikamara1274
    @rafikamara1274 Год назад

    God bless you and thank you for everything, fellow knowledge seeker 👋

  • @kumarabhilasha4
    @kumarabhilasha4 2 года назад

    Okaya this was my 6th video and finally I could do it.. Thanks

  • @Userisnmuh
    @Userisnmuh 3 года назад

    thank you so much, I browsing for hours until I found your tutorials,,,very simple to solve the problem

  • @hitanshujena7470
    @hitanshujena7470 8 месяцев назад

    thanks bhai 😁i am watching this in 2024 and still it is very helpful for me

  • @nithyalakshmigurupackiam2186
    @nithyalakshmigurupackiam2186 2 года назад +1

    Thank you so much for your video sir.I was looking for this for hours.Finally I got it

  • @mikdarmohammed6512
    @mikdarmohammed6512 Год назад

    Thank you so much. It took me a day to get results from you

  • @SreejithS-v2h
    @SreejithS-v2h Год назад

    Thank you. Very short and to the point and It works.

  • @rishupranjal
    @rishupranjal 4 года назад +3

    Brother it will really prove to be helpful for me... Thanks for sharing❤

    • @AdityaThakurXD
      @AdityaThakurXD  4 года назад +1

      I am glad ✨ Thank you for leaving a comment. 💯

  • @therzook
    @therzook 3 года назад

    I tried to do venv several times... finally got it thank you. sometimes we all hit roadblock which is like a fart in a spacesuit, life

  • @mohd.irfanlohar4544
    @mohd.irfanlohar4544 3 года назад +4

    Thanks Bhaiya i have a question can we run pandas by this method
    By writing pip install pandas

  • @deepalijoshi3203
    @deepalijoshi3203 2 года назад

    Thanks Aditya...This video is really helpful.

  • @delphi5373
    @delphi5373 2 года назад

    bro, this save my life, thanks

  • @PrankIncluded
    @PrankIncluded 3 года назад +1

    Thank you so much sir ❤️

  • @bksl
    @bksl Год назад

    Thank you so much For your better explanation.

  • @travissherman9979
    @travissherman9979 3 года назад +8

    hey , mine doesnt show the green venv but I'm not sure. any help?

    • @shreyamkumar7210
      @shreyamkumar7210 3 года назад +1

      my also its not showing but everything is working fine on pc

    • @drissou76
      @drissou76 3 года назад

      bro same issue idk what to do

    • @Ritu-u8g
      @Ritu-u8g 2 месяца назад +1

      venv\Scripts\activate - try this in terminal

  • @SteveOkyere-Gyamfi
    @SteveOkyere-Gyamfi Год назад

    Thank you very much. Your video was very helpful

  • @sasipanakal4458
    @sasipanakal4458 Год назад

    Thank you Aditya for the video🙏

  • @superhumano-ai
    @superhumano-ai Год назад

    Worked perfectly! Thanks.

  • @sopino155
    @sopino155 Год назад +1

    Hi Aditya, thank you for the tutorial. When I follow your instruction and try to create ve, console says that my command not found. I just started using VS and probably I am missing some extensions?

  • @kailashpoongundran970
    @kailashpoongundran970 2 года назад

    nice job man i really need those vids
    hats off to you
    👌👌👌👌

  • @galactus4829
    @galactus4829 Год назад

    thank you so much bro this helped me a lot. love the way you make understand. thanks a lot 😀

  • @nabink9956
    @nabink9956 2 года назад

    Great video! It really worked out for me. Thanks for making very short and sweet

  • @rhythmgupta1615
    @rhythmgupta1615 2 года назад

    thank you so much ..keep making such informative videos

  • @killuakillua8876
    @killuakillua8876 2 года назад

    thank you soo much , it really solved my problem ,

  • @abhisheksaini7973
    @abhisheksaini7973 3 года назад +5

    If you are still having errors after performing everything then , actually python 3.9 and 3.10 might have some issue installing libraries, so try installing an older version like 3.8

    • @georgemanuelajan8263
      @georgemanuelajan8263 2 года назад

      hey i think i have this problem because after doing all like the video python still say me that he don't find matplotlib, so how can i install an older version please ?

    • @roshanleanage1275
      @roshanleanage1275 2 года назад

      You are spot on !!! I had this problem with installing pandas in 3.9. Once I went back to a older version everything was working....

    • @synaxreader9326
      @synaxreader9326 2 года назад

      @@roshanleanage1275 Which version did you go back to?

  • @jrrr92-fx
    @jrrr92-fx 2 года назад +1

    this tutorial was what i was looking for thank you !!

  • @danielhornsby1100
    @danielhornsby1100 3 года назад +1

    Yess thank you! exactly what I was looking for!

  • @KhushiSharma-sr6pw
    @KhushiSharma-sr6pw Год назад +2

    I have done the same till installing matplotlib but after that it is again showing no module found

  • @ACAPAR
    @ACAPAR 2 года назад

    I would thank you so much, it helped me a lot.. Thanks bro.

  • @raghavanand27
    @raghavanand27 4 года назад +2

    Aree sir ji big fan... Great Video 🔥

  • @sankettank6193
    @sankettank6193 2 года назад

    INFORMATIVE VIDEO BTW THANKS A LOT!!!
    I GOT INSTALLED PANDAS

  • @nehakathuria89
    @nehakathuria89 6 месяцев назад

    Thnq sir for this fruitful video

  • @maxkipchumba7604
    @maxkipchumba7604 Год назад

    Bless up mahn. This was so helpful.

  • @jonasschaeferjunior7274
    @jonasschaeferjunior7274 3 года назад +1

    Gzzzzz dude, ty so much, I spend hours trying to solve it with no success

  • @junaid_qadir
    @junaid_qadir 2 года назад +5

    Hi thanks for the short video clip. I created virtual environment with your method, but it cannot activate like a green color on your screen (venv). Can you please let me know how can I activate it?

    • @priyadarshnisundararajan5774
      @priyadarshnisundararajan5774 10 месяцев назад

      Same problem!What to do?Did u find a solution?

    • @srivenkateshakula2048
      @srivenkateshakula2048 7 месяцев назад

      I think you have to create a new terminal and paste the powershell file path (Activaet.ps1), then press enter.

  • @alnoorratansi9364
    @alnoorratansi9364 3 года назад +8

    Great video, I am not getting the green (venv) can you help please, thanks

  • @yashwanth31415
    @yashwanth31415 2 года назад

    Thanks a lot..... Your explanation is really awesome!!

  • @bigdaddy-k2u
    @bigdaddy-k2u 2 года назад

    gr8 vid bro, thanks for making

  • @cayoaponte9450
    @cayoaponte9450 4 года назад +1

    Awesome video man, much appreciated!

  • @premthapa9959
    @premthapa9959 3 года назад

    Thanks a lot Aditya , u helped me out a lot

  • @rignitegroup
    @rignitegroup Год назад

    I recommend your videos. so helpful

  • @The_Dark_Phoenix_GD
    @The_Dark_Phoenix_GD Год назад

    Thank you finally I can install pywhatkit tq.....😊😊

  • @hectorpeaceful2341
    @hectorpeaceful2341 4 месяца назад

    I reach a point in my programming career where I watch some indian guy fix my problems with his indian magic
    Congratulate me

  • @andresarriagagarcia2241
    @andresarriagagarcia2241 3 года назад +1

    Thank you so much bro! It was very helpful

  • @richardmassie
    @richardmassie 2 года назад

    Its solved my problem, thanks a lot👍

  • @nikitha28
    @nikitha28 2 года назад

    Hello, Thank you so much for the content. I was really struggling with installation. This video really helped me out. 😄😄

  • @AmanuelBerhanuTsehay
    @AmanuelBerhanuTsehay Год назад

    finally some one with this wallpaper!

  • @rsivakanth
    @rsivakanth 3 года назад

    Awesome Aditya, thanks for this short and simple video, but very valuable one :-)

  • @anandar3953
    @anandar3953 3 года назад

    Simple and clean no messy things thanks bro

  • @professormhassan6703
    @professormhassan6703 9 месяцев назад

    Thank you for this, really helpful. Wanted to ask about anaconda along with vs code; thought downloading anaconda brings all the libraries and no need for individual pip installs. First is that true? If yes how to get anaconda support in vs code? Of not, is there a shorter way to get all or most libraries in one go instead of one by one pip install into the venv?

  • @ayushbhardawaj9506
    @ayushbhardawaj9506 2 года назад

    Thanks sir for Your help I was really worried for a moment their

  • @gustavoalmeida624
    @gustavoalmeida624 3 года назад

    Thanks from Uruguay!

  • @swastikaggarwal221
    @swastikaggarwal221 Год назад

    really a helpful , thanks for sharing ,,,

  • @piratesofphysics4100
    @piratesofphysics4100 2 года назад

    This video is very helpful 😍

  • @brutexx2
    @brutexx2 Год назад

    Thank you for the tutorial! :D

  • @robertocianciulli2445
    @robertocianciulli2445 2 года назад

    I've to repeat every time i need those packages this procedure with venv? Or it has to be done just once and i can use such packages. Thank you in advance bro.

  • @dineshkanakaraj956
    @dineshkanakaraj956 3 года назад +3

    bro u r really awesome, i was trying to import cx_Oracle in vs code for the past two days i tried every possible way. Im fraustraded to the core while watching ur video, but after it was not the same it is working. Thanks lot. go great heights.

  • @geovanisi3441
    @geovanisi3441 2 года назад

    Thank you man , you really helped mee !!!!

  • @migueljimenez9060
    @migueljimenez9060 3 года назад +1

    Ey men I fix it, thanks for this video!!!

  • @dewangverma2319
    @dewangverma2319 2 года назад

    thanks bro ..it helps me a lot🙏

  • @juansteiven2441
    @juansteiven2441 3 года назад +3

    Does this method also work when we want to use Numpy and Pandas?

  • @enderalex300
    @enderalex300 8 месяцев назад

    good video, you did good with this one.

  • @denisleonte9762
    @denisleonte9762 3 года назад

    you have been a big help for me, thank you very much

  • @digitizzein1462
    @digitizzein1462 3 года назад +3

    Hey Aditya, Hope you are doing good. I am getting permission denied error while using pip in vs code. Can you help me ? Would be great help.
    Thanks

  • @neelamthakur72
    @neelamthakur72 4 года назад +2

    Great job... 👏

  • @RajeshYadav-dv1kj
    @RajeshYadav-dv1kj 11 месяцев назад

    nice explained

  • @lucasito7332
    @lucasito7332 3 года назад +1

    thanks man, you helped me, together on this(i'm Braziliam bro and i learning english, so correct me if you can)

  • @ענבריזרעאל
    @ענבריזרעאל 3 года назад +2

    thank you so much! very helpful!

  • @rayantalwar8315
    @rayantalwar8315 5 месяцев назад

    Hi great video. Can we do the exact same thing but install forecasting packages like pmdarima , prophet etc instead of matplotlib?