Mastering PyCharm Transcripts
Chapter: PyCharm Projects
Lecture: Python virtual environments

Login or purchase this course to watch this video and the rest of the course contents.
0:02 We've seen that PyCharm understands virtual environments
0:04 in several ways and that's really excellent.
0:09 Let's jump back over there and look at that in more detail.
0:11 Here we are in our snake_bnb knock off thing,
0:16 and if we go and look at the run configuration,
0:20 you can see that we have set a project default interpreter
0:24 to be a virtual environment contained within this project,
0:29 remember at the beginning, we checked this out from github.
0:31 We created this and then set it up
0:34 and you can always tell what the default is
0:37 by opening up this little terminal window
0:39 and you'll see just like if you had done it in the terminal
0:41 it's already activated the . /env/bin/activate
0:49 or /bin versus scripts in Windows
0:52 but it's as if we'd already activated it
0:55 and we can change that in run configuration up there
0:59 but let's see how we set the default,
1:02 if you don't know what it is you just set interpreter and it will go and find it,
1:05 so we cancel that out so you can see that it's down here under project interpreter
1:10 and notice, we have this visual GUI pip type thing
1:15 so pip is for managing packages and there it is,
1:18 and notice this one is actually up to date
1:22 and there's sort of latest version of all the versions we have here
1:25 because I just created it, but if I grab let's say this one,
1:30 this is all the stuff basically in my standard library,
1:34 and notice a bunch of them are out of date
1:36 so for example Boto 3 is out of date and I can click here and update it
1:40 if I want to find other stuff say I'm looking for more things about AWS,
1:44 so I'm looking for the AWS CLI, actually I have no idea what that does
1:48 but we can find all this things, there's AWS google auth,
1:51 so acquire AWS STS credentials for AWS app single sign on
1:57 very cool, you can go and check that out and you can install it
2:00 and it would be just as if you had typed pip aws-google-auth install-that
2:07 and you could even pin it to a particular version down here
2:10 if you want say like the version 10
2:13 so this is super nice, you can manage them, you can create new ones,
2:17 I find this to be super helpful when I was brand new
2:21 and I don't use it that much,
2:23 now that I'm very experienced running pip on the command line
2:26 and manage environments that way,
2:28 but this is a really good way to get started
2:30 and slowly probably move away from that,
2:33 so we can upgrade things, we can even uninstall stuff
2:36 if we don't want arrow anymore— hit the minus.
2:39 So that's great, you can see that we can work with these existing environments,
2:42 this one that we said is the default one or the other one,
2:45 but we can also go and browse if you don't see it,
2:47 add a remote one, or we can create a virtual environment.
2:51 Now, I don't have it installed on this user profile
2:55 notice it's my screen cast account, that's all cleaned up
2:57 but on my main user account I also have Anaconda installed
3:01 and if you have Anaconda installed
3:04 you'll see it create a Conda environment as another option here.
3:07 So if we want to create a new virtual environment
3:10 we just come over here and check of all the options
3:13 whether you want to inherit the global site packages and just add to it
3:15 or make this totally isolated, it's your pick, I go with totally isolated.