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

how to use conda develop? #1992

Open
kalefranz opened this issue May 6, 2017 · 44 comments
Open

how to use conda develop? #1992

kalefranz opened this issue May 6, 2017 · 44 comments
Labels
stale::recovered [bot] recovered after being marked as stale

Comments

@kalefranz
Copy link
Contributor

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

@kalefranz
Copy link
Contributor Author

From @asmeurer on August 25, 2015 20:5

Yes, it is. Note that there have been some improvements to it in recent versions of conda-build.

@kalefranz
Copy link
Contributor Author

From @arsenovic on August 25, 2015 20:13

so, the usage is to:

git clone xyz 
conda develop /path/to/xyz

?

@kalefranz
Copy link
Contributor Author

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.

@handras
Copy link

handras commented Jun 7, 2017

Ok, so I ran the command and it created the conda.pth fils in site-packages. However python can't find the module.
How is this .pth supposed to work? Can't find anything in the docs.

@ryscet
Copy link

ryscet commented Jul 17, 2017

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):
Note: All commands are run inside anaconda-prompt. Do not activate the virtual environment as you will not be able to use conda-build commands.

  1. Install conda-build which includes conda-develop command.
    $ conda install conda-build

  2. (For Spyder users only) Clone the git repository you want to build into the site-packages folder of the virtual environment you are using. Otherwise only a link is created and spyder does not see the package. Alternatively you can add a path to the git repo directory in Spyder>Tools>PYTHONPATH manager

  3. Run conda develop and specify the path of git repo and a virtual env to install it into

$ conda-develop <path to git repo> -n <env name>

This should allow you to use the development version of a library when using spyder from a conda virtual environment.

@soamaven
Copy link

soamaven commented Aug 15, 2017

Bump. Docs are really insufficient for this command. Keep getting NoPackagesFound error.

Got around the first error because conda-build was not installed properly. Installing that gave me:

InstallError: Error: the following specs depend on 'conda' and can only be installed
into the root environment: conda-build

Dealt with that by sudo conda install conda-build from root dir.

Now I am getting

$ conda-develop path/to/packake -n myPython2env
FileNotFoundError: [Errno 2] No such file or directory: '/home/user/anaconda3/envs/myPython2env/lib/python3.5/site-packages/conda.pth'

Odd thing is that it is looking for python3.5 in my python2.7 env.

$ conda-develop path/to/packake -n myPython35env
FileNotFoundError: [Errno 2] No such file or directory: '/home/user/anaconda3/envs/myPython35env/lib/python3.5/site-packages/conda.pth'

Works fine.

@msarahan
Copy link
Contributor

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 python setup.py develop or pip install -e .. Unfortunately, time has not permitted me to make this what I want it to be.

Instead, I recommend creating whatever environment you want, activating it, and then running python setup.py develop or pip install -e . so that your package is installed in develop mode in that environment.

@gatesn
Copy link

gatesn commented Nov 15, 2017

@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.

@msarahan
Copy link
Contributor

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:

from conda_build import api
from conda_build.environ import create_env
# this gets tricky for recipes with multiple outputs, but is simple for recipes with only one.  To simplify, pick only the first metadata object.
metadata = api.render(path_to_recipe)[0][0]
# collect dependencies from run and test
deps = metadata.get_value('requirements/run') + metadata.get_value('test/requires')
create_env(desired_location, deps, env='run', config=metadata.config, subdir=metadata.config.subdir)

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.

@marykthompson
Copy link

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?

@orodbhen
Copy link

Seems to me that it would be better to have a --develop flag for conda-build. Then each time you ran conda-build it would compile all your non python stuff as well via build.sh.

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.

@teake
Copy link
Contributor

teake commented Feb 25, 2019

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?

@orodbhen
Copy link

Why this would be a nice feature to have, is because using setup.py develop doesn't take care of dependencies. Currently, I have to do:

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.

@teake
Copy link
Contributor

teake commented Feb 26, 2019

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 conda develop to do a "symlinked install" of the latter.

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 outputs sections in their recipe. I'd much rather have a more evolved conda develop that would handle this situation automatically.

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 site-packages -- that should be symlinked").

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?

@znd4
Copy link
Contributor

znd4 commented May 13, 2019

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.

@msarahan
Copy link
Contributor

No, I don't think anyone is actively working on this right now. If you have questions on anything, let us know.

@mingwandroid
Copy link
Contributor

I've been spending a lot of free time recently trying to get the new windows terminal to build

This also sounds like great fun to me.

@znd4
Copy link
Contributor

znd4 commented May 13, 2019

No, I don't think anyone is actively working on this right now. If you have questions on anything, let us know.

Awesome! I'll try to wrap my head around it first until I have some specific questions.

@znd4
Copy link
Contributor

znd4 commented May 19, 2019

I see now that this is quite a ball of yarn 🤔

@msarahan
Copy link
Contributor

Just take it in small steps. conda-debug already lays a decent foundation. Try to think of it as conda-debug but with an extra layer to connect some external source into the created environment. This is hard to generalize, but easy enough for python stuff. You'd typically just create an env that combined build, host, run, and test deps from the recipe, and then run pip install -e <path to source code>

What conda-debug already does is to create the build and host envs, or the run/test env, not all rolled into one. I hope it won't be too hard to have a way to combine them.

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?

@brando90
Copy link

so is conda develop ready to be used or should we still be using pip install -e?

@hugobuddel
Copy link
Contributor

Currently, I have to do:

conda build mypkg
conda create -n myenv --use-local mypkg  # will pull in deps
source activate myenv
conda remove mypkg

This procedure doesn't seem to work anymore in conda 4.7 because the remove step will automatically remove (dangling?) dependencies too.

@hugobuddel
Copy link
Contributor

Apparently there is conda install --only-deps, which should be able to replace the install/uninstall routine to get dependencies.

@3tilley
Copy link

3tilley commented Sep 22, 2019

@msarahan have you got a summary of the limitations?

@msarahan
Copy link
Contributor

  1. conda is not strictly a python tool. What does it mean to "develop" a C library? R library?
  2. Even with Python, how do you handle compiled extensions?

I haven't looked at conda-develop in so long that I can't even begin to say what it does, let alone its shortcomings. Given my recommendations above regarding conda-debug and pip install, you may want to try to replicate that with conda-develop. I don't think you can, but that will show you its shortcomings.

@3tilley
Copy link

3tilley commented Sep 24, 2019

I think a user would expect that it would put your environment in the state that it would be if the filepath in its current state had conda build run, the artifact uploaded, and they had installed that artifact - is that runtime agnostic? For compiled code I guess there would have to be some logic to force recompilation on file change I guess, but that wouldn't to be in a first pass.

Would you be happy for me to make a documentation update to reflect that it's deprecated functionality? I understand the difficulties, but I must have been on the conda develop doc page 20 times over the years things thinking it would do what pip -e does!

@brando90
Copy link

how do I see the packages that I've installed in development mode?

I ran conda develop . and it seems it installed it:

(automl-meta-learning) brandomiranda~/automl-meta-learning/automl ❯ conda develop .
path exists, skipping /Users/brandomiranda/automl-meta-learning/automl
completed operation for: /Users/brandomiranda/automl-meta-learning/automl

however, I get errors when I run my scripts:

(automl-meta-learning) brandomiranda~/automl-meta-learning/automl/automl/meta_optimizers ❯ python differentiable_SGD.py
Traceback (most recent call last):
  File "differentiable_SGD.py", line 8, in <module>
    from automl.utils.torch_utils import helloworld
ModuleNotFoundError: No module named 'automl.utils'

but when I do conda list I don't see anything I recognize:

(automl-meta-learning) brandomiranda~/automl-meta-learning/automl/automl/meta_optimizers ❯ conda list
# packages in environment at /Users/brandomiranda/miniconda3/envs/automl-meta-learning:
#
# Name                    Version                   Build  Channel
appnope                   0.1.0                    py37_0
asn1crypto                1.3.0                    py37_0
astroid                   2.3.3                    py37_0
attrs                     19.3.0                     py_0
backcall                  0.1.0                    py37_0
beautifulsoup4            4.8.2                    py37_0
blas                      1.0                         mkl
bleach                    3.1.0                    py37_0
bzip2                     1.0.8                h1de35cc_0
ca-certificates           2019.11.27                    0
certifi                   2019.11.28               py37_0
cffi                      1.13.2           py37hb5b8e2f_0
chardet                   3.0.4                 py37_1003
conda                     4.8.1                    py37_0
conda-build               3.18.11                  py37_0
conda-package-handling    1.6.0            py37h1de35cc_0
cryptography              2.8              py37ha12b0ac_0
cycler                    0.10.0                   py37_0
dbus                      1.13.12              h90a0687_0
decorator                 4.4.1                      py_0
defusedxml                0.6.0                      py_0
entrypoints               0.3                      py37_0
expat                     2.2.6                h0a44026_0
filelock                  3.0.12                     py_0
freetype                  2.9.1                hb4e5f40_0
gettext                   0.19.8.1             h15daf44_3
glib                      2.63.1               hd977a24_0
glob2                     0.7                        py_0
icu                       58.2                 h4b95b61_1
idna                      2.8                      py37_0
importlib_metadata        1.3.0                    py37_0
intel-openmp              2019.4                      233
ipykernel                 5.1.3            py37h39e3cac_1
ipython                   7.11.1           py37h39e3cac_0
ipython_genutils          0.2.0                    py37_0
ipywidgets                7.5.1                      py_0
isort                     4.3.21                   py37_0
jedi                      0.15.2                   py37_0
jinja2                    2.10.3                     py_0
jpeg                      9b                   he5867d9_2
jsonschema                3.2.0                    py37_0
jupyter                   1.0.0                    py37_7
jupyter_client            5.3.4                    py37_0
jupyter_console           6.0.0                    py37_0
jupyter_core              4.6.1                    py37_0
kiwisolver                1.1.0            py37h0a44026_0
lazy-object-proxy         1.4.3            py37h1de35cc_0
libarchive                3.3.3                h786848e_5
libcxx                    4.0.1                hcfea43d_1
libcxxabi                 4.0.1                hcfea43d_1
libedit                   3.1.20181209         hb402a30_0
libffi                    3.2.1                h475c297_4
libgfortran               3.0.1                h93005f0_2
libiconv                  1.15                 hdd342a3_7
liblief                   0.9.0                h2a1bed3_2
libpng                    1.6.37               ha441bb4_0
libsodium                 1.0.16               h3efe00b_0
libtiff                   4.1.0                hcb84e12_0
libxml2                   2.9.9                hf6e021a_1
lz4-c                     1.8.1.2              h1de35cc_0
lzo                       2.10                 h362108e_2
markupsafe                1.1.1            py37h1de35cc_0
matplotlib                3.1.1            py37h54f8f79_0
mccabe                    0.6.1                    py37_1
mistune                   0.8.4            py37h1de35cc_0
mkl                       2019.4                      233
mkl-service               2.3.0            py37hfbe908c_0
mkl_fft                   1.0.15           py37h5e564d8_0
mkl_random                1.1.0            py37ha771720_0
more-itertools            8.0.2                      py_0
nbconvert                 5.6.1                    py37_0
nbformat                  4.4.0                    py37_0
ncurses                   6.1                  h0a44026_1
ninja                     1.9.0            py37h04f5b5a_0
notebook                  6.0.2                    py37_0
numpy                     1.18.1           py37h7241aed_0
numpy-base                1.18.1           py37h6575580_0
olefile                   0.46                     py37_0
openssl                   1.1.1d               h1de35cc_3
pandoc                    2.2.3.2                       0
pandocfilters             1.4.2                    py37_1
parso                     0.5.2                      py_0
pcre                      8.43                 h0a44026_0
pexpect                   4.7.0                    py37_0
pickleshare               0.7.5                    py37_0
pillow                    7.0.0            py37h4655f20_0
pip                       19.3.1                   py37_0
pkginfo                   1.5.0.1                  py37_0
prometheus_client         0.7.1                      py_0
prompt_toolkit            2.0.10                     py_0
psutil                    5.6.7            py37h1de35cc_0
ptyprocess                0.6.0                    py37_0
py-lief                   0.9.0            py37h1413db1_2
pycosat                   0.6.3            py37h1de35cc_0
pycparser                 2.19                     py37_0
pygments                  2.5.2                      py_0
pylint                    2.4.4                    py37_0
pyopenssl                 19.1.0                   py37_0
pyparsing                 2.4.6                      py_0
pyqt                      5.9.2            py37h655552a_2
pyrsistent                0.15.6           py37h1de35cc_0
pysocks                   1.7.1                    py37_0
python                    3.7.6                h359304d_2
python-dateutil           2.8.1                      py_0
python-graphviz           0.13.2                   pypi_0    pypi
python-libarchive-c       2.8                     py37_13
pytorch                   1.4.0                   py3.7_0    pytorch
pytz                      2019.3                     py_0
pyyaml                    5.2              py37h1de35cc_0
pyzmq                     18.1.0           py37h0a44026_0
qt                        5.9.7                h468cd18_1
qtconsole                 4.6.0                      py_1
readline                  7.0                  h1de35cc_5
requests                  2.22.0                   py37_1
ripgrep                   11.0.2               he32d670_0
ruamel_yaml               0.15.87          py37h1de35cc_0
send2trash                1.5.0                    py37_0
setuptools                44.0.0                   py37_0
sip                       4.19.8           py37h0a44026_0
six                       1.13.0                   py37_0
soupsieve                 1.9.5                    py37_0
sqlite                    3.30.1               ha441bb4_0
terminado                 0.8.3                    py37_0
testpath                  0.4.4                      py_0
tk                        8.6.8                ha441bb4_0
torchvision               0.5.0                  py37_cpu    pytorch
torchviz                  0.0.1                    pypi_0    pypi
tornado                   6.0.3            py37h1de35cc_0
tqdm                      4.41.1                     py_0
traitlets                 4.3.3                    py37_0
urllib3                   1.25.7                   py37_0
wcwidth                   0.1.7                    py37_0
webencodings              0.5.1                    py37_1
wheel                     0.33.6                   py37_0
widgetsnbextension        3.5.1                    py37_0
wrapt                     1.11.2           py37h1de35cc_0
xz                        5.2.4                h1de35cc_4
yaml                      0.1.7                hc338f04_2
zeromq                    4.3.1                h0a44026_3
zipp                      0.6.0                      py_0
zlib                      1.2.11               h1de35cc_3
zstd                      1.3.7                h5bba6e5_0

anyone know whats going on or at least where the packages I've installed in development mode would show up?

@brando90
Copy link

how do I see the packages that I've installed in development mode?

I ran conda develop . and it seems it installed it:

(automl-meta-learning) brandomiranda~/automl-meta-learning/automl ❯ conda develop .
path exists, skipping /Users/brandomiranda/automl-meta-learning/automl
completed operation for: /Users/brandomiranda/automl-meta-learning/automl

however, I get errors when I run my scripts:

(automl-meta-learning) brandomiranda~/automl-meta-learning/automl/automl/meta_optimizers ❯ python differentiable_SGD.py
Traceback (most recent call last):
  File "differentiable_SGD.py", line 8, in <module>
    from automl.utils.torch_utils import helloworld
ModuleNotFoundError: No module named 'automl.utils'

but when I do conda list I don't see anything I recognize:

(automl-meta-learning) brandomiranda~/automl-meta-learning/automl/automl/meta_optimizers ❯ conda list
# packages in environment at /Users/brandomiranda/miniconda3/envs/automl-meta-learning:
#
# Name                    Version                   Build  Channel
appnope                   0.1.0                    py37_0
asn1crypto                1.3.0                    py37_0
astroid                   2.3.3                    py37_0
attrs                     19.3.0                     py_0
backcall                  0.1.0                    py37_0
beautifulsoup4            4.8.2                    py37_0
blas                      1.0                         mkl
bleach                    3.1.0                    py37_0
bzip2                     1.0.8                h1de35cc_0
ca-certificates           2019.11.27                    0
certifi                   2019.11.28               py37_0
cffi                      1.13.2           py37hb5b8e2f_0
chardet                   3.0.4                 py37_1003
conda                     4.8.1                    py37_0
conda-build               3.18.11                  py37_0
conda-package-handling    1.6.0            py37h1de35cc_0
cryptography              2.8              py37ha12b0ac_0
cycler                    0.10.0                   py37_0
dbus                      1.13.12              h90a0687_0
decorator                 4.4.1                      py_0
defusedxml                0.6.0                      py_0
entrypoints               0.3                      py37_0
expat                     2.2.6                h0a44026_0
filelock                  3.0.12                     py_0
freetype                  2.9.1                hb4e5f40_0
gettext                   0.19.8.1             h15daf44_3
glib                      2.63.1               hd977a24_0
glob2                     0.7                        py_0
icu                       58.2                 h4b95b61_1
idna                      2.8                      py37_0
importlib_metadata        1.3.0                    py37_0
intel-openmp              2019.4                      233
ipykernel                 5.1.3            py37h39e3cac_1
ipython                   7.11.1           py37h39e3cac_0
ipython_genutils          0.2.0                    py37_0
ipywidgets                7.5.1                      py_0
isort                     4.3.21                   py37_0
jedi                      0.15.2                   py37_0
jinja2                    2.10.3                     py_0
jpeg                      9b                   he5867d9_2
jsonschema                3.2.0                    py37_0
jupyter                   1.0.0                    py37_7
jupyter_client            5.3.4                    py37_0
jupyter_console           6.0.0                    py37_0
jupyter_core              4.6.1                    py37_0
kiwisolver                1.1.0            py37h0a44026_0
lazy-object-proxy         1.4.3            py37h1de35cc_0
libarchive                3.3.3                h786848e_5
libcxx                    4.0.1                hcfea43d_1
libcxxabi                 4.0.1                hcfea43d_1
libedit                   3.1.20181209         hb402a30_0
libffi                    3.2.1                h475c297_4
libgfortran               3.0.1                h93005f0_2
libiconv                  1.15                 hdd342a3_7
liblief                   0.9.0                h2a1bed3_2
libpng                    1.6.37               ha441bb4_0
libsodium                 1.0.16               h3efe00b_0
libtiff                   4.1.0                hcb84e12_0
libxml2                   2.9.9                hf6e021a_1
lz4-c                     1.8.1.2              h1de35cc_0
lzo                       2.10                 h362108e_2
markupsafe                1.1.1            py37h1de35cc_0
matplotlib                3.1.1            py37h54f8f79_0
mccabe                    0.6.1                    py37_1
mistune                   0.8.4            py37h1de35cc_0
mkl                       2019.4                      233
mkl-service               2.3.0            py37hfbe908c_0
mkl_fft                   1.0.15           py37h5e564d8_0
mkl_random                1.1.0            py37ha771720_0
more-itertools            8.0.2                      py_0
nbconvert                 5.6.1                    py37_0
nbformat                  4.4.0                    py37_0
ncurses                   6.1                  h0a44026_1
ninja                     1.9.0            py37h04f5b5a_0
notebook                  6.0.2                    py37_0
numpy                     1.18.1           py37h7241aed_0
numpy-base                1.18.1           py37h6575580_0
olefile                   0.46                     py37_0
openssl                   1.1.1d               h1de35cc_3
pandoc                    2.2.3.2                       0
pandocfilters             1.4.2                    py37_1
parso                     0.5.2                      py_0
pcre                      8.43                 h0a44026_0
pexpect                   4.7.0                    py37_0
pickleshare               0.7.5                    py37_0
pillow                    7.0.0            py37h4655f20_0
pip                       19.3.1                   py37_0
pkginfo                   1.5.0.1                  py37_0
prometheus_client         0.7.1                      py_0
prompt_toolkit            2.0.10                     py_0
psutil                    5.6.7            py37h1de35cc_0
ptyprocess                0.6.0                    py37_0
py-lief                   0.9.0            py37h1413db1_2
pycosat                   0.6.3            py37h1de35cc_0
pycparser                 2.19                     py37_0
pygments                  2.5.2                      py_0
pylint                    2.4.4                    py37_0
pyopenssl                 19.1.0                   py37_0
pyparsing                 2.4.6                      py_0
pyqt                      5.9.2            py37h655552a_2
pyrsistent                0.15.6           py37h1de35cc_0
pysocks                   1.7.1                    py37_0
python                    3.7.6                h359304d_2
python-dateutil           2.8.1                      py_0
python-graphviz           0.13.2                   pypi_0    pypi
python-libarchive-c       2.8                     py37_13
pytorch                   1.4.0                   py3.7_0    pytorch
pytz                      2019.3                     py_0
pyyaml                    5.2              py37h1de35cc_0
pyzmq                     18.1.0           py37h0a44026_0
qt                        5.9.7                h468cd18_1
qtconsole                 4.6.0                      py_1
readline                  7.0                  h1de35cc_5
requests                  2.22.0                   py37_1
ripgrep                   11.0.2               he32d670_0
ruamel_yaml               0.15.87          py37h1de35cc_0
send2trash                1.5.0                    py37_0
setuptools                44.0.0                   py37_0
sip                       4.19.8           py37h0a44026_0
six                       1.13.0                   py37_0
soupsieve                 1.9.5                    py37_0
sqlite                    3.30.1               ha441bb4_0
terminado                 0.8.3                    py37_0
testpath                  0.4.4                      py_0
tk                        8.6.8                ha441bb4_0
torchvision               0.5.0                  py37_cpu    pytorch
torchviz                  0.0.1                    pypi_0    pypi
tornado                   6.0.3            py37h1de35cc_0
tqdm                      4.41.1                     py_0
traitlets                 4.3.3                    py37_0
urllib3                   1.25.7                   py37_0
wcwidth                   0.1.7                    py37_0
webencodings              0.5.1                    py37_1
wheel                     0.33.6                   py37_0
widgetsnbextension        3.5.1                    py37_0
wrapt                     1.11.2           py37h1de35cc_0
xz                        5.2.4                h1de35cc_4
yaml                      0.1.7                hc338f04_2
zeromq                    4.3.1                h0a44026_3
zipp                      0.6.0                      py_0
zlib                      1.2.11               h1de35cc_3
zstd                      1.3.7                h5bba6e5_0

anyone know whats going on or at least where the packages I've installed in development mode would show up?

answer: https://stackoverflow.com/questions/59903548/how-does-one-check-if-conda-develop-installed-my-project-packages/59903590#59903590

@WenjieZ
Copy link

WenjieZ commented Feb 21, 2020

I came from the manual of pytest, which says the following three are equivalent:

pip install -e .
python setup.py develop
conda develop

As a data scientist, I generally use conda as my management tool. Now, if I want to be a package developer, can someone tell me what practice should I follow?

@brando90
Copy link

I came from the manual of pytest, which says the following three are equivalent:

pip install -e .
python setup.py develop
conda develop

As a data scientist, I generally use conda as my management tool. Now, if I want to be a package developer, can someone tell me what practice should I follow?

what are you trying to do?

@floschl
Copy link

floschl commented May 28, 2020

I suppose I have the same questions as @WenjieZ has:

  • Develop a package, let's call it usefultoolbox in a local dir
  • usefultoolbox package dir contains a meta.yml with the dependencies
  • "conda develop /path/to/usefultoolbox/" results in a
    FileNotFoundError: [Errno 2] No such file or directory: 'C:\Users\floschl\miniconda3\envs\packageuse\Lib\site-packages\conda.pth'
  • "conda install /path/to/usefultoolbox/"
    PackagesNotFoundError: The following packages are not available from current channels: - .
    (which is clear because conda install searches its default channel)

Now my questions:

  1. Is there an pip install -e -equivalent for conda? Is conda develop supposed to work like that?
  2. Can I make conda install act like pip install on git repos without setting up a local channel or using the public anaconda/conda-forge channel?

@SebastianoX
Copy link

@floschl All good questions. I would add how to combine the requirements in the setup.py and the requirements in the environment.yml so to have them in a single place?
AFAIK pip install -e . will install the libraries in the setup.py, and not the one in the conda environment file.

@floschl
Copy link

floschl commented Jul 2, 2020

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?

@brando90
Copy link

brando90 commented Jul 3, 2020

From @asmeurer on August 25, 2015 20:5

Yes, it is. Note that there have been some improvements to it in recent versions of conda-build.

is there an additional command we need to run before conda develop . starts working? I am getting a weird error:

❯ conda develop .
Traceback (most recent call last):
  File "/Users/brando/anaconda3/bin/conda-develop", line 11, in <module>
    sys.exit(main())
  File "/Users/brando/anaconda3/lib/python3.7/site-packages/conda_build/cli/main_develop.py", line 72, in main
    return execute(sys.argv[1:])
  File "/Users/brando/anaconda3/lib/python3.7/site-packages/conda_build/cli/main_develop.py", line 68, in execute
    build_ext=args.build_ext, clean=args.clean, uninstall=args.uninstall)
  File "/Users/brando/anaconda3/lib/python3.7/site-packages/conda_build/api.py", line 301, in develop
    return execute(recipe_dir, prefix, no_pth_file, build_ext, clean, uninstall)
  File "/Users/brando/anaconda3/lib/python3.7/site-packages/conda_build/develop.py", line 175, in execute
    write_to_conda_pth(sp_dir, pkg_path)
  File "/Users/brando/anaconda3/lib/python3.7/site-packages/conda_build/develop.py", line 50, in write_to_conda_pth
    with open(c_file, 'a') as f:
FileNotFoundError: [Errno 2] No such file or directory: '/Users/brando/anaconda3/envs/automl-meta-learning/lib/python3.7/site-packages/conda.pth'

@erprateek
Copy link

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.

Balandat added a commit to Balandat/botorch that referenced this issue Sep 10, 2020
conda-build folks say: `pip install -e` is still recommended. `conda develop` has not seen any development lately.
conda/conda-build#1992 (comment)
Balandat added a commit to Balandat/botorch that referenced this issue Sep 10, 2020
conda-build folks say: `pip install -e` is still recommended. `conda develop` has not seen any development lately.
conda/conda-build#1992 (comment)
facebook-github-bot pushed a commit to pytorch/botorch that referenced this issue Sep 10, 2020
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
@brando90
Copy link

brando90 commented Oct 20, 2020

@brando90 pip install -e is still recommended. Conda develop has not seen any development lately.

@msarahan thanks! Just curious, why isn't conda develop . simply removed since it seems you said it's just a remake of something that isn't needed?


update:

btw pip install -e . does not work for me:

conda/conda#9912

@astrojuanlu
Copy link

xref: proposal to deprecate and remove conda develop #4251

@github-actions
Copy link

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:

  1. Verify that you can still reproduce the issue at hand
  2. Comment that the issue is still reproducible and include:
    - What OS and version you reproduced the issue on
    - What steps you followed to reproduce the issue

NOTE: If this issue was closed prematurely, please leave a comment.

Thanks!

@github-actions github-actions bot added the stale [bot] marked as stale due to inactivity label Jul 22, 2023
@astrojuanlu
Copy link

Yes the issue at hand still exists: that conda develop only has the CLI reference and no docs explaining how it's used https://docs.conda.io/projects/conda-build/en/stable/resources/commands/conda-develop.html

@github-actions github-actions bot added stale::recovered [bot] recovered after being marked as stale and removed stale [bot] marked as stale due to inactivity labels Jul 23, 2023
@dholth
Copy link
Contributor

dholth commented Jul 29, 2024

Draft of a modern Python-standards "no setup.py required" develop replacement #5380

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
stale::recovered [bot] recovered after being marked as stale
Projects
Status: 🆕 New
Development

No branches or pull requests