Passing src for pip to conda env create
up vote
2
down vote
favorite
I am creating a conda environment using conda env create --json --force -f ${CONDA_ENV_FILE} where there is a pip section in the file that contains some editable git installs. I would like to control where the git clone happens. pip has a flag --src that can be set to control that. Is there a way to have conda pass that flag to pip?
conda
add a comment |
up vote
2
down vote
favorite
I am creating a conda environment using conda env create --json --force -f ${CONDA_ENV_FILE} where there is a pip section in the file that contains some editable git installs. I would like to control where the git clone happens. pip has a flag --src that can be set to control that. Is there a way to have conda pass that flag to pip?
conda
add a comment |
up vote
2
down vote
favorite
up vote
2
down vote
favorite
I am creating a conda environment using conda env create --json --force -f ${CONDA_ENV_FILE} where there is a pip section in the file that contains some editable git installs. I would like to control where the git clone happens. pip has a flag --src that can be set to control that. Is there a way to have conda pass that flag to pip?
conda
I am creating a conda environment using conda env create --json --force -f ${CONDA_ENV_FILE} where there is a pip section in the file that contains some editable git installs. I would like to control where the git clone happens. pip has a flag --src that can be set to control that. Is there a way to have conda pass that flag to pip?
conda
conda
asked Apr 4 at 14:55
Alex Rothberg
2,50242766
2,50242766
add a comment |
add a comment |
1 Answer
1
active
oldest
votes
up vote
0
down vote
tl;dr sort of: you can use PIP_SRC=<src_folder> to override the default src folder.
Sadly conda doesn't currently support use of the --src flags because it runs pip install -r requirements.txt under the hood, without any way of injecting global pip options (see source code).
The requirements.txt file format specification specifies that --src isn't a supported global option, so we can't go down that route, however there is a --install-option option that is supported on a per project basis that allows you to pass arbitrary options to the dependency's setup.py invocation however at this stage it's too late as the dependency has already been downloaded at this point.
One saving grace is the fact all of pip's flags can be specified as environment variables, so if you want to specify pip install --src <src_dir> blah you can use PIP_SRC=<src_dir> pip install blah
add a comment |
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
0
down vote
tl;dr sort of: you can use PIP_SRC=<src_folder> to override the default src folder.
Sadly conda doesn't currently support use of the --src flags because it runs pip install -r requirements.txt under the hood, without any way of injecting global pip options (see source code).
The requirements.txt file format specification specifies that --src isn't a supported global option, so we can't go down that route, however there is a --install-option option that is supported on a per project basis that allows you to pass arbitrary options to the dependency's setup.py invocation however at this stage it's too late as the dependency has already been downloaded at this point.
One saving grace is the fact all of pip's flags can be specified as environment variables, so if you want to specify pip install --src <src_dir> blah you can use PIP_SRC=<src_dir> pip install blah
add a comment |
up vote
0
down vote
tl;dr sort of: you can use PIP_SRC=<src_folder> to override the default src folder.
Sadly conda doesn't currently support use of the --src flags because it runs pip install -r requirements.txt under the hood, without any way of injecting global pip options (see source code).
The requirements.txt file format specification specifies that --src isn't a supported global option, so we can't go down that route, however there is a --install-option option that is supported on a per project basis that allows you to pass arbitrary options to the dependency's setup.py invocation however at this stage it's too late as the dependency has already been downloaded at this point.
One saving grace is the fact all of pip's flags can be specified as environment variables, so if you want to specify pip install --src <src_dir> blah you can use PIP_SRC=<src_dir> pip install blah
add a comment |
up vote
0
down vote
up vote
0
down vote
tl;dr sort of: you can use PIP_SRC=<src_folder> to override the default src folder.
Sadly conda doesn't currently support use of the --src flags because it runs pip install -r requirements.txt under the hood, without any way of injecting global pip options (see source code).
The requirements.txt file format specification specifies that --src isn't a supported global option, so we can't go down that route, however there is a --install-option option that is supported on a per project basis that allows you to pass arbitrary options to the dependency's setup.py invocation however at this stage it's too late as the dependency has already been downloaded at this point.
One saving grace is the fact all of pip's flags can be specified as environment variables, so if you want to specify pip install --src <src_dir> blah you can use PIP_SRC=<src_dir> pip install blah
tl;dr sort of: you can use PIP_SRC=<src_folder> to override the default src folder.
Sadly conda doesn't currently support use of the --src flags because it runs pip install -r requirements.txt under the hood, without any way of injecting global pip options (see source code).
The requirements.txt file format specification specifies that --src isn't a supported global option, so we can't go down that route, however there is a --install-option option that is supported on a per project basis that allows you to pass arbitrary options to the dependency's setup.py invocation however at this stage it's too late as the dependency has already been downloaded at this point.
One saving grace is the fact all of pip's flags can be specified as environment variables, so if you want to specify pip install --src <src_dir> blah you can use PIP_SRC=<src_dir> pip install blah
edited Nov 18 at 19:48
answered Nov 18 at 18:55
Will
29159
29159
add a comment |
add a comment |
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f49654239%2fpassing-src-for-pip-to-conda-env-create%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown