Skip to content
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

Deprecate or remove conda develop #4251

Open
jjpr-mit opened this issue Jul 20, 2021 · 16 comments
Open

Deprecate or remove conda develop #4251

jjpr-mit opened this issue Jul 20, 2021 · 16 comments
Labels
backlog issue has been triaged but has not been earmarked for any upcoming release help-wanted we don't know the solution or we especially want a community member to contribute the code change severity::2 critical; broken functionality with an unacceptably complex workaround source::community catch-all for issues filed by community members type::feature request for a new feature or capability type::tech-debt identifies or resolves some technical debt

Comments

@jjpr-mit
Copy link

The conda develop command has been informally deprecated multiple times:

But it is still present in the code and in the documentation. That is very likely misleading to anyone trying to learn best practices for scientific computing.

Example scenario: As soon as a new scientific programmer gets comfortable enough with Python to start working on multiple projects, the next logical step is to learn how to manage environments and dependencies. They'll start by adding a setup.py with dependencies to each project, and most likely they'll start using conda to manage environments. (That's what I recommend to users of the servers I manage.) They'll create a conda environment, activate it, and then run pip install -e ., and the code from their project and all its dependencies will be available to anything they run in that environment. If they use Jupyter, they'll install that environment as a kernel.

And then, as development progresses, they'll add more stuff. They'll conda install more packages. And now they have a problem: as described in the current documentation, it's dangerous to interleave conda install and pip install. Inevitably they'll end up with an environment that's inconsistent, un-upgradeable and unusable.

On their next project, they'll try to avoid that problem. The logical solution is to use whatever is the equivalent of pip install -e in conda. Which will lead them to conda develop, which looks like the solution to their problem. They will then waste a day or more trying to get conda develop to work, eventually stumbling across #1992 or #2633. And then they will curse the name of the person who exhorted them to use conda and follow best practices. Which in several cases has been me.

Please deprecate or remove conda develop.

@astrojuanlu
Copy link

astrojuanlu commented Feb 27, 2022

I arrived here after trying to figure out what conda develop is because it's mentioned in the SciPy developer documentation. If it's not maintained, the best thing to do is indeed to deprecate and remove it.

The logical solution is to use whatever is the equivalent of pip install -e in conda.

This was my go-to solution too, but as mentioned by @rgommers in this scipy-dev thread, one needs to be careful with at least two things:

In sum, the closest replacement to python setup.py develop or conda develop . these days is probably:

pip install --no-build-isolation --no-deps -e .

(I might be missing other deviations from setup.py develop but I think I have captured the two most important ones)

@EricThomson
Copy link

EricThomson commented Feb 27, 2022

I am confused. Has conda provided a canonical source of guidance on this (outside of offhand comments from individuals in issue threads)? It seems extremely important to address, once someone is making the move from user of packages to contributor.

@astrojuanlu
Copy link

I am confused. Has conda provided a canonical source of guidance on this (outside of offhand comments from individuals in issue threads)?

To my knowledge, no. That would be the first point to address.

@maximlt
Copy link

maximlt commented Feb 27, 2022

I'm watching this issue since I've been wondering about some time already about the status of conda develop. Thanks @astrojuanlu for your analysis, in the holoviz group we've also been using pip install --no-build-isolation --no-deps -e . to install a package in dev mode in a conda environment that already included all its dependencies.

Maybe @jezdez would know a little more about the status of conda develop?

@rgommers
Copy link

Imho it's not necessarily Conda's job to do this. All that's needed is a simple way to install a .pth file into site-packages pointing at the location where the development version of a package is installed if that is outside of site-packages itself. This only has to be done once, and not on every rebuild.

This could be done by pip or installer, by a build backend, or by a standalone utility. For Meson I'll have to deal with this at some point, because development installs are not going to be inplace - so conda develop . wouldn't be doing the right thing anyway (nor pip, unless the build backend told it the correct path). It's pretty low on my wish list, but plan to revisit at some point around the next SciPy release.

@Nodd
Copy link

Nodd commented May 12, 2022

I am using pip ìnstall -e . in a conda environment. It works quite well (even with cython builds), but the problem I have is with the dependencies. Pip checks and installs missing dependancies in the conda environments, which creates a mess. I have to install dependancies beforehand as a manual step, and then I install with pip in development mode. This features kind of makes it a conda job...

@chbrandt
Copy link

chbrandt commented Jul 7, 2022

@Nodd did you check this comment: #4251 (comment) ?

@b4rlw
Copy link

b4rlw commented Jan 18, 2023

@astrojuanlu Thanks for the information, I didn't know of the existence of the --no-deps flag.
However, is it strictly necessary to depreciate conda develop? It was perfectly serviceable once upon a time and I see no reason why it couldn't be again with some time and attention. It's always seemed strange to me to have to outsource such an essential function to a different ecosystem.

@astrojuanlu
Copy link

That's a call for the conda devs to make. If it's not maintained and it's half-working, I think it's a disservice to have it in the CLI. If folks want it back, then it needs maintenance. The current state is not ideal IMHO.

@mbaudin47
Copy link

mbaudin47 commented Aug 2, 2023

@jjpr-mit: I was using conda develop until now where it is deprecated. What solution would you suggest to use instead of using that tool and that does not use pip (since mixing pip and conda can lead to terrible results ; see stackoverflow)?

@astrojuanlu
Copy link

astrojuanlu commented Aug 2, 2023

@mbaudin47 The pip command suggested above #4251 (comment) should not interfere with conda because it doesn't install any dependencies.

Having said that, it's the 2 year anniversary of this issue and we still don't have an official pronouncement from the conda team.

The two comments referred at the beginning of this thread are from 2018 and 2019. It's unclear what has changed since then.

A "yes, we intend to keep conda develop around and eventually fix its problems" would be nice (in which case, this issue should probably be closed). Alternatively, "yes, conda-develop is no longer the blessed way to do development installs and users are encouraged to find alternatives" would be nice too.

@jezdez
Copy link
Member

jezdez commented Sep 21, 2023

Hey all, just catching up on this, making a call for the new @conda/builds-tools: conda develop is old at best, and doesn't do what it says on the tin (anymore).

I'd suggest updating it to call pip install --no-build-isolation --no-deps -e . if pip is available and not deprecating it.

@jezdez jezdez added type::feature request for a new feature or capability type::tech-debt identifies or resolves some technical debt severity::2 critical; broken functionality with an unacceptably complex workaround source::community catch-all for issues filed by community members backlog issue has been triaged but has not been earmarked for any upcoming release labels Sep 21, 2023
@jezdez jezdez added the help-wanted we don't know the solution or we especially want a community member to contribute the code change label Sep 21, 2023
@jaimergp
Copy link
Contributor

I'd suggest updating it to call pip install --no-build-isolation --no-deps -e . if pip is available and not deprecating it

At the risk of being pedantic, someone somewhere might be using conda developfor non Python stuff and having pip in the mix in that case would be confusing. What about:

  1. (Optional) Apply some heuristic (presence of setup.py, pyproject.toml, etc) to detect whether we are dealing with a Python dep.
  2. Print a friendly message informing about the recommended {sys.executable} -m pip invocation (emphasis on python -m, we don't want users running their system's pip if the environment is not active)
  3. If not Python, then well, apologize profusely.

@jaimergp
Copy link
Contributor

(If you want to get fancy we could run grayskull too and anticipate the conda dependencies that are needed in the env; then run python -m pip ...)

@JeanChristopheMorinPerso
Copy link
Contributor

Could we potentially call it something else? Which means we would deprecate develop, create a new command, say py-develop or something like that, and after a certain period of time, remove develop? Or do we foresee having to support the python development/editable mode in other languages other than Python in the future?

@dholth
Copy link
Contributor

dholth commented Jun 17, 2024

I've written about how I would implement conda-develop on the linked conda-pypi#35 issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backlog issue has been triaged but has not been earmarked for any upcoming release help-wanted we don't know the solution or we especially want a community member to contribute the code change severity::2 critical; broken functionality with an unacceptably complex workaround source::community catch-all for issues filed by community members type::feature request for a new feature or capability type::tech-debt identifies or resolves some technical debt
Projects
Status: No status
Development

No branches or pull requests