Heads up! To view this whole video, sign in with your Courses account or enroll in your free 7-day trial. Sign In Enroll
Start a free Courses trial
to watch this video
Using tools like IDLE in a virtualenv isn't as straightforward as it should be. I'll show you how to launch it so your custom project packages are available and how to use a requirements file to quickly build up an environment.
You can always get a list of installed packages with pip freeze
. If you're in a virtualenv, you'll get the virtualenv's list of packages. If you're not, you'll get a list of your global packages. pip freeze > requirements.txt
is the fast way to generate your requirements file the first time.
Requirements files always have the same layout: package_name==1.2.3
. You can also use <
, >
, <=
and >=
, too (e.g. Django>=1.9,<2.0
would select the latest version of Django that's newer than, or equal to, 1.9 and less than 2.0).
You need to sign up for Treehouse in order to download course files.
Sign up