Это видео недоступно.
Сожалеем об этом.
How to install Python Libraries in Visual Studio Code
HTML-код
- Опубликовано: 14 авг 2024
- This video is a quick tutorial on how to import Python Libraries when using Visual Studio Code.
I had been trying to figure this out for myself but could not find good tutorials on the internet so thought I should make one. For the purpose of this video, we'll use matplotlib in python as an example.
Timestamps:
0:00 Introduction
0:25 Create and open a New Folder
0:59 Problem Description (matplotlib as an example)
1:33 Create a Virtual Environment in Python Project
2:18 Resolving the import issue (pip install)
2:48 Run the program
2:57 Conclusion
----------------------------------------------------------------------------
Hey!
I am Aditya Thakur, a Developer and Designer. I make videos on Flutter, Python, and other technologies. I also sometimes take up Profile Building and entrepreneurship!
💙 Learn how to use Flutter with Firebase: • FlutterFire - Free Fir...
🎬 Python Debugged Playlist: • Python Debugged
📚 PROMOS
Get an exclusive 10% discount on every GeeksforGeeks course!!
Use code: ADITYAT
Check out courses here: practice.geeks...
💰 INVESTMENT APPS
Create a free account | Binance: accounts.binan...
Trade at India’s largest exchange | WazirX: wazirx.com/inv...
I post stories about my life and business on my Instagram - / adityathakurxd
Want to talk business? Or ask a question?
Reach out to me on LinkedIn: / adityathakurxd
----------------------------------------------------------------------------
Become a part of my community! (100+ Developers already 🥰)
Link to Discord/Telegram: linktr.ee/flut...
Thank you for watching!
Hope this video helped you.
Leave a comment and do Subscribe the channel. Cheers!
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"
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 :)
@@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 ;)
@@robertruta687 Cheers mate, thank you. I get the gist of it now
Thanks a lot!
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
Thank you so much! I have been searching for an easy to follow explanation like this for so long!
Thank you :) I am glad.
@@AdityaThakurXD help me fix this
import requests could not be resolved from source vscode
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!
To create virtual environment:
-> py -m venv env
To activate virtual environment:
-> .\env\Scripts\activate
To deactivate virtual environment:
-> deactivate
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!
@@MrMenace3210 Same here
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
man, this is perhaps the best (the shortest and brief) video to solve the problem. thank you very much
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
Thank you for a well produced straightforward tutorial. Learned what I needed to without all the bs. 👍
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.
Thank you so much. I struggled with this all day.
You should be the second comment in the list tysm
Please what's the correct interpreter
you sir are the goat
I am trying to do so but nothing is changing
thanks a lot, I spent nearly a week and tried many ways but nothing actually happened until I followed your instructions. Many thanks!!!!!!!!!
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.
Thanks man, I have been trying to find the solution almost all day but this one thing cracked it for me finally! :)
Thanks Bhaiya i have a question can we run pandas by this method
By writing pip install pandas
I can't believe I need this vedio even after I have been a senior student.
Thank you, brother. I couldn't solve this same problem but with Numpy. The bookcase was underlined in yellow and I couldn't execute my arrangement. Now with your steps I managed to execute my script. Thank you!!
If python --version does not work use py --version in cmd
also use py instead of python in vscode
thanks bro, I was having this problem
hey , mine doesnt show the green venv but I'm not sure. any help?
my also its not showing but everything is working fine on pc
bro same issue idk what to do
Been stuck for ages ! Thanks so much. This shit about installing libraries takes 90% of my "coding" time.
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 )
Thanks sir it’s the eisiest way you can display your graphs keep going sir
You don't have to spell out the entire path of the venv folder. You can just type ".venv". This works because '.' is macro for current working directory's absolute path. So, the command should be "python -m venv .venv".
Another tip: if you're on Windows and you’ve used the official python installer, there should be a py.exe in your system path. You can use py the same way you use the python exe, it's purpose is to automatically select the most up to date python installed on your system. This isn’t relevant to the video as much but I thought this was something everyone should know.
tq i got acces denied so many times until use the venv .venv haha
@@frydoichmarwienanta4760 same
What do you mean by system path ?
Thanks bro...
Imagine I had to come back here again. Thanks Thakur!
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?
Same problem!What to do?Did u find a solution?
I think you have to create a new terminal and paste the powershell file path (Activaet.ps1), then press enter.
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
Does this method also work when we want to use Numpy and Pandas?
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
Omg thankyou so much I cant believe I was trying to import using the terminal rather than the code space👀
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
Great video, I am not getting the green (venv) can you help please, thanks
Yeah me too
Same
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
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 ?
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....
@@roshanleanage1275 Which version did you go back to?
this worked! Be sure to have powershell as your terminal type.
thank you so much, I browsing for hours until I found your tutorials,,,very simple to solve the problem
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?
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.💓
Glad it helped. Thank you so much!
I don't have slightest idea about coding but you fixed my problem.
WOW THIS INDIAN FRIEND SAVED MY LIFE!
I been stuck like almost 3 week until I saw this video, THANKS YOU!!!!!
Thank you, I been trying to do this for 2 days . Watching your video I finally figure it out..Thanks
Thank you so much for your video sir.I was looking for this for hours.Finally I got it
Python was not found; run without arguments to install from the Microsoft Store, or disable this shortcut from Settings > Manage App Execution Aliases.
bro i am facing this error . can someone assist me on how to fix it?
Thank you. Very short and to the point and It works.
very thank you sir, i had trouble running pygame code. I fixed it now. thanks. Keep making these type of videos.
Getting error of excess denied
Run the actual power shell as an administrator then enter : Set-ExecutionPolicy RemoteSigned
Then click Yes
THNXXXX I HAD THE ERROR AND CORRECTED IT FOLLOWING THE STEPS IN YOUR FIRST COMMENT ^^
thanks bhai 😁i am watching this in 2024 and still it is very helpful for me
God bless you and thank you for everything, fellow knowledge seeker 👋
bro, this save my life, thanks
it just says "no module named venv" whenever I try. can someone help me with this please
HATSS OFF I WAS SEARCHING FROM WHEN LIKE SUPER QUICKLY !!!THANKYOU U MADE ME EASY
Thank you so much. It took me a day to get results from you
Brother it will really prove to be helpful for me... Thanks for sharing❤
I am glad ✨ Thank you for leaving a comment. 💯
Okaya this was my 6th video and finally I could do it.. Thanks
Thnq sir for this fruitful video
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.
Thank you so much sir ❤️
Thank you very much. Your video was very helpful
finally some one with this wallpaper!
I've got an error when I try to install the venv, it's say : Python was not found. I'ld like to install pandas, numpy etc but I can't find a solution. Thank you
Did you get a fix?
good video, you did good with this one.
Thank you for the tutorial very simple to understand. However I have a question, do we do this for all of our projects or is there a way you can store the modules once so that you can use them again?
Aree sir ji big fan... Great Video 🔥
Thanks a lot bhai 💯💯
Thank you so much For your better explanation.
this tutorial was what i was looking for thank you !!
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?
Great video! It really worked out for me. Thanks for making very short and sweet
I recommend your videos. so helpful
thank you soo much , it really solved my problem ,
Thank you Aditya for the video🙏
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
thank you so much bro this helped me a lot. love the way you make understand. thanks a lot 😀
gr8 vid bro, thanks for making
Thank you finally I can install pywhatkit tq.....😊😊
INFORMATIVE VIDEO BTW THANKS A LOT!!!
I GOT INSTALLED PANDAS
Thanks Aditya...This video is really helpful.
Simple and clean no messy things thanks bro
nice job man i really need those vids
hats off to you
👌👌👌👌
Python was not found; run without arguments to install from the Microsoft Store, or disable this shortcut from Settings > Manage App Execution Aliases. Sir What i Do?
really a helpful , thanks for sharing ,,,
Yess thank you! exactly what I was looking for!
If you encounter could not be loaded because using script is disable the nuse following command in windows power shell
Set-ExecutionPolicy -ExecutionPolicy Unrestricted -Scope CurrentUser
thank you so much! very helpful!
Great job... 👏
Thank you 😭❤️
Ey men I fix it, thanks for this video!!!
Thanks sir for Your help I was really worried for a moment their
Worked perfectly! Thanks.
Hi great video. Can we do the exact same thing but install forecasting packages like pmdarima , prophet etc instead of matplotlib?
Gzzzzz dude, ty so much, I spend hours trying to solve it with no success
You explained it really well. Thanks a lot. So can we do this for the R language as well?
I would thank you so much, it helped me a lot.. Thanks bro.
It works thanks brother ❤❤❤
Bless up mahn. This was so helpful.
Thank you Thakur saab
Thanks a lot Aditya , u helped me out a lot
Hello, Thank you so much for the content. I was really struggling with installation. This video really helped me out. 😄😄
that did not work for me, but something else did, i clicked on
Activate.ps1 under Scripts under Project and ran the entire file and the green (.venv) suddenly appeared
that did not work for me, but something else did, i clocked on
Activate.ps1 under Scripts under Project and ran the entire file and the green (.venv) suddenly appeared
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.
thank you so much ..keep making such informative videos
When I tried to install a some library using "pip" comand, this message appears in yellow:
"WARNING: pip is configured with locations that require TLS/SSL, however the ssl module in Python is not available".
I'm using windows 10.
Super helpful, thank a lot)
Awesome video man, much appreciated!