pip clone/ pip copy : install packages in a new environment based on existing envs
See original GitHub issueWhat’s the problem this feature will solve?
This will allow to install packages in a new environment based on existing environments
Describe the solution you’d like
Some projects needs to be based on others totally different projects with differents dependencies. This new command will allow to install all dependencies of the new project (by mirroring existing dependencies of another project) without trying to face which dependencies it needs or duplicate version.
It could be with another new pip command called pip clone --source path/to/en1 /path/to/env/2 /path/to/env/3 --target path/to/new_env
Also, if pip clone
is executed with only one path (like pip clone --source path/to/en1
), this will simply copy the environment to the new path, this will allow to simply create new environments without doing all the pip freeze
and pip install
flow.
Also if there is conflict between dependecy version, this command will prompt the user which version it should keep.
Like version conflict detected between numpy 1.1.0 and numpy 1.1.9 : which one would you keep ?
Alternative Solutions
There is this project https://pypi.org/project/merge-requirements/
But this not a really solution because it still requires to extract requirements.txt files with the pip freeze
command.
What this feature request suggest is to put all this flow in background with execution of a simple command pip clone
Issue Analytics
- State:
- Created 3 years ago
- Comments:6 (4 by maintainers)
-1. This sounds like a highly specialised need which is currently possible using
pip freeze
and merging the requirement files, as noted. I don’t think pip should get a whole new subcommand for something this specialised. But I’d be happy to reconsider if more use cases turned up.Closing since (it seems to me that) the existing solutions on SO are good-enough for nearly everyone. 😃