Discussion:
[conda] conda build problem for package that depends on Keras
h***@gmail.com
2018-08-22 20:01:20 UTC
Permalink
I'm trying to build a conda package that depends on Keras, but the build
fails. The build error messages suggest that there is some problem
associated with the keras-preprocessing package, and I get the same
messages regardless of whether I try to get Keras from the default Anaconda
channel or conda-forge. I have put a simplified example
<https://github.com/HaroldMills/Conda-Build-Issue> of the problem on
GitHub. The repository README explains how to (hopefully) reproduce the
problem, and the repository also includes the build output
<https://github.com/HaroldMills/Conda-Build-Issue/blob/master/Build%20Output.txt>.
I would appreciate ideas people might have about what the problem is and
how to fix it.

Thank you,

Harold Mills
--
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/8c76938e-00c7-41f2-b7c9-276cec651461%40continuum.io.
For more options, visit https://groups.google.com/a/continuum.io/d/optout.
h***@gmail.com
2018-08-22 20:43:08 UTC
Permalink
Thanks for your quick response, Michael. There is a Keras package called
keras-preprocessing (i.e. with a dash), but as far as I know there is not
one called keras_preprocessing (i.e. with an underscore). Adding
keras-preprocessing to the meta.yaml results in the same failure that I
reported originally, while adding keras_preprocessing results in an
unsatisfiable dependency error. I'm not sure where the keras_preprocessing
dependency might be coming from. I have no problem creating a Keras
environment with:

conda create -n keras keras

and the environment includes the package keras-preprocessing. Why would
conda build be looking for a nonexistent keras_preprocessing package, if
it's getting keras and all of its dependencies from the same channel as
conda create, which apparently can figure out that it should install
keras-preprocessing instead?

Thanks,

Harold Mills
RuntimeError: Setuptools downloading is disabled in conda build. Be sure
to add all dependencies in the meta.yaml url=
https://pypi.org/simple/keras_preprocessing/
This is saying that you don't have keras_preprocessing listed as a
dependency in meta.yaml, or that if you have it listed, you do not have a
version that matches the constraint specified in requirements.txt or
setup.py.
You need to add the dependency, and if it is not already available, you
need to make a recipe for that dependency.
Post by h***@gmail.com
I'm trying to build a conda package that depends on Keras, but the build
fails. The build error messages suggest that there is some problem
associated with the keras-preprocessing package, and I get the same
messages regardless of whether I try to get Keras from the default Anaconda
channel or conda-forge. I have put a simplified example
<https://github.com/HaroldMills/Conda-Build-Issue> of the problem on
GitHub. The repository README explains how to (hopefully) reproduce the
problem, and the repository also includes the build output
<https://github.com/HaroldMills/Conda-Build-Issue/blob/master/Build%20Output.txt>.
I would appreciate ideas people might have about what the problem is and
how to fix it.
Thank you,
Harold Mills
--
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/8c76938e-00c7-41f2-b7c9-276cec651461%40continuum.io
<https://groups.google.com/a/continuum.io/d/msgid/conda/8c76938e-00c7-41f2-b7c9-276cec651461%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/46b850b9-a05a-4cfe-84d2-74bd357d6fb3%40continuum.io.
For more options, visit https://groups.google.com/a/continuum.io/d/optout.
Harold Mills
2018-08-24 15:35:06 UTC
Permalink
Hi Jonathan,

Thank you for providing the new packages. I can build my example with them
when I use the defaults channel, but not when I use the conda-forge
channel. I get the attached output, with errors similar to the ones from
before. I see that the new conda-forge package is a noarch package, while
the new defaults package is not. Could that have something to do with the
difference?

Thanks,

Harold
There are new version of keras-processing and keras-applications in
defaults and conda-forge which fix the underlying cause of this issue.
Harold,
The example you provided builds fine with these new package which will be
selected automatically. Thanks for bringing this to our attention.
Cheers,
- Jonathan Helmus
It is not conda-build that is your problem here. It is the setup.py
script that you're asking conda-build to run for you. It is going and
looking for a python library called keras_processing (python libraries will
never have a dash in the name, but the package name may), and it may or may
not have a version constraint associated with it. If the keras-processing
package (dash because that's the package name, not the thing you import)
isn't the right version, as I mentioned before, then setuptools tries to go
download it. We patch setuptools to stop that, because you'd effectively
be bundling dependencies in with your conda package.
You need to look at setup.py and/or requirements.txt, identify what the
exact requirement of keras-processing is, and adjust your recipe
accordingly.
Post by h***@gmail.com
Thanks for your quick response, Michael. There is a Keras package called
keras-preprocessing (i.e. with a dash), but as far as I know there is not
one called keras_preprocessing (i.e. with an underscore). Adding
keras-preprocessing to the meta.yaml results in the same failure that I
reported originally, while adding keras_preprocessing results in an
unsatisfiable dependency error. I'm not sure where the keras_preprocessing
dependency might be coming from. I have no problem creating a Keras
conda create -n keras keras
and the environment includes the package keras-preprocessing. Why would
conda build be looking for a nonexistent keras_preprocessing package, if
it's getting keras and all of its dependencies from the same channel as
conda create, which apparently can figure out that it should install
keras-preprocessing instead?
Thanks,
Harold Mills
RuntimeError: Setuptools downloading is disabled in conda build. Be sure
to add all dependencies in the meta.yaml url=
https://pypi.org/simple/keras_preprocessing/
This is saying that you don't have keras_preprocessing listed as a
dependency in meta.yaml, or that if you have it listed, you do not have a
version that matches the constraint specified in requirements.txt or
setup.py.
You need to add the dependency, and if it is not already available, you
need to make a recipe for that dependency.
Post by h***@gmail.com
I'm trying to build a conda package that depends on Keras, but the
build fails. The build error messages suggest that there is some problem
associated with the keras-preprocessing package, and I get the same
messages regardless of whether I try to get Keras from the default Anaconda
channel or conda-forge. I have put a simplified example
<https://github.com/HaroldMills/Conda-Build-Issue> of the problem on
GitHub. The repository README explains how to (hopefully) reproduce the
problem, and the repository also includes the build output
<https://github.com/HaroldMills/Conda-Build-Issue/blob/master/Build%20Output.txt>.
I would appreciate ideas people might have about what the problem is and
how to fix it.
Thank you,
Harold Mills
--
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
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/8c76938e-00c7-41f2-b7c9-276cec651461%40continuum.io
<https://groups.google.com/a/continuum.io/d/msgid/conda/8c76938e-00c7-41f2-b7c9-276cec651461%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
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/46b850b9-a05a-4cfe-84d2-74bd357d6fb3%40continuum.io
<https://groups.google.com/a/continuum.io/d/msgid/conda/46b850b9-a05a-4cfe-84d2-74bd357d6fb3%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
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/CAOQN5OjEXtXUoz40-wK9euHavn8XtbSMb42TE43dXk3d61WpEQ%40mail.gmail.com
<https://groups.google.com/a/continuum.io/d/msgid/conda/CAOQN5OjEXtXUoz40-wK9euHavn8XtbSMb42TE43dXk3d61WpEQ%40mail.gmail.com?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 a topic in the
Google Groups "conda - Public" group.
To unsubscribe from this topic, visit
https://groups.google.com/a/continuum.io/d/topic/conda/loKvGctZf14/unsubscribe
.
To unsubscribe from this group and all its topics, send an email to
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/089e75ca-e274-a098-fd1f-38dad24ef6ad%40anaconda.com
<https://groups.google.com/a/continuum.io/d/msgid/conda/089e75ca-e274-a098-fd1f-38dad24ef6ad%40anaconda.com?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/CALkbTs6-O-3BatusQgs0fmujm-ij%3Dsi0fRoK652O0k5PMfpfbg%40mail.gmail.com.
For more options, visit https://groups.google.com/a/continuum.io/d/optout.
Harold Mills
2018-08-25 00:20:17 UTC
Permalink
Okay, thank you. I think I should be fine with the defaults packages for
now.

Harold
Yes, the noarch packages are causing the issue. The problem is pretty
thorny one that might take a while to solve.
- Jonathan
Hi Jonathan,
Thank you for providing the new packages. I can build my example with them
when I use the defaults channel, but not when I use the conda-forge
channel. I get the attached output, with errors similar to the ones from
before. I see that the new conda-forge package is a noarch package, while
the new defaults package is not. Could that have something to do with the
difference?
Thanks,
Harold
There are new version of keras-processing and keras-applications in
defaults and conda-forge which fix the underlying cause of this issue.
Harold,
The example you provided builds fine with these new package which will be
selected automatically. Thanks for bringing this to our attention.
Cheers,
- Jonathan Helmus
It is not conda-build that is your problem here. It is the setup.py
script that you're asking conda-build to run for you. It is going and
looking for a python library called keras_processing (python libraries will
never have a dash in the name, but the package name may), and it may or may
not have a version constraint associated with it. If the keras-processing
package (dash because that's the package name, not the thing you import)
isn't the right version, as I mentioned before, then setuptools tries to go
download it. We patch setuptools to stop that, because you'd effectively
be bundling dependencies in with your conda package.
You need to look at setup.py and/or requirements.txt, identify what the
exact requirement of keras-processing is, and adjust your recipe
accordingly.
Post by h***@gmail.com
Thanks for your quick response, Michael. There is a Keras package called
keras-preprocessing (i.e. with a dash), but as far as I know there is not
one called keras_preprocessing (i.e. with an underscore). Adding
keras-preprocessing to the meta.yaml results in the same failure that I
reported originally, while adding keras_preprocessing results in an
unsatisfiable dependency error. I'm not sure where the keras_preprocessing
dependency might be coming from. I have no problem creating a Keras
conda create -n keras keras
and the environment includes the package keras-preprocessing. Why would
conda build be looking for a nonexistent keras_preprocessing package, if
it's getting keras and all of its dependencies from the same channel as
conda create, which apparently can figure out that it should install
keras-preprocessing instead?
Thanks,
Harold Mills
RuntimeError: Setuptools downloading is disabled in conda build. Be
sure to add all dependencies in the meta.yaml url=
https://pypi.org/simple/keras_preprocessing/
This is saying that you don't have keras_preprocessing listed as a
dependency in meta.yaml, or that if you have it listed, you do not have a
version that matches the constraint specified in requirements.txt or
setup.py.
You need to add the dependency, and if it is not already available, you
need to make a recipe for that dependency.
Post by h***@gmail.com
I'm trying to build a conda package that depends on Keras, but the
build fails. The build error messages suggest that there is some problem
associated with the keras-preprocessing package, and I get the same
messages regardless of whether I try to get Keras from the default Anaconda
channel or conda-forge. I have put a simplified example
<https://github.com/HaroldMills/Conda-Build-Issue> of the problem on
GitHub. The repository README explains how to (hopefully) reproduce the
problem, and the repository also includes the build output
<https://github.com/HaroldMills/Conda-Build-Issue/blob/master/Build%20Output.txt>.
I would appreciate ideas people might have about what the problem is and
how to fix it.
Thank you,
Harold Mills
--
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
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/8c76938e-00c7-41f2-b7c9-276cec651461%40continuum.io
<https://groups.google.com/a/continuum.io/d/msgid/conda/8c76938e-00c7-41f2-b7c9-276cec651461%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
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/46b850b9-a05a-4cfe-84d2-74bd357d6fb3%40continuum.io
<https://groups.google.com/a/continuum.io/d/msgid/conda/46b850b9-a05a-4cfe-84d2-74bd357d6fb3%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
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/CAOQN5OjEXtXUoz40-wK9euHavn8XtbSMb42TE43dXk3d61WpEQ%40mail.gmail.com
<https://groups.google.com/a/continuum.io/d/msgid/conda/CAOQN5OjEXtXUoz40-wK9euHavn8XtbSMb42TE43dXk3d61WpEQ%40mail.gmail.com?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 a topic in the
Google Groups "conda - Public" group.
To unsubscribe from this topic, visit
https://groups.google.com/a/continuum.io/d/topic/conda/loKvGctZf14/unsubscribe
.
To unsubscribe from this group and all its topics, send an email to
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/089e75ca-e274-a098-fd1f-38dad24ef6ad%40anaconda.com
<https://groups.google.com/a/continuum.io/d/msgid/conda/089e75ca-e274-a098-fd1f-38dad24ef6ad%40anaconda.com?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 a topic in the
Google Groups "conda - Public" group.
To unsubscribe from this topic, visit
https://groups.google.com/a/continuum.io/d/topic/conda/loKvGctZf14/unsubscribe
.
To unsubscribe from this group and all its topics, send an email to
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/7f7203e5-8c82-1efe-2e48-97a8e4946067%40anaconda.com
<https://groups.google.com/a/continuum.io/d/msgid/conda/7f7203e5-8c82-1efe-2e48-97a8e4946067%40anaconda.com?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/CALkbTs49Xt0PH6%2BNVHJUWTPRBUm0k%2BFk7GfyopY%3DQTZGqc6v5w%40mail.gmail.com.
For more options, visit https://groups.google.com/a/continuum.io/d/optout.
Loading...