Challenge: Re-create a Development Environment
00:00
And now it’s time for the challenge. Recreate a development environment inside pip_exercises
, activate your virtual environment, and then install the requests
package with a version above 2.0 and the rich
package with version 13.5.
00:20
Then freeze all your requirements in a requirements.txt
file.
00:26
So if you’re working with the folder from before, you might need to overwrite the requirements.txt
file. Or if you installed the rich
package version 13.5, you will get a message that the requirements are already satisfied.
00:40 Alternatively, you can also delete all the folders you’ve created so far and start from scratch for this challenge.
00:49
After you’ve done all of this, deactivate your virtual environment and navigate into the other_exercises
folder.
00:57
Inside other_exercises
, create another virtual environment that contains the same package versions as the virtual environment in pip_exercises
contains.
01:08
So again, the other_exercises
folder might exist already because you needed to create it in the exercises, but you can also start from scratch.
01:17
And then you would need to create the other_exercises
folder next to your pip_exercises
folder. And once you’ve done this, create a virtual environment that contains the same package versions as the virtual environment in the pip_exercises
folder.
01:33 And now comes an important part. Only use one command to install all packages. So you might need to think a bit how to accomplish this, but I know you can do that.
01:45 And after you’ve done it, verify that you installed the packages by listing them, and then finally, deactivate your virtual environment. Again, I like this challenge because it’s kind of simulating a situation when you work with another developer and you want to create the same development environment as the other developer has.
02:05 It’s just for you, simulating it in two folders. Have fun with this challenge. Stop this video course while you are working on it, and once you’re finished, continue and see how I solve this challenge.
Become a Member to join the conversation.