Consuming HTTP Services in Python Transcripts
Chapter: Initial HTTP GET requests with the requests package
Lecture: Installing requests in PyCharm
0:01 So we've been able to create this virtual environment, that's great,
0:04 however, let's get this into PyCharm, let's load up our project
0:08 and let's actually register this environment as the one that we are going to use
0:11 to execute all of our code.
0:13 So over here, I actually get cloned the service demos,
0:17 these are the demos that you have access to on github,
0:20 and I've actually just renamed them so the name isn't so super long.
0:24 And on OS 10 or Mac OS you can just drag and drop this
0:27 into PyCharm or even Sublime text or Visual Studio Code,
0:31 lots of these editors support that. And it will open the project.
0:35 Okay, cool, so here we are, now how do we take our virtual environment
0:40 which is over here in this python/environments/consuming_svc/bin,
0:45 this executable and make it the python that we are going to use in PyCharm.
0:49 Well, we can come over here and we go to settings,
0:55 and there is a project interpreter,
0:57 notice right now, it's just the system wide 3.6.0 so what I want to do is
1:00 add a local virtual environment. If you want to do this entirely from PyCharm
1:04 and not use the command line to create the virtual environment, that's fine,
1:07 you can just use create virtual env, but because we already have one,
1:11 we are going to go and do add local, now over here,
1:14 I am already in this directory, because you can see here is the Python
1:17 so I can just say open. on windows it's start.
1:20 And I could take this over here and say okay, I want to use this,
1:23 and let's go and drag it down here and say whatever that is that is the path.
1:30 So now you can see it's a virtual env at python/environments/consuming_svc_env,
1:36 and everything looks good, it looks like we technically could upgrade this here,
1:41 so we can go ahead and upgrade setup tools
1:45 and that will happen in a second, great, install a few other things.
1:49 Alright, now, when we run some code,
1:51 PyCharm will now use our virtual environment.