Assessments

Chapter 1

  1. To keep your project-specific Python packages and dependencies isolated from other projects and the system-level Python packages.
  2. No. You can always regenerate a virtual environment and reinstall packages.
  3. To keep a list of all the Python packages (and versions) that your Python projects rely on. Having a maintained requirements.txt file allows you to reinstall all packages easily with the command pip install -r requirements.txt.
  4. Make sure you are using the absolute path to the Python interpreter that is in the bin folder of your virtual environment.
  5. It activates a virtual environment so that all users of Python and pip are sandboxed to the virtual environment.
  6. deactivate. If you type exit (and we all do it sometimes!), ...

Get Practical Python Programming for IoT now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.