title
Python Tutorial: VENV (Windows) - How to Use Virtual Environments with the Built-In venv Module
description
In this Python Programming Tutorial, we will be learning how to use virtual environments on the Windows operating systems with the built-in venv module. We will learn how to create them, activate them, remove them, and much more. Let's get started...
VENV (Mac & Linux) - https://youtu.be/Kg1Yvry_Ydk
✅ Support My Channel Through Patreon:
https://www.patreon.com/coreyms
✅ Become a Channel Member:
https://www.youtube.com/channel/UCCezIgC97PvUuR4_gbFUs5g/join
✅ One-Time Contribution Through PayPal:
https://goo.gl/649HFY
✅ Cryptocurrency Donations:
Bitcoin Wallet - 3MPH8oY2EAgbLVy7RBMinwcBntggi7qeG3
Ethereum Wallet - 0x151649418616068fB46C3598083817101d3bCD33
Litecoin Wallet - MPvEBY5fxGkmPQgocfJbxP6EmTo5UUXMot
✅ Corey's Public Amazon Wishlist
http://a.co/inIyro1
✅ Equipment I Use and Books I Recommend:
https://www.amazon.com/shop/coreyschafer
▶️ You Can Find Me On:
My Website - http://coreyms.com/
My Second Channel - https://www.youtube.com/c/coreymschafer
Facebook - https://www.facebook.com/CoreyMSchafer
Twitter - https://twitter.com/CoreyMSchafer
Instagram - https://www.instagram.com/coreymschafer/
#Python #venv
detail
{'title': 'Python Tutorial: VENV (Windows) - How to Use Virtual Environments with the Built-In venv Module', 'heatmap': [{'end': 146.571, 'start': 132.824, 'weight': 0.905}, {'end': 239.622, 'start': 185.378, 'weight': 0.749}, {'end': 300.261, 'start': 278.363, 'weight': 0.708}, {'end': 575.167, 'start': 544.307, 'weight': 0.843}, {'end': 620.67, 'start': 591.815, 'weight': 0.809}], 'summary': 'Tutorial introduces the venv module for managing virtual environments, highlighting its usage on windows, mac, and linux, and emphasizes the significance of virtual environments in python to prevent conflicts between package versions for various projects, illustrated by the transition from django 1 to django 2. it also illustrates the creation and management of python virtual environments using the venv module, covering activation, package installation, requirements.txt creation, and environment deactivation/deletion, and provides insights into best practices for virtual environment management.', 'chapters': [{'end': 37.677, 'segs': [{'end': 37.677, 'src': 'embed', 'start': 0.269, 'weight': 0, 'content': [{'end': 1.33, 'text': "Hey there, how's it going everybody?", 'start': 0.269, 'duration': 1.061}, {'end': 7.975, 'text': "In this video, we're going to be learning how to use the built-in VENV module from the standard library to work with virtual environments.", 'start': 1.65, 'duration': 6.325}, {'end': 11.278, 'text': "Now, I've done a couple of videos on different ways to manage virtual environments.", 'start': 8.375, 'duration': 2.903}, {'end': 19.504, 'text': "I have other videos on VirtualENV and PIPENV, but this built-in VENV module is actually the one that I'm currently using most often,", 'start': 11.618, 'duration': 7.886}, {'end': 20.905, 'text': 'so I wanted to show how to do this.', 'start': 19.504, 'duration': 1.401}, {'end': 24.368, 'text': 'Also, my VirtualENV video is getting pretty old at this point.', 'start': 21.446, 'duration': 2.922}, {'end': 29.111, 'text': 'and when I made that video, I only showed how to use virtual env on Mac and Linux.', 'start': 24.828, 'duration': 4.283}, {'end': 32.893, 'text': "this time around I'm going to make videos for Windows and Mac and Linux.", 'start': 29.111, 'duration': 3.782}, {'end': 37.677, 'text': "so for this video we'll be learning how to use this on Windows, but if you're on Mac and Linux,", 'start': 32.893, 'duration': 4.784}], 'summary': 'Learn to use the venv module for virtual environments on various platforms.', 'duration': 37.408, 'max_score': 0.269, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/APOPm01BVrk/pics/APOPm01BVrk269.jpg'}], 'start': 0.269, 'title': 'Using venv module', 'summary': 'Introduces the built-in venv module for managing virtual environments, emphasizing its usage on windows, mac, and linux, and previous videos on virtualenv and pipenv.', 'chapters': [{'end': 37.677, 'start': 0.269, 'title': 'Using built-in venv module', 'summary': "Introduces the built-in venv module for managing virtual environments, highlighting its prevalence in the speaker's current usage and the plan to create videos for windows, mac, and linux, and the previous videos on virtualenv and pipenv.", 'duration': 37.408, 'highlights': ['The speaker emphasizes the focus on using the built-in VENV module for managing virtual environments, which is the most frequently used method currently.', "The plan to create videos for Windows, Mac, and Linux demonstrates the speaker's intention to provide comprehensive coverage of using VENV across different platforms.", 'The speaker mentions having previous videos on VirtualENV and PIPENV, indicating a history of content creation in this area.']}], 'duration': 37.408, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/APOPm01BVrk/pics/APOPm01BVrk269.jpg', 'highlights': ['The speaker emphasizes the focus on using the built-in VENV module for managing virtual environments, which is the most frequently used method currently.', "The plan to create videos for Windows, Mac, and Linux demonstrates the speaker's intention to provide comprehensive coverage of using VENV across different platforms.", 'The speaker mentions having previous videos on VirtualENV and PIPENV, indicating a history of content creation in this area.']}, {'end': 493.176, 'segs': [{'end': 93.828, 'src': 'embed', 'start': 37.677, 'weight': 0, 'content': [{'end': 41.219, 'text': "then I'll be sure to leave a link to that video in the description section below.", 'start': 37.677, 'duration': 3.542}, {'end': 43.901, 'text': "okay so, with that said, let's go ahead and get started.", 'start': 41.219, 'duration': 2.682}, {'end': 46.983, 'text': 'okay so, first of all, why would we use a virtual environment?', 'start': 43.901, 'duration': 3.082}, {'end': 53.347, 'text': 'so the purpose of a virtual environment is to have a space where we can install packages that are specific to a certain project.', 'start': 46.983, 'duration': 6.364}, {'end': 58.609, 'text': "So, for example, let's say that you have a lot of Django sites that use Django version one,", 'start': 53.707, 'duration': 4.902}, {'end': 62.27, 'text': 'but you want to start using Django version two on all of your newer projects.', 'start': 58.609, 'duration': 3.661}, {'end': 69.153, 'text': "Well, if you're just using your single global environment, then when you update Django to version two,", 'start': 62.69, 'duration': 6.463}, {'end': 72.554, 'text': 'it could break some of your old projects that use Django version one.', 'start': 69.153, 'duration': 3.401}, {'end': 76.896, 'text': "So we don't want all of our projects pointing to a single instance of Django.", 'start': 72.934, 'duration': 3.962}, {'end': 80.418, 'text': 'So each project should have its own packages separate from each other.', 'start': 77.356, 'duration': 3.062}, {'end': 82.9, 'text': "And that's what we use virtual environments for.", 'start': 80.879, 'duration': 2.021}, {'end': 88.824, 'text': "So with that said, let's look at how we can use the built-in VNV module to create virtual environments.", 'start': 83.34, 'duration': 5.484}, {'end': 93.828, 'text': "Now in order to use this module, you're going to need to use Python 3.3 or higher.", 'start': 89.325, 'duration': 4.503}], 'summary': 'Using virtual environments for project-specific packages, avoiding conflicts. creating virtual environments with vnv module for python 3.3 or higher.', 'duration': 56.151, 'max_score': 37.677, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/APOPm01BVrk/pics/APOPm01BVrk37677.jpg'}, {'end': 170.347, 'src': 'heatmap', 'start': 132.824, 'weight': 2, 'content': [{'end': 137.766, 'text': 'so if i say pip list, then we can see a list of packages here.', 'start': 132.824, 'duration': 4.942}, {'end': 143.409, 'text': 'And these are all the packages that I have installed on my system installation of Python.', 'start': 139.086, 'duration': 4.323}, {'end': 146.571, 'text': "So now let's create a new virtual environment.", 'start': 143.849, 'duration': 2.722}, {'end': 156.156, 'text': 'So to create a new virtual environment, I can simply say python-m venv and now the name of our virtual environment.', 'start': 147.191, 'duration': 8.965}, {'end': 159.118, 'text': "So I'm just going to call this project underscore env.", 'start': 156.436, 'duration': 2.682}, {'end': 170.347, 'text': 'So when you run dash m and then specify a module like we did here, Python will search your sys.path and execute that module as the main module.', 'start': 160.72, 'duration': 9.627}], 'summary': "Using 'pip list' shows installed packages; creating a new virtual environment with 'python -m venv project_env'.", 'duration': 26.498, 'max_score': 132.824, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/APOPm01BVrk/pics/APOPm01BVrk132824.jpg'}, {'end': 239.622, 'src': 'heatmap', 'start': 185.378, 'weight': 0.749, 'content': [{'end': 196.288, 'text': 'So if I list out everything on my desktop by using dir, then we can see that now we have this virtual environment called project underscore env.', 'start': 185.378, 'duration': 10.91}, {'end': 198.651, 'text': 'so it creates that in our current directory.', 'start': 196.288, 'duration': 2.363}, {'end': 202.535, 'text': 'so to activate that, we can simply say let me clear my screen here.', 'start': 198.651, 'duration': 3.884}, {'end': 214.106, 'text': 'to activate this, we can just say project underscore env, which was the name of my project, and then scripts and then activate dot bat.', 'start': 202.535, 'duration': 11.571}, {'end': 218.348, 'text': 'so if I run that, then we can tell that our environment is activated,', 'start': 214.106, 'duration': 4.242}, {'end': 222.95, 'text': "because you'll likely see the environment name in parentheses here in our command line.", 'start': 218.348, 'duration': 4.602}, {'end': 230.333, 'text': 'another way that you can tell this is by typing where Python spell that right, and when we run that,', 'start': 222.95, 'duration': 7.383}, {'end': 239.622, 'text': 'it gives us the paths to the current Python command, and our virtual environment directory here is listed at the top of that.', 'start': 230.333, 'duration': 9.289}], 'summary': "Creating and activating a virtual environment using 'project_env' and 'activate.bat', confirmed by checking python path.", 'duration': 54.244, 'max_score': 185.378, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/APOPm01BVrk/pics/APOPm01BVrk185378.jpg'}, {'end': 230.333, 'src': 'embed', 'start': 198.651, 'weight': 3, 'content': [{'end': 202.535, 'text': 'so to activate that, we can simply say let me clear my screen here.', 'start': 198.651, 'duration': 3.884}, {'end': 214.106, 'text': 'to activate this, we can just say project underscore env, which was the name of my project, and then scripts and then activate dot bat.', 'start': 202.535, 'duration': 11.571}, {'end': 218.348, 'text': 'so if I run that, then we can tell that our environment is activated,', 'start': 214.106, 'duration': 4.242}, {'end': 222.95, 'text': "because you'll likely see the environment name in parentheses here in our command line.", 'start': 218.348, 'duration': 4.602}, {'end': 230.333, 'text': 'another way that you can tell this is by typing where Python spell that right, and when we run that,', 'start': 222.95, 'duration': 7.383}], 'summary': "To activate the project environment, use the command 'project_env\x08in\x08at activate'. the environment will be confirmed by seeing the name in parentheses in the command line or by typing 'where python'.", 'duration': 31.682, 'max_score': 198.651, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/APOPm01BVrk/pics/APOPm01BVrk198651.jpg'}, {'end': 309.069, 'src': 'heatmap', 'start': 278.363, 'weight': 0.708, 'content': [{'end': 283.227, 'text': 'So now if you install some packages here, then they will only be installed for this environment.', 'start': 278.363, 'duration': 4.864}, {'end': 288.271, 'text': "So let's say that our project requires the request library and PyTZ.", 'start': 283.547, 'duration': 4.724}, {'end': 300.261, 'text': 'So to do that, I could simply say pip install requests and once that is installed, then i can just hit the up arrow here and now do a pip.', 'start': 288.631, 'duration': 11.63}, {'end': 309.069, 'text': "install pyTZ and we'll install that and then, once this is installed, we will run pip list again.", 'start': 300.261, 'duration': 8.808}], 'summary': 'Installing requests and pytz for this environment using pip.', 'duration': 30.706, 'max_score': 278.363, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/APOPm01BVrk/pics/APOPm01BVrk278363.jpg'}, {'end': 355.883, 'src': 'embed', 'start': 332.823, 'weight': 5, 'content': [{'end': 341.192, 'text': "this will allow someone else to create an environment and use your requirements.txt file to install all of the same packages and dependencies that you're using.", 'start': 332.823, 'duration': 8.369}, {'end': 344.656, 'text': 'so to do that, we can use the pip freeze command.', 'start': 341.192, 'duration': 3.464}, {'end': 351.06, 'text': "so i'm going to say pip, And that's going to be similar to pip list,", 'start': 344.656, 'duration': 6.404}, {'end': 355.883, 'text': 'but it will give us the packages in the correct form for the requirements.txt file.', 'start': 351.06, 'duration': 4.823}], 'summary': "Using 'pip freeze' creates requirements.txt for package dependencies.", 'duration': 23.06, 'max_score': 332.823, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/APOPm01BVrk/pics/APOPm01BVrk332823.jpg'}, {'end': 464.316, 'src': 'embed', 'start': 438.334, 'weight': 6, 'content': [{'end': 444.279, 'text': 'deactivate, and when we run that, we can see that we no longer have the environment in our prompt.', 'start': 438.334, 'duration': 5.945}, {'end': 451.064, 'text': "and if you want to delete the virtual environment altogether, so it's no longer active, but it still exists.", 'start': 444.279, 'duration': 6.785}, {'end': 456.549, 'text': "if we want to delete the environment altogether, it's as simply as deleting the directory for that environment,", 'start': 451.064, 'duration': 5.485}, {'end': 464.316, 'text': 'and on Windows you can do this in the command line simply by saying rmdir And then the name of the directory that you want to delete.', 'start': 456.549, 'duration': 7.767}], 'summary': 'Deactivate and delete virtual environment by deleting its directory.', 'duration': 25.982, 'max_score': 438.334, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/APOPm01BVrk/pics/APOPm01BVrk438334.jpg'}], 'start': 37.677, 'title': 'Python virtual environments', 'summary': 'Emphasizes the significance of virtual environments in python to prevent conflicts between package versions for various projects, illustrated by the transition from django 1 to django 2. it also illustrates the creation and management of python virtual environments using the venv module, covering activation, package installation, requirements.txt creation, and environment deactivation/deletion.', 'chapters': [{'end': 72.554, 'start': 37.677, 'title': 'Virtual environment in python', 'summary': 'Explains the importance of using a virtual environment in python to avoid conflicts when using different package versions for different projects, using the example of transitioning from django version 1 to version 2.', 'duration': 34.877, 'highlights': ['A virtual environment in Python provides a segregated space to install packages specific to a project, preventing conflicts when using different versions of packages for different projects.', 'Using the example of transitioning from Django version 1 to version 2, it illustrates how using a single global environment can lead to breaking old projects when updating package versions.']}, {'end': 493.176, 'start': 72.934, 'title': 'Creating python virtual environments', 'summary': 'Demonstrates creating and managing python virtual environments with venv module, including the process of activation, installing packages, creating a requirements.txt file, and deactivating/deleting the environment.', 'duration': 420.242, 'highlights': ['The process of creating a new virtual environment using the built-in venv module is explained, which does not require any additional installation. The venv module, which comes with the standard library, is used to create a new virtual environment without the need to install anything extra.', "The activation of a virtual environment and verification of the environment's activation are demonstrated, including checking the current Python version being used. The activation of a virtual environment is done by running a specific script, and the activated environment can be verified by checking if the environment name is displayed in the command line and by using the 'where Python' command to confirm the Python version being used.", "The process of installing packages within a virtual environment and the isolation of the installed packages for that environment are shown, with examples of installing 'requests' and 'PyTZ'. The installation of packages within a virtual environment is demonstrated, with 'requests' and 'PyTZ' being used as examples to illustrate the isolation of installed packages for that specific environment.", "The creation of a requirements.txt file using 'pip freeze' to export the list of packages installed within the environment is explained. The process of creating a requirements.txt file for a specific environment is demonstrated using the 'pip freeze' command to export the list of installed packages, allowing the replication of the environment by using the requirements.txt file.", "The deactivation and deletion of a virtual environment are detailed, including the command-line process as well as an alternative method using the trash bin. The deactivation of a virtual environment is shown using the 'deactivate' command, and the deletion of the environment is explained using a command-line approach, as well as an alternative method of using the trash bin for those not comfortable with the command line."]}], 'duration': 455.499, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/APOPm01BVrk/pics/APOPm01BVrk37677.jpg', 'highlights': ['A virtual environment in Python prevents conflicts between package versions for different projects.', 'Using a single global environment can lead to breaking old projects when updating package versions.', 'The venv module allows creating a new virtual environment without additional installation.', 'Activation of a virtual environment is done by running a specific script.', 'The process of installing packages within a virtual environment is demonstrated.', "Creation of a requirements.txt file using 'pip freeze' to export the list of packages installed within the environment is explained.", 'Deactivation and deletion of a virtual environment are detailed.']}, {'end': 1016.759, 'segs': [{'end': 518.145, 'src': 'embed', 'start': 493.656, 'weight': 1, 'content': [{'end': 501.918, 'text': 'Now, normally, when I create a virtual environment, I usually create it inside of my project and I name the environment VENV.', 'start': 493.656, 'duration': 8.262}, {'end': 503.819, 'text': "And that's a pretty common convention.", 'start': 502.359, 'duration': 1.46}, {'end': 512.523, 'text': 'Now, the reason that I called it something different before was because I wanted to differentiate between the VENV module and the name of the environment.', 'start': 504.239, 'duration': 8.284}, {'end': 515.924, 'text': 'But normally I would do something like this.', 'start': 512.842, 'duration': 3.082}, {'end': 518.145, 'text': 'I would create a new project.', 'start': 516.445, 'duration': 1.7}], 'summary': 'Common practice to create virtual environment inside project named venv.', 'duration': 24.489, 'max_score': 493.656, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/APOPm01BVrk/pics/APOPm01BVrk493656.jpg'}, {'end': 620.67, 'src': 'heatmap', 'start': 544.307, 'weight': 0, 'content': [{'end': 546.349, 'text': "So I'll say my project venv.", 'start': 544.307, 'duration': 2.042}, {'end': 552.394, 'text': 'And sometimes these virtual environments will take a second to create.', 'start': 548.07, 'duration': 4.324}, {'end': 556.718, 'text': 'But now, once that is created, OK, so that finished.', 'start': 552.794, 'duration': 3.924}, {'end': 562.944, 'text': "So now to activate that, I'm simply going to say my underscore project.", 'start': 557.098, 'duration': 5.846}, {'end': 575.167, 'text': 'venv, which is the name of the virtual environment scripts, and then activate dot bat and this will activate that virtual environment,', 'start': 563.942, 'duration': 11.225}, {'end': 579.009, 'text': 'like we saw before, and now that environment is active now.', 'start': 575.167, 'duration': 3.842}, {'end': 583.371, 'text': 'remember, we created a requirements.txt file from our last environment.', 'start': 579.009, 'duration': 4.362}, {'end': 591.815, 'text': 'now, if we want to create a new environment and use a requirements.txt file to install our packages, then we can do that by saying pip,', 'start': 583.371, 'duration': 8.444}, {'end': 600.899, 'text': "install dash R and now, since we're using that dash R option, it's going to be expecting a requirements.txt file.", 'start': 591.815, 'duration': 9.084}, {'end': 603.24, 'text': 'so that is just located here on my desktop.', 'start': 600.899, 'duration': 2.341}, {'end': 605.541, 'text': "so I'm just going to pass that in directly.", 'start': 603.24, 'duration': 2.301}, {'end': 616.426, 'text': "so I'll say requirements.txt and I will run that and it's going to go out and install everything from that requirements.txt file and all of the dependencies that we had listed.", 'start': 605.541, 'duration': 10.885}, {'end': 620.67, 'text': "so once all of these are installed, i'm going to let this finish here.", 'start': 616.986, 'duration': 3.684}], 'summary': 'Creating and activating virtual environments, installing packages from requirements.txt using pip.', 'duration': 58.933, 'max_score': 544.307, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/APOPm01BVrk/pics/APOPm01BVrk544307.jpg'}, {'end': 744.806, 'src': 'embed', 'start': 714.628, 'weight': 3, 'content': [{'end': 718.55, 'text': "Now another thing is that you shouldn't commit your virtual environment to source control.", 'start': 714.628, 'duration': 3.922}, {'end': 725.995, 'text': 'So if you ever look at a template gitignore file for Python projects, then they usually have virtual environments ignored,', 'start': 718.971, 'duration': 7.024}, {'end': 728.116, 'text': "which means they won't be committed to source control.", 'start': 725.995, 'duration': 2.121}, {'end': 734.62, 'text': 'Now, what you would commit to source control would be something like your requirements.txt file,', 'start': 728.897, 'duration': 5.723}, {'end': 740.464, 'text': "which lets people build their own environments to run your project, but there's no need to add the environment itself.", 'start': 734.62, 'duration': 5.844}, {'end': 744.806, 'text': 'okay. so now let me deactivate this environment.', 'start': 741.084, 'duration': 3.722}], 'summary': 'Virtual environments should not be committed to source control, but the requirements.txt file should be added.', 'duration': 30.178, 'max_score': 714.628, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/APOPm01BVrk/pics/APOPm01BVrk714628.jpg'}, {'end': 779.869, 'src': 'embed', 'start': 756.51, 'weight': 4, 'content': [{'end': 764.654, 'text': 'so if I do a pip list within our, within our system, installation of Python,', 'start': 756.51, 'duration': 8.144}, {'end': 770.104, 'text': 'then these are the system packages that I have installed on my global version of Python, and we saw these earlier.', 'start': 764.654, 'duration': 5.45}, {'end': 774.566, 'text': 'So there is a way that we can create a virtual environment that has access to these.', 'start': 770.565, 'duration': 4.001}, {'end': 776.227, 'text': 'Now, I hardly ever do this.', 'start': 774.967, 'duration': 1.26}, {'end': 779.869, 'text': 'Anytime. I need packages that are installed globally.', 'start': 776.647, 'duration': 3.222}], 'summary': 'Creating a virtual environment gives access to global system packages, which is rarely done.', 'duration': 23.359, 'max_score': 756.51, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/APOPm01BVrk/pics/APOPm01BVrk756510.jpg'}, {'end': 897.776, 'src': 'embed', 'start': 871.281, 'weight': 5, 'content': [{'end': 875.823, 'text': 'If I do a pip list, whoops, let me spell that right pip list.', 'start': 871.281, 'duration': 4.542}, {'end': 882.967, 'text': 'then we can see that all of those system packages are also available inside of this virtual environment.', 'start': 876.423, 'duration': 6.544}, {'end': 888.45, 'text': "Now the additional packages that we install in this environment still won't affect these systems packages.", 'start': 883.227, 'duration': 5.223}, {'end': 892.132, 'text': "So let's see a package that we don't have here.", 'start': 888.89, 'duration': 3.242}, {'end': 896.395, 'text': "So I don't have SQLAlchemy in my global installation of Python.", 'start': 892.172, 'duration': 4.223}, {'end': 897.776, 'text': "So let's install that.", 'start': 896.695, 'duration': 1.081}], 'summary': 'Using virtual environment to manage packages, install sqlalchemy.', 'duration': 26.495, 'max_score': 871.281, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/APOPm01BVrk/pics/APOPm01BVrk871281.jpg'}, {'end': 951.226, 'src': 'embed', 'start': 922.087, 'weight': 6, 'content': [{'end': 925.668, 'text': 'So this is everything, including our system packages.', 'start': 922.087, 'duration': 3.581}, {'end': 933.59, 'text': "But if I only want what we've installed in this environment, then I could say pip list dash dash local.", 'start': 925.968, 'duration': 7.622}, {'end': 935.651, 'text': 'and when i do that,', 'start': 934.31, 'duration': 1.341}, {'end': 943.919, 'text': "we can see that now we just have pip setup tools and sql alchemy and just to show you that that didn't install in the system packages,", 'start': 935.651, 'duration': 8.268}, {'end': 951.226, 'text': 'if i do a deactivate and then do a pip list,', 'start': 943.919, 'duration': 7.307}], 'summary': 'Installed packages in the environment: pip setup tools, sql alchemy', 'duration': 29.139, 'max_score': 922.087, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/APOPm01BVrk/pics/APOPm01BVrk922087.jpg'}], 'start': 493.656, 'title': 'Virtual environment management', 'summary': 'Covers creating and managing virtual environments, using venv module, naming conventions, activating environments, organizing project files, and best practices. it also includes accessing system packages, installing and managing packages, and utilizing venv module for management.', 'chapters': [{'end': 734.62, 'start': 493.656, 'title': 'Creating and managing virtual environments', 'summary': 'Explains the process of creating and managing virtual environments, including naming conventions, activating virtual environments, using requirements.txt file to install packages, and best practices for organizing project files and virtual environments.', 'duration': 240.964, 'highlights': ["Naming convention for virtual environments The convention of naming virtual environments as 'VENV' within the project is common, with the option to differentiate between the VENV module and the name of the environment.", 'Activating a virtual environment The process of activating a virtual environment involves running a specific script to activate the environment, ensuring that the environment is active for use.', "Using requirements.txt file to install packages The method of using 'pip install -r requirements.txt' to install packages from a requirements.txt file, enabling the installation of dependencies listed in the file.", 'Organizing project files and virtual environments Best practices include keeping project files outside the virtual environment directory, creating scripts within the project directory, and not committing the virtual environment to source control.']}, {'end': 1016.759, 'start': 734.62, 'title': 'Managing virtual environments with venv module', 'summary': 'Demonstrates how to create virtual environments using the venv module, including accessing system packages, installing and managing packages, and utilizing the venv module for virtual environment management.', 'duration': 282.139, 'highlights': ['Demonstrates creating a virtual environment with access to system packages using the VENV module. The demonstration includes creating a virtual environment with access to system packages using the VENV module, allowing users to utilize system packages within the virtual environment.', 'Shows how to install additional packages in the virtual environment without affecting system packages. The tutorial illustrates the installation of additional packages within the virtual environment, ensuring that the system packages remain unaffected by the additional installations.', "Explains the use of 'pip list --local' to view packages installed in the virtual environment. The explanation covers the use of 'pip list --local' to display only the packages installed in the virtual environment, providing a focused view of the installed packages."]}], 'duration': 523.103, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/APOPm01BVrk/pics/APOPm01BVrk493656.jpg', 'highlights': ["Using requirements.txt file to install packages The method of using 'pip install -r requirements.txt' to install packages from a requirements.txt file, enabling the installation of dependencies listed in the file.", "Naming convention for virtual environments The convention of naming virtual environments as 'VENV' within the project is common, with the option to differentiate between the VENV module and the name of the environment.", 'Activating a virtual environment The process of activating a virtual environment involves running a specific script to activate the environment, ensuring that the environment is active for use.', 'Organizing project files and virtual environments Best practices include keeping project files outside the virtual environment directory, creating scripts within the project directory, and not committing the virtual environment to source control.', 'Demonstrates creating a virtual environment with access to system packages using the VENV module. The demonstration includes creating a virtual environment with access to system packages using the VENV module, allowing users to utilize system packages within the virtual environment.', 'Shows how to install additional packages in the virtual environment without affecting system packages. The tutorial illustrates the installation of additional packages within the virtual environment, ensuring that the system packages remain unaffected by the additional installations.', "Explains the use of 'pip list --local' to view packages installed in the virtual environment. The explanation covers the use of 'pip list --local' to display only the packages installed in the virtual environment, providing a focused view of the installed packages."]}], 'highlights': ['The speaker emphasizes the focus on using the built-in VENV module for managing virtual environments, which is the most frequently used method currently.', "The plan to create videos for Windows, Mac, and Linux demonstrates the speaker's intention to provide comprehensive coverage of using VENV across different platforms.", 'The speaker mentions having previous videos on VirtualENV and PIPENV, indicating a history of content creation in this area.', 'A virtual environment in Python prevents conflicts between package versions for different projects.', 'Using a single global environment can lead to breaking old projects when updating package versions.', 'The venv module allows creating a new virtual environment without additional installation.', "Using requirements.txt file to install packages The method of using 'pip install -r requirements.txt' to install packages from a requirements.txt file, enabling the installation of dependencies listed in the file.", "Naming convention for virtual environments The convention of naming virtual environments as 'VENV' within the project is common, with the option to differentiate between the VENV module and the name of the environment.", 'Organizing project files and virtual environments Best practices include keeping project files outside the virtual environment directory, creating scripts within the project directory, and not committing the virtual environment to source control.', 'Demonstrates creating a virtual environment with access to system packages using the VENV module. The demonstration includes creating a virtual environment with access to system packages using the VENV module, allowing users to utilize system packages within the virtual environment.', 'Shows how to install additional packages in the virtual environment without affecting system packages. The tutorial illustrates the installation of additional packages within the virtual environment, ensuring that the system packages remain unaffected by the additional installations.', "Explains the use of 'pip list --local' to view packages installed in the virtual environment. The explanation covers the use of 'pip list --local' to display only the packages installed in the virtual environment, providing a focused view of the installed packages."]}