Тёмный

Python Virtual Environments - Full Tutorial for Beginners 

Tech With Tim
Подписаться 1,6 млн
Просмотров 67 тыс.
0% 0

Опубликовано:

 

28 авг 2024

Поделиться:

Ссылка:

Скачать:

Готовим ссылку...

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 77   
@TechWithTim
@TechWithTim 5 месяцев назад
If you want to land a software developer role check out my program with CourseCareers: techwithtim.net/dev
@pietrovalentinoyannellihan3883
@pietrovalentinoyannellihan3883 5 месяцев назад
Hello, i followed your instructions In the video to deploy a flask app in Ubuntu but It didnt work, It shows me the 403 forbidden error, im using plesk, does that Matter?
@pietrovalentinoyannellihan3883
@pietrovalentinoyannellihan3883 5 месяцев назад
I already located the correct files with cd
@agentm10
@agentm10 5 месяцев назад
One small comment, venv folders are usually named .venv so that they are hidden, and they also should be part of your git ignore if you put them in the same folder as your .py files. I usually have the .venv folder a level up from the .git directory, so that there is no issue with commits if you forget to put them in .gitignore. Fantastic video as usual!
@Helli__
@Helli__ 5 месяцев назад
Great video! As a Python beginner myself, I think virtual environments should be the first thing to learn after the basics. Even if you're just messing around with some package you're trying out, it makes it so much easier to keep your projects organized. It also helps with learning further packages etc.. Want to learn Flask? Just make a new environment for it, keeping everything together and contained, without cluttering your Python installation(s).
@JohnS-er7jh
@JohnS-er7jh 2 месяца назад
Another awesome video. Corey Schafer 's channel and Tech With Tim are my two favorite Python channels, and of course you can learn a lot more then just python. Thanks for posting more great content.
@dezly-macauley
@dezly-macauley 5 месяцев назад
Great video TIm! I honestly think this is the first thing that beginners should learn before even writing their first "Hello world". Knowing the best practice of how to correctly setup a project in programming language will reduce future headaches, and allow one to focus on writing code.
@WayneCaissie-armatechnicos
@WayneCaissie-armatechnicos Месяц назад
Wow. Gotta watch this again! I’m so grateful. Just learning to code a bit for fun but never quite could get the hang of it virtual environments. This cleared everything up. So glad I stumbled on your channel. Definitely a new subscriber.
@Al_Miqdad_
@Al_Miqdad_ 5 месяцев назад
thanks that was very helpful I was diving in this in the last days 😂 do more videos May Allah guide you to his path ❤
@brianhotton2262
@brianhotton2262 5 месяцев назад
Thanks for the great video. I was just learning about virtual environments via some python training I’m taking at work. We are slowly trying to migrate from being a SAS programming shop to using python to code. After watching your video, I learned some additional details that weren’t covered in that training. Got to add some of what you said into my class note. Appreciate the content you’re making. I’ve seen a few of your other videos and they’re always very clear and informative. Keep up the great work.
@Gndt1
@Gndt1 3 месяца назад
Excellent video. Clear, concise and informative.
@courtneycurtis
@courtneycurtis День назад
This was a fantastic tutorial! Thank you so much.
@zenmushie
@zenmushie 5 дней назад
great video, easy to understand. thanks for making it!
@yadhumanikandan7220
@yadhumanikandan7220 5 месяцев назад
Can you do docker tutorial too.
@chriskeo392
@chriskeo392 5 месяцев назад
I need that docker compose tutorial asap😅
@yadhumanikandan7220
@yadhumanikandan7220 5 месяцев назад
yeaahhhh!!! 😆@@chriskeo392
@sw-code6027
@sw-code6027 5 месяцев назад
​@@chriskeo392 did you found any good tutorial?
@co48756
@co48756 5 месяцев назад
Your delivery on Python topics are the best on RU-vid.
@mathiaselorm5996
@mathiaselorm5996 5 месяцев назад
As beginner, after learning python basics, virtual environment is the next thing to learn. It will help you when start learning Django or Flask frameworks. Great video 👍👍👍
@JohnColgan.
@JohnColgan. 5 месяцев назад
Back in CPM days, PIP was acronym for Peripheral Interchange Program. Used for copting files to another drive or device
@311DaveR
@311DaveR 5 месяцев назад
Yep - I used a Z80 processor board on my Apple 2. It brings back memories as well. :)
@Oodle-ox2vf
@Oodle-ox2vf 5 месяцев назад
Good video, not too slow, stayed on topic, works for me. 🙂
@hiasvonminga4948
@hiasvonminga4948 5 месяцев назад
Hi Tim, again a very tutorial, thank you! I am really with you - anybody who can benefit from this tutorial probably should stick with venv because it is just there. It would be interesting for me, how the different tools relate and differ. I know that anaconda is oriented towards data science… but what does that actually mean? Anything I can do in anaconda I can’t do with venv? Another question: how do vscode and venv interact? A tutorial how to use environments in vscode and how to use the environment once programming is done. Also, how to handle the environment when I want to pull a project from git? Do I have to use the same tool the maintainer used to recreate the project‘s environment or can I still rely on venv? Thanks for your work, it is a very nice display for your paid course!
@chinzorigyou
@chinzorigyou 4 месяца назад
Thanks bro. I wonder why this kind of Python related tutorials rare?
@alexis_suarez
@alexis_suarez 4 месяца назад
This is exactly what I was looking for, really useful
@sneakyblinder982
@sneakyblinder982 Месяц назад
Easy and simple explanation!!!
@MiroKrotky
@MiroKrotky 5 месяцев назад
Thank you i had a slight mish-mash in my head about this from multiple tutorials
@tokenizedgameplay
@tokenizedgameplay 3 месяца назад
Thanks Tim, you made it look easy
@BillAugersdca
@BillAugersdca 5 месяцев назад
When you show the four common choices for virtual environments at <a href="#" class="seekto" data-time="91">1:31</a>, you seem to equate virtualenv with venv as the images display on screen. Beginners should understand that virtualenv is a third-party tool.
@johnidouglasmarangon
@johnidouglasmarangon 5 месяцев назад
Nowadays it is difficult to work without virtual environments especially if you work on more than one Project at the same time. I like using pyenv because I can easily install new versions of Python and create or remove envs . pyenv has an interesting set of CLI commands.
@AutobotsTransform
@AutobotsTransform 7 дней назад
Hi Tim, I am very confused when to use pip or pip3? I rather use pip because easier to type. Please advise. Thx
@anutarobert3022
@anutarobert3022 3 месяца назад
TIM you are GOOOD!
@thecarlostheory
@thecarlostheory 2 месяца назад
Hos useful this is gonna be. Thank u a lot!!!!
@1979Tron
@1979Tron Месяц назад
This was great. thanks!
@InSterquiliniisInvenitur
@InSterquiliniisInvenitur 23 дня назад
Great video. The only suggestion is that the effects in the presentation are very distracting and take away from the content.
@KumR
@KumR 5 месяцев назад
I always had one question Tim. Hope you can clarify. Lets say I create two virtual environments A and B. I do a pip on both and install libraries like Numpy, Pandas, TF, sklearn on both A and B, will that not occupy disk space? Does that mean for every project we do locally, the disk space gets consumed not just for code but these duplicate libraries too ? Is there an option to share a library between two virtual environments (if same version is needed) ? Please clarify
@beotiger
@beotiger 5 месяцев назад
Yes, every project you create in venv occupies its own disk space. And no, there is no such option to share same libraries between venvs for it makes no sense. You create venv to be isolated from other venvs so you should not and must not share any libraries berween them.
@academicegg6042
@academicegg6042 Месяц назад
If you are concerned about disk space, then delete the virtual environment folder when you are done with the project. If you need to revive your project, you can run the requirements.txt to install the packages in the environment and get going.
@esrx7a
@esrx7a 5 месяцев назад
Holy Tim!, thanks for that. Is venv the standard or the conda environment?
@TechWithTim
@TechWithTim 5 месяцев назад
vent is more common
@discere5811
@discere5811 Месяц назад
Nice and informative video, but I do have a questions. How would/can I use git with this? Do I initialize a local git repository on the folder that contains the files of the virtual environment and make commits there. Or do I initialize the a local git repository inside the virtual environment? (I learned how to use git from your videos months ago, and now I just learned about this virtual environment which is another useful knowledge for me.) I just want to know how can I combine the powers/great features the git and virtual environment have. I hope you can reply even though this video is 3 month old.
@vikramsah6776
@vikramsah6776 7 дней назад
no bs video
@celsogonzalezlopez6488
@celsogonzalezlopez6488 Месяц назад
question about the last part, if you dont save your source code in the venv, where do you save it? also what do you mean the venv file only stores the things related to the virtual environment
@bostonmike6912
@bostonmike6912 4 месяца назад
Make a video on poetry package management for python.
@hasanx8317
@hasanx8317 3 месяца назад
We also need to ignore the venv directory in the git repo right?
@alexpulido2431
@alexpulido2431 Месяц назад
what happens when you activate ? is it in place overriding "the global" Python installation ?
@MrEstebanEscudero
@MrEstebanEscudero Месяц назад
Great video. Thanks. I've got one question. Once I create the directory where the virtual environments are going to be, that is, inside my 'projects" directory in this case. Suppose I've written a script and I want to run it in a specific virtual enviroment. How do I do that? I Created a virtual environment and navigated to the directory where file was and ran it by typing "python3 name_of_the_file" from withing the virtual environment. Is that correct or that is not how I should do it.
@spacecoder0526
@spacecoder0526 5 месяцев назад
Can you make tutorial of deploying fast api or any python api projects including virtual environment with docker?
@jonasvilks2506
@jonasvilks2506 5 месяцев назад
Hi. Thanks a lot! How to use multiple versions of python on one machine? For some projects I need python 3.10 and for some 3.12. Do you recommend to use conda for this scenario or just install several version in OS and use python venv?
@saurabhparthe1219
@saurabhparthe1219 5 месяцев назад
sir your videos are very nice can you make a project on iron man jarvis.
@markgruic8495
@markgruic8495 5 месяцев назад
Great job
@trevocow5371
@trevocow5371 12 дней назад
I don't know if this is because I have a newer version of python installed, but "python -m venv env" throws an error, and instead I'm doing "py -m venv env" and it does exactly what it is suppose to
@cadetaylor429
@cadetaylor429 4 месяца назад
Quick question - after creating a virtual environment, will my 'import' statements in my code automatically import the versions of the package that are installed in my virtual environment? Because I have some packages installed globally and in the virtual environment - I'm curious which version will get precedent. Also, is it entirely bad practice to install any packages globally? Should I uninstall all globally installed packages and only use virtual environments? Thanks!
@spicyshizz2850
@spicyshizz2850 5 месяцев назад
Do you plan to make ML & AI videos soon?
@Boghost1430
@Boghost1430 5 месяцев назад
Hello Tim, I've started to use Zed however virtual environments are not as easy to use as in vscode and even after looking through zed's docs i wasn't able to solve the issue, do you have any advice pls
@AmodeusR
@AmodeusR 4 месяца назад
For me, using windows with bash, I need to run source env/Scripts/Activate to activate the virtual env.
@abdulmobinkarimi6846
@abdulmobinkarimi6846 5 месяцев назад
make a video about DEVIN
@kacper2028
@kacper2028 3 месяца назад
Wait so what actually is in the venv folder?
@pauloclara4764
@pauloclara4764 5 месяцев назад
Whats diference to docker
@mannanjaffery
@mannanjaffery 5 месяцев назад
Can Davin do backened ?
@crystyxn
@crystyxn 5 месяцев назад
I thought -r stands for recursive
@agentm10
@agentm10 5 месяцев назад
clearly not. Tim is very explicitly saying that -r is for "install fRom a file", lol.
@crystyxn
@crystyxn 5 месяцев назад
@@agentm10 yeah, thats why I commented that. Turns out the -r actually comes from "requirements".
@agentm10
@agentm10 5 месяцев назад
@@crystyxn yup, -r FILENAME is the same as --requirement=FILENAME. Although recursive also makes sense as you have to go through all the entries in the file.
@sandilemasuku2240
@sandilemasuku2240 5 месяцев назад
I believe your are able to get a job at c.i.a or m.k 7 agency.
@Mustang_G
@Mustang_G 5 месяцев назад
I always thought you just opened VS code and open new file.
@pietrovalentinoyannellihan3883
@pietrovalentinoyannellihan3883 5 месяцев назад
hello, i followed your instructions in your video to deploy a flask app in ubuntu, but it shows me the error 403 forbidden, so i need to know, your tutorial doesnt work if you are using plesk?, i already located the files with cd and made the arrengements with the wsgi file
@pietrovalentinoyannellihan3883
@pietrovalentinoyannellihan3883 5 месяцев назад
Im sorry for putting the comment here but i think IS more likely to receive help if the comment IS in a recent video
@-iIIiiiiiIiiiiIIIiiIi-
@-iIIiiiiiIiiiiIIIiiIi- 17 дней назад
Yeah but conda lets you see your existing environments.
@akramazad5137
@akramazad5137 5 месяцев назад
Davin can do this in few minutes
@jabirmustafasulaiman5147
@jabirmustafasulaiman5147 5 месяцев назад
Is your course free
@TechWithTim
@TechWithTim 5 месяцев назад
There is a free introductory course that is about 1.5 hours long that you can watch before deciding on the full program
@vetriselvan9807
@vetriselvan9807 5 месяцев назад
Nothing free in this world
@NeuroGuy-md7qf
@NeuroGuy-md7qf Месяц назад
Btw, "ls" didn't work for me (Windows), but "dir" worked. It was a quick google search for me, so no big deal, but just pointing it out for the other people who may have been initially confused by that.
@gmailservice9945
@gmailservice9945 5 месяцев назад
excellent tutorial thank you
Далее
The Complete Guide to Python Virtual Environments!
15:52
How To Practice Programming So You Actually Get Good
15:46
Only I get to bully my sister 😤
00:27
Просмотров 36 млн
5 Good Python Habits
17:35
Просмотров 507 тыс.
I forced EVERYONE to use Linux
22:59
Просмотров 471 тыс.
Python 101: Learn These 5 Must-Know HIDDEN Features
16:38
Asyncio in Python - Full Tutorial
24:59
Просмотров 69 тыс.
3 PYTHON AUTOMATION PROJECTS FOR BEGINNERS
17:00
Просмотров 1,6 млн
10 Python Comprehensions You SHOULD Be Using
21:35
Просмотров 142 тыс.
Python Virtual Environment and pip for Beginners
30:39
5 Useful F-String Tricks In Python
10:02
Просмотров 299 тыс.
Python 101: Learn the 5 Must-Know Concepts
20:00
Просмотров 1,1 млн