How to install a local package via pip

Assuming you have set up your script in your local package sitting on your machine and you want to install this package in another project using pip, then first you can build an archive of your package using the following command:

python sdist

This will create a dist folder in your package and put the archive inside it.

Next, switch to the virtualenv of the destination project if applicable and install the package using a command like:

pip install /srv/pkg/mypackage/mypackage-0.1.0.tar.gz


1. Installing Python packages from local file system folder with pip – Stack Overflow.

Leave a Reply

Your email address will not be published. Required fields are marked *