Reputation: 791
Is it possible to have an environment variable as a part of the index url in pip.conf
?
I tried using $
and ${}
but it does not resolve the variables
Upvotes: 15
Views: 18104
Reputation: 6061
You can set environment variables for pip to use instead of specifying them in pip.conf
file.
Use export PIP_DEFAULT_INDEX_URL='some_url.com'
to set them.
To list all config, use pip config list
. They should be set.
But beware of config precedence:
--host=foo
overridesPIP_HOST=foo
PIP_HOST=foo
overrides a config file with[global] host = foo
A command specific section in the config file []
host = bar
overrides the option with same name in the [global] config file section
Upvotes: 13