kdocs
GitHub
Lang - Analytics
Lang - Analytics
  • Base
    • Python 3
      • New Project
Powered by GitBook
On this page
  1. Base
  2. Python 3

New Project

Creating a package.json alike environment

You can use Virtual Environments in python to locally install dependencies in a project.

python -m venv [.somename-env]

Active the environment

.\.somename-env\Scripts\activate

Deactivate

deactivate

Now any pip will install dependencies locally.

Create requirements.txt

This file will act like a package.json, saving the dependencies.

pip freeze > requirements.txt

To reinstall from a requirements.txt

Will have to recreate the environment first.

pip install -r requirements.txt
PreviousPython 3

Last updated 6 months ago