Installing Private Python Packages Hosted on GitHub: Difference between revisions
Jump to navigation
Jump to search
(Created page with "== Overview == Use pip and virtual environments to install private python packages hosted on GitHub. == Workflow == === Installing packages === Add the package to either `requirements-to-install.txt` or `requirements.txt`: <syntaxhighlight lang="txt"> git+https://github.com/johnf1004/my_package.git </syntaxhighlight> Install with pip: <syntaxhighlight lang="bash"> $ pip install -r requirements-to-install.txt --upgrade </syntaxhighlight> At this point, validation...") Tag: wikieditor |
(No difference)
|
Revision as of 15:50, 22 July 2023
Overview
Use pip and virtual environments to install private python packages hosted on GitHub.
Workflow
Installing packages
Add the package to either requirements-to-install.txt or requirements.txt:
git+https://github.com/johnf1004/my_package.git
Install with pip:
$ pip install -r requirements-to-install.txt --upgrade
At this point, validation errors will be displayed if GitHub credentials haven't been configured.
Configuring GitHub credentials
Install the GitHub CLI.
$ brew install gh
Enter credentials:
$ gh autho login
At this point pip should be able to install from the private repo.