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