Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

what does no-build-isolation do?

Tags:

python

pip

I am trying to edit a python library and build it from source. Can someone explain what does the following instruction do and why is this method different from pip install package-name done normally?

pip install --verbose --no-build-isolation --editable 
like image 459
Rituparna Avatar asked Sep 01 '25 03:09

Rituparna


1 Answers

This information is from pip official documentation. Please refer to it

When making build requirements available, pip does so in an isolated environment. That is, pip does not install those requirements into the user’s site-packages, but rather installs them in a temporary directory which it adds to the user’s sys.path for the duration of the build. This ensures that build requirements are handled independently of the user’s runtime environment. For example, a project that needs a recent version of setuptools to build can still be installed, even if the user has an older version installed (and without silently replacing that version).

In certain cases, projects (or redistributors) may have workflows that explicitly manage the build environment. For such workflows, build isolation can be problematic. If this is the case, pip provides a --no-build-isolation flag to disable build isolation. Users supplying this flag are responsible for ensuring the build environment is managed appropriately (including ensuring that all required build dependencies are installed).

like image 91
Dinesh Avatar answered Sep 02 '25 18:09

Dinesh