-
Notifications
You must be signed in to change notification settings - Fork 427
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
how to use conda develop? #1992
Comments
From @asmeurer on August 25, 2015 20:5 Yes, it is. Note that there have been some improvements to it in recent versions of |
From @arsenovic on August 25, 2015 20:13 so, the usage is to:
? |
From @Hornswoggles on June 23, 2016 5:33 Bump. I also don't understand how this is supposed to be used. I've read through the documentation. Can you give an example? The documentation as written is insufficient. |
Ok, so I ran the command and it created the conda.pth fils in site-packages. However python can't find the module. |
I had a lot of problems when trying to install a development version of a package into a virtual environment and using it inside spyder. Here are the steps that worked for me (Windows 10-64bit):
$ This should allow you to use the development version of a library when using spyder from a conda virtual environment. |
Bump. Docs are really insufficient for this command. Keep getting Got around the first error because
Dealt with that by Now I am getting
Odd thing is that it is looking for python3.5 in my python2.7 env.
Works fine. |
Thanks for the reminder. This function has not been maintained in some time. Ideally, it would create environments for you, with your code set up with Instead, I recommend creating whatever environment you want, activating it, and then running |
@msarahan do you have any recommendations for how to create a conda environment based on the runtime dependencies declared in a meta.yaml file? Ideally, the file would go through Jinja templating. I've noticed that that conda build test environments look very similar to what I want, except that they try and install the built package. For conda develop, we would want a test environment excluding the package under test. |
Nothing that exists as a nice bundled command right now. If you'd like to add a PR to change conda-develop, it would be most welcome. It should be readily achievable with something like:
Putting that behind a nice CLI is more than I have time for right now, but if you have questions, I'll be happy to answer them. |
I ran the 'conda-develop -n ' command as suggested by ryscet and it worked to install my package in develop mode but Python wouldn't actually find it until I deleted the standard one that I had conda installed previously from conda-forge (i.e. an earlier, non-development version of the same module with the same name) into my default conda environment. It seems like even from within my new environment, if I try to import the development version, it will find the installed version from the default environment. Is there an easy way around this? |
Seems to me that it would be better to have a It would install all the built binaries to bin, lib etc. It could use a temporary symlink to handle anything that the build script copies to the site-packages directory. Obviously there are more details to work out though. |
Beside the built binaries, there are also the activate.d / deactivate.d scripts to consider. I mainly (or rather, only) use these to set environment variables. Perhaps something to keep in mind for conda/conda#6820? |
Why this would be a nice feature to have, is because using conda build mypkg
conda create -n myenv --use-local mypkg # will pull in deps
source activate myenv
conda remove mypkg
python setup.py develop
cd ~/.conda/envs/myenv
mkdir -p etc/conda/activate.d
mkdir -p etc/conda/deactivate.d
# Populate scripts in activate.d and deactivate.d Non-python binaries have to be built twice, i.e. once when I build the package, and again in my develop environment. Of course, I'm not complaining, as any of us here could take the time to make this work, if we had it. Just making the case for something better. |
That's more or less my workflow as well. One way to deal with the built binaries, activate scripts, etc is to move these to one subpackage, and the Python source to another. Setting up a Python dev environment would then amount to installing only the former subpackage, while using This will undoubtedly work (haven't tested it though). But I don't like it very much because it splits the original package up into multiple outputs, while their contents clearly belongs together. Also, everybody who wants to replicate this kind of setup has to fiddle with multiple However, this begs the question: would the only use of such a command be Python development, or does it need to target other languages as well? If the answer is no, then it would be straightforward to design IMHO ("install dependencies and build & copy everything except things in If the answer is yes, I wouldn't know where to begin. Anyway, I think we're straying a bit offtopic here. Perhaps time for a separate issue? |
Is someone working on a fix to this? I'm asking because, if not, I'd love to take a crack at this. I've been spending a lot of free time recently trying to get the new windows terminal to build, and this seems a lot more fun/useful. |
No, I don't think anyone is actively working on this right now. If you have questions on anything, let us know. |
This also sounds like great fun to me. |
Awesome! I'll try to wrap my head around it first until I have some specific questions. |
I see now that this is quite a ball of yarn 🤔 |
Just take it in small steps. What After that, the tricky thing to get right is the user workflow. Where does the environment live on the user's hard drive by default? How can people tell their IDE's to use that environment in an easy way? Perhaps the IDEs could recognize conda recipes in a standard way and offer to use conda-develop when hacking on a project? |
so is |
This procedure doesn't seem to work anymore in conda 4.7 because the |
Apparently there is |
how do I see the packages that I've installed in development mode? I ran
however, I get errors when I run my scripts:
but when I do conda list I don't see anything I recognize:
anyone know whats going on or at least where the packages I've installed in development mode would show up? |
|
I came from the manual of
As a data scientist, I generally use |
what are you trying to do? |
I suppose I have the same questions as @WenjieZ has:
Now my questions:
|
@floschl All good questions. I would add how to combine the requirements in the |
Yes true, pip install -e . will install the package according to setup.py. Is there an equivalent command for conda to install a conda package locally without creating a channel? |
is there an additional command we need to run before
|
I noticed that if you installed a package which requires a change to your python version, you will end up losing the references to packages installed before. |
conda-build folks say: `pip install -e` is still recommended. `conda develop` has not seen any development lately. conda/conda-build#1992 (comment)
conda-build folks say: `pip install -e` is still recommended. `conda develop` has not seen any development lately. conda/conda-build#1992 (comment)
Summary: conda-build folks say: `pip install -e` is still recommended. `conda develop` has not seen any development lately. conda/conda-build#1992 (comment) Pull Request resolved: #541 Reviewed By: danielrjiang Differential Revision: D23634882 Pulled By: Balandat fbshipit-source-id: e611f8a39ce5ce7a2e0fc8f8fac931617a41d241
xref: proposal to deprecate and remove |
Hi there, thank you for your contribution! This issue has been automatically marked as stale because it has not had recent activity. It will be closed automatically if no further activity occurs. If you would like this issue to remain open please:
NOTE: If this issue was closed prematurely, please leave a comment. Thanks! |
Yes the issue at hand still exists: that |
Draft of a modern Python-standards "no setup.py required" develop replacement #5380 |
From @arsenovic on August 24, 2015 20:11
im not sure how to use this command. is this supposed to operate like
python setup.py develop
?Copied from original issue: conda/conda#1546
The text was updated successfully, but these errors were encountered: