How to install pip packages via --no-build-isolation when they are mentioned in requirements.txt?
Asked Answered
R

3

6

Context : This is the problem https://github.com/pypa/pip/issues/6717#issue-468204416 I'm facing
and trying to solve via https://github.com/pypa/pip/issues/6717#issuecomment-511652167

I want to use

--no-build-isolation

In a py2.7 venv If I do:

pip install bottleneck==1.2.1 --no-build-isolation

Collecting bottleneck==1.2.1
Collecting numpy (from bottleneck==1.2.1)
  Downloading https://files.pythonhosted.org/packages/d7/b1/3367ea1f372957f97a6752ec725b87886e12af1415216feec9067e31df70/numpy-1.16.5-cp27-cp27mu-manylinux1_x86_64.whl (17.0MB)
    100% |████████████████████████████████| 17.0MB 1.2MB/s 
Installing collected packages: numpy, bottleneck
Successfully installed bottleneck-1.2.1 numpy-1.16.5
You are using pip version 18.0, however version 19.2.3 is available.
You should consider upgrading via the 'pip install --upgrade pip' command.

It installs fine

$ cat abc.txt 
bottleneck==1.2.1, --no-build-isolation

but

$pip install -r abc.txt
Usage: pip [options]

Invalid requirement: bottleneck==1.2.1, --no-build-isolation
pip: error: no such option: --no-build-isolation

You are using pip version 18.0, however version 19.2.3 is available.
You should consider upgrading via the 'pip install --upgrade pip' command.


and

$ pip install -r abc.txt
Usage: pip [options]

Invalid requirement: bottleneck==1.2.1 --no-build-isolation
pip: error: no such option: --no-build-isolation

You are using pip version 18.0, however version 19.2.3 is available.
You should consider upgrading via the 'pip install --upgrade pip' command.

don't work.

How do I go about it.

I also tried bottleneck tries to install numpy release candidate but it doesn't help.

Racy answered 11/9, 2019 at 16:13 Comment(0)
E
3

Upgrading pip to pip-20.2.2 solved this proplem for me. command

pip install --upgrade pip
Errolerroll answered 21/8, 2020 at 12:15 Comment(2)
Not working for me: ``` Seans-MacBook-Pro:connectors-python seanstory$ bin/pip3 --version pip 23.2 from /Users/seanstory/Desktop/Dev/connectors-python/lib/python3.10/site-packages/pip (python 3.10) Seans-MacBook-Pro:connectors-python seanstory$ bin/pip3 install -r requirements/tests.txt Usage: pip3 [options] ERROR: Invalid requirement: memray==1.8.1, --no-build-isolation pip3: error: no such option: --no-build-isolation ```Vamoose
Looks like pip no longer supports this option. See: pip.pypa.io/en/latest/reference/requirements-file-format/…Vamoose
V
2

These days (pip 23) --no-build-isolation is not listed as one of the supported options in a requirements.txt file. See: https://pip.pypa.io/en/latest/reference/requirements-file-format/#supported-options

Vamoose answered 20/7, 2023 at 15:29 Comment(0)
B
0
pip install --upgrade pip

then in requirements.txt, add:

bottleneck==1.2.1, --global-option="--no-build-isolation"
Bartolomeo answered 20/8, 2024 at 7:8 Comment(0)

© 2022 - 2025 — McMap. All rights reserved.