Skip to content

Instantly share code, notes, and snippets.

@wrgoldstein
Created January 4, 2022 18:56
Show Gist options
  • Select an option

  • Save wrgoldstein/7119b8b6728003d3be891c3b57e079b4 to your computer and use it in GitHub Desktop.

Select an option

Save wrgoldstein/7119b8b6728003d3be891c3b57e079b4 to your computer and use it in GitHub Desktop.

Sometimes in a large project you may have many scripts using the same python package, and want to upgrade that package for only some of them.

PIP makes this easy: install the older (or newer) version in its own directory, and import it explicitly.

pip install -r requirements-prev.txt --target prev
from prev import pandas as pd

voila

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment