-
Notifications
You must be signed in to change notification settings - Fork 3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update optimizer for lib versions and backuper for optimal and last working requirements #12427
Comments
Are you referring to external dependencies or python package dependencies? For external ones this is currently outside the scope of what Python package installers and managers can do, but conda can handle this to some extent for you, so you might want to use that. For Python package dependencies Pip only resolves install packages, not ones in the environment. There is a pretty easy work around that looks something like this:
Pip-tools also offers a workflow that manages your environment via a constraint based lock file. Or you could look at Python package environment managers, such as PDM, Poetry, or Pixi. |
Yes, external. It must be solved and I think should be implemented around PIP.. |
I don't know what either of those two things mean, conda works fine in a shell, and the very latest version of conda has amazing dependency resolution speed. Maybe you are confusing Anaconda with conda? I would look at using miniforge or miniconda (although there are licensing issues with miniconda I do not like).
There has been some discussion on external dependencies, see https://discuss.python.org/t/pep-725-specifying-external-dependencies-in-pyproject-toml and https://peps.python.org/pep-0725/ But even if implemented this is a long way off a Python package installer or manager understanding, or even resolving on, external dependencies. |
Hhuh.. but the main question.. Is conda or miniconda have option to select right optimal external libs? |
External libraries (i.e., libraries not packaged as Python wheels) are out of scope for pip, and will remain so. PEP 725 might provide a mechanism whereby pip could report that needed libraries were not installed in the system, but frankly I doubt it (as that PEP doesn't provide a cross-platform way of asking "is external library XXX installed?") So the answer to your question (at least to the extent I understand what you're asking for) is sorry, but no - pip does not support this, and we're not looking to add such support. |
Soo.. the basic value for users, programmers is out of scope.. |
Pip is a python package manager, not a general package manager. (Note: I'm only responding because I'm concerned we might be misunderstanding each other as far as what we mean by "external libraries" - your original example was Jupyter, which as far as I understand doesn't need any external libraries, at least on Windows, so it's possible you mean something different than I think you do). |
Here is elements that Jupyter needs in general as a complex in some basic area:
Touch any of this due other libs can broker whole fundamental ground to work.. what I meet many times dupe install other and update related as required and due lack of knowledge what is stable around all, eg IPython and related. |
Those are Python requirements.
So I think what you're actually trying to say is that pip allows you to (for example) upgrade If that's what you mean, then yes, that's (unfortunately) a deliberate limitation of pip. Many people have environments with thousands of installed packages, and checking everything while we're doing dependency resolution is very costly. So we limit the checks we do to packages that a given pip run knows about (i.e., ones the user has specified on the command line, and their dependencies). The I will note that if I run
I get the following output:
Note the message near the end (which is in red on the console) - this explicitly says that you now have a broken environment. The I hope this helps - it may not be quite as automatic as you'd like, but it is possible to ensure your environments are always in a consistent state using |
In short.. but problem is more advanced.. take again the ticket.. Its about
Which cost? CPU or coder time? : ) I believe in million libs.. but it's not the case for manually checking.. but some tools.. - soo PIP or other.. or wee still can be stuck.. And.. sure.. it's easy to do broken environment, coz.. The problem is as I described that PIP not checking whole dependency.. and not optimizing.. around some reference libs or app like Jupyter. In fact we can check whole libs outside jupyter to be up to date with all, but must be checked. We can do more.. eg. after some issue around dependency hell issue user trying uninstall lib, the PIP can ask about problems around to report some relations problems (eg. giving stars for versions). Note that is not only traitlets but alos tornado, jupyter-client jupyter-serve jupyterlab-code-formatter then voila-gridstack, voila in general... then cython problems.. etc.. etc.. Reported pip check not taking all related libs.. |
I guess if that's your view, then all I can say is that PRs are welcome. I personally think the trade-offs are such that this won't happen, but I'm willing to be convinced otherwise if someone can provide working code that shows it's possible to do it in an efficient manner... |
Not only my.. check link.. PR as communicating negative experience? |
What's the problem this feature will solve?
I'm looking some option to update jupyter or other to this version where other installed libs will be compatible or updated to optmial versions, eg. force re-instal to older main app and related libs. Soo I need some "indication" to right version between all version.
Soo.. when update.. then probably pip should alert and inform possible conflicts and not install new version if older are incompatible in some iteration of update and ask that I'm sure that something can't work or list optimal version to update to minimize impact for some old libs, eg. list of suggested version to update where 75% libs are compatible as tools, etc. or 50%, 25% and of course.. 95% is most of desirable.
Right now I stuck.. fighting with pip to find some optimal version.. but how..
Describe the solution you'd like
From my perspective should exist some tool that will be adequate do build info for:
pip install -r requirements.txt --upgrade
Eg, then tool can build many requirements.txt regarding compatibility range to select, eg.:
Then user can select 5 as prefix in file 5_requirements_95_p.txt and ok.. not working? Ok.. taking other version of requirements.
I know is big issue and most of out of scope from jupyter, but in fact jupyter is most of advanced env and application where user experiencing problems and doing bad efforts to find solution to repair env and app in case like this ticket.
Soo
5_requirements_95_p.txt
must have a conditions for version as < > =< >= that are optimal for update.Alternative Solutions
Should be compatible with some GUI manager. Eg. dir in pip like
requirements/
where can be requirements for some updating app eg.requirements/jupyter/requirements_versions.txt
then inside otherAdditional context
jupyter/notebook#7177 (comment)
Code of Conduct
Tasks
Not sure about: https://github.com/jazzband/pip-tools/
The text was updated successfully, but these errors were encountered: