Skip to content

Latest commit

 

History

History
37 lines (25 loc) · 543 Bytes

python-virtual-environment-setup.md

File metadata and controls

37 lines (25 loc) · 543 Bytes

Python virtual environment setup

  1. To create a virtual environment inside the project

    $ python -m venv env
  2. To activate the virtual environment

    $ env\scripts\activate
  3. To check the list of package that has been installed

    $ pip list
  4. To install any package in that environment

    $ pip install numpy
  5. Create a requirement.txt

    $ pip freeze > requirement.txt
  6. To deactivate a virtual environment

    $ deactivate