Discussion:
[conda] conda-pip integration
n***@stalder.io
2018-07-18 10:10:26 UTC
Permalink
Is it possible to install a pypi package with pip (that is not available even in conda-forge) in such a way that its dependencies are installed from conda channels, if available?

I typically pip-install, note the installed dependencies, then manually replace, which is tedious.

Additionally, a simple way to check pip installed packages are/have become available in a list of conda channels would be very useful.

Thanks!
--
You received this message because you are subscribed to the Google Groups "conda - Public" group.
To unsubscribe from this group and stop receiving emails from it, send an email to conda+***@continuum.io.
To post to this group, send email to ***@continuum.io.
Visit this group at https://groups.google.com/a/continuum.io/group/conda/.
To view this discussion on the web visit https://groups.google.com/a/continuum.io/d/msgid/conda/675ad57d-2189-4a16-ad86-53337c2d0c7b%40anaconda.com.
For more options, visit https://groups.google.com/a/continuum.io/d/optout.
'Chris Barker - NOAA Federal' via conda - Public
2018-07-18 15:25:45 UTC
Permalink
Is it possible to install a pypi package with pip (that is not available
even in conda-forge) in such a way that its dependencies are installed from
conda channels, if available?


In general, no. Though the conda team is working on better integration of
pip. And PyPA is working on better separation of concerns in pip et al.

But as it stands, the only way to know the dependencies of a pypi package
is to download it and run the setup.py.

And a pip package names “foo” may or may not be named “foo” as a conda
package:-(

However, there are a couple slightly less kludgy options:

Run conda skeleton:

https://conda.io/docs/user-guide/tutorials/build-pkgs-skeleton.html#building-a-simple-package-with-conda-skeleton-pypi

This will give you a conda recipe for a pypi package — you can then look at
the recipe to see the deps. And if are lucky, you may be able to build a
conda package right away.

If that works, you can submit the recipe to conda-forge for all to use in
the future :-)

You can also run pip with —no-deps, then import the package and see what
breaks— a bit annoying but usually not too bad.

Or you can look on pypi or download the source, and look in it to see what
the deps are.

-CHB



-CHB





I typically pip-install, note the installed dependencies, then manually
replace, which is tedious.

Additionally, a simple way to check pip installed packages are/have become
available in a list of conda channels would be very useful.

Thanks!
--
You received this message because you are subscribed to the Google Groups
"conda - Public" group.
To unsubscribe from this group and stop receiving emails from it, send an
email to conda+***@continuum.io.
To post to this group, send email to ***@continuum.io.
Visit this group at https://groups.google.com/a/continuum.io/group/conda/.
To view this discussion on the web visit
https://groups.google.com/a/continuum.io/d/msgid/conda/675ad57d-2189-4a16-ad86-53337c2d0c7b%40anaconda.com
.
For more options, visit https://groups.google.com/a/continuum.io/d/optout.
--
You received this message because you are subscribed to the Google Groups "conda - Public" group.
To unsubscribe from this group and stop receiving emails from it, send an email to conda+***@continuum.io.
To post to this group, send email to ***@continuum.io.
Visit this group at https://groups.google.com/a/continuum.io/group/conda/.
To view this discussion on the web visit https://groups.google.com/a/continuum.io/d/msgid/conda/CALGmxE%2Be_Dtptx5g8wZfm4XwfJuKCCkWJioYJ3b-MF5Jn-tU-w%40mail.gmail.com.
For more options, visit https://groups.google.com/a/continuum.io/d/optout.
Robert Terzi
2018-07-19 16:56:23 UTC
Permalink
This discussion was helpful to me and timely. I've been struggling with
getting some needed packages installed that had many dependencies.

One of the things I wound up learning the hard way was to use a separate
minimal python install. Initially I started with the anaconda meta
package, but then it seemed like almost any substantial package I tried to
install from conda-forge wanted to make a bunch of changes including
downgrading and upgrading packages which seems pretty daunting.

So far I haven't found any best practices for working with conda,
conda-forge, and python. Does anything like that exist?

Thanks,
--Rob

On Wednesday, July 18, 2018 at 11:25:47 AM UTC-4, Chris Barker - NOAA
Post by n***@stalder.io
Is it possible to install a pypi package with pip (that is not available
even in conda-forge) in such a way that its dependencies are installed from
conda channels, if available?
In general, no. Though the conda team is working on better integration of
pip. And PyPA is working on better separation of concerns in pip et al.
But as it stands, the only way to know the dependencies of a pypi package
is to download it and run the setup.py.
And a pip package names “foo” may or may not be named “foo” as a conda
package:-(
https://conda.io/docs/user-guide/tutorials/build-pkgs-skeleton.html#building-a-simple-package-with-conda-skeleton-pypi
This will give you a conda recipe for a pypi package — you can then look
at the recipe to see the deps. And if are lucky, you may be able to build a
conda package right away.
If that works, you can submit the recipe to conda-forge for all to use in
the future :-)
You can also run pip with —no-deps, then import the package and see what
breaks— a bit annoying but usually not too bad.
Or you can look on pypi or download the source, and look in it to see what
the deps are.
-CHB
-CHB
I typically pip-install, note the installed dependencies, then manually
replace, which is tedious.
Additionally, a simple way to check pip installed packages are/have become
available in a list of conda channels would be very useful.
Thanks!
--
You received this message because you are subscribed to the Google Groups
"conda - Public" group.
To unsubscribe from this group and stop receiving emails from it, send an
Visit this group at https://groups.google.com/a/continuum.io/group/conda/.
To view this discussion on the web visit
https://groups.google.com/a/continuum.io/d/msgid/conda/675ad57d-2189-4a16-ad86-53337c2d0c7b%40anaconda.com
.
For more options, visit https://groups.google.com/a/continuum.io/d/optout.
--
You received this message because you are subscribed to the Google Groups "conda - Public" group.
To unsubscribe from this group and stop receiving emails from it, send an email to conda+***@continuum.io.
To post to this group, send email to ***@continuum.io.
Visit this group at https://groups.google.com/a/continuum.io/group/conda/.
To view this discussion on the web visit https://groups.google.com/a/continuum.io/d/msgid/conda/4bc8ac83-1be5-433d-aee7-c2f397318d0a%40continuum.io.
For more options, visit https://groups.google.com/a/continuum.io/d/optout.
Jason Grout
2018-07-19 17:04:41 UTC
Permalink
Here's what I do:

1. Install miniconda
2. Make the root environment read-only: chmod -R u-w bin/ etc/ include/
lib/ share/ ssl/
3. Add the ". $HOME/miniconda3/etc/profile.d/conda.sh" line to my startup
shell file
4. Set my channels to *only* conda-forge
4. *ALWAYS* create a new environment for whatever project I'm working on

I find it works pretty well. When a new version of conda comes out, I
reverse the chmod step above, update whatever in my root environment, then
make it readonly again.

Jason
Post by Robert Terzi
This discussion was helpful to me and timely. I've been struggling with
getting some needed packages installed that had many dependencies.
One of the things I wound up learning the hard way was to use a separate
minimal python install. Initially I started with the anaconda meta
package, but then it seemed like almost any substantial package I tried to
install from conda-forge wanted to make a bunch of changes including
downgrading and upgrading packages which seems pretty daunting.
So far I haven't found any best practices for working with conda,
conda-forge, and python. Does anything like that exist?
Thanks,
--Rob
On Wednesday, July 18, 2018 at 11:25:47 AM UTC-4, Chris Barker - NOAA
Post by n***@stalder.io
Is it possible to install a pypi package with pip (that is not available
even in conda-forge) in such a way that its dependencies are installed from
conda channels, if available?
In general, no. Though the conda team is working on better integration of
pip. And PyPA is working on better separation of concerns in pip et al.
But as it stands, the only way to know the dependencies of a pypi package
is to download it and run the setup.py.
And a pip package names “foo” may or may not be named “foo” as a conda
package:-(
https://conda.io/docs/user-guide/tutorials/build-pkgs-skeleton.html#building-a-simple-package-with-conda-skeleton-pypi
This will give you a conda recipe for a pypi package — you can then look
at the recipe to see the deps. And if are lucky, you may be able to build a
conda package right away.
If that works, you can submit the recipe to conda-forge for all to use in
the future :-)
You can also run pip with —no-deps, then import the package and see what
breaks— a bit annoying but usually not too bad.
Or you can look on pypi or download the source, and look in it to see
what the deps are.
-CHB
-CHB
I typically pip-install, note the installed dependencies, then manually
replace, which is tedious.
Additionally, a simple way to check pip installed packages are/have
become available in a list of conda channels would be very useful.
Thanks!
--
You received this message because you are subscribed to the Google Groups
"conda - Public" group.
To unsubscribe from this group and stop receiving emails from it, send an
Visit this group at https://groups.google.com/a/continuum.io/group/conda/
.
To view this discussion on the web visit
https://groups.google.com/a/continuum.io/d/msgid/conda/675ad57d-2189-4a16-ad86-53337c2d0c7b%40anaconda.com
.
For more options, visit https://groups.google.com/a/continuum.io/d/optout
.
--
You received this message because you are subscribed to the Google Groups
"conda - Public" group.
To unsubscribe from this group and stop receiving emails from it, send an
Visit this group at https://groups.google.com/a/continuum.io/group/conda/.
To view this discussion on the web visit
https://groups.google.com/a/continuum.io/d/msgid/conda/4bc8ac83-1be5-433d-aee7-c2f397318d0a%40continuum.io
<https://groups.google.com/a/continuum.io/d/msgid/conda/4bc8ac83-1be5-433d-aee7-c2f397318d0a%40continuum.io?utm_medium=email&utm_source=footer>
.
For more options, visit https://groups.google.com/a/continuum.io/d/optout.
--
You received this message because you are subscribed to the Google Groups "conda - Public" group.
To unsubscribe from this group and stop receiving emails from it, send an email to conda+***@continuum.io.
To post to this group, send email to ***@continuum.io.
Visit this group at https://groups.google.com/a/continuum.io/group/conda/.
To view this discussion on the web visit https://groups.google.com/a/continuum.io/d/msgid/conda/CAPDWZHygM4xMORySaVgNUegTZXfZ26TQdJn%2BW6%2B4sRRAJ0rWRw%40mail.gmail.com.
For more options, visit https://groups.google.com/a/continuum.io/d/optout.
Loading...