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


Talk Python's Mastodon Michael Kennedy's Mastodon