Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

pip3 install does not seem to support --install-option anymore

With:

  • pip 20.3.4-4 or 21.3.1
  • python3.9 3.9.8-1 or 3.9.9-1
  • python3-setuptools 59.6.0 or 60.0.3

and build-requirements.txt containing:

. --install-option='--install-purelib=/usr/lib/python3/dist-packages'

the following command fails to install the package from source (pygments in this instance):

python3 -m pip install . --root="../package-build" --prefix=/usr -r build-requirements.txt
ERROR: Location-changing options found in --install-option: ['--install-purelib'] from file:///git-pygments (from -r build-requirements.txt (line 1)). This is unsupported, use pip-level options like --user, --prefix, --root, and --target instead.

Using --install-option on the CLI level (instead of inside a requirements file) has a similar fate.

However, the official docs state that the usage of --install-option is supported:

  • pip documentation
  • 'Installing Python Modules (Legacy version)' documentation

Am I missing something or is this an issue with pip?

like image 844
jean-christophe manciot Avatar asked Jan 28 '26 14:01

jean-christophe manciot


1 Answers

Use --config-settings instead.

like image 101
Sam Avatar answered Jan 31 '26 21:01

Sam