Open alexei opened 7 years ago
The problem is I think that the options feature in pip
is not super well-implemented. We were able to get that option to work, but not in a requirements.txt
file.
We'd also be interested in this for Zulip (github.com/zulip/zulip/); right now we're installing off of a fork because we don't want a dependency on numpy and friends.
I wonder whether a better solution would be to split out an independent package for the non-ML parts of talon. E.g. call it talon-noml
, and have talon
depend on that.
Hey everyone! Would like to kindly ask for an update from package maintainers.
Ended up with the same issue today. Only wanted to use non-ml features of talon, but couldn't do it without extracting essential parts of it into a separate library. The claw
library seems to be abandoned (updated 3 years ago and at the time of writing 179 commits behind mailgun:master).
Tried to use the --no-ml
option, but ended up with several issues with it.
pip install talon --install-option="--no-ml
applies recursively to the package itself and all its dependencies. python setup.py install --no-ml
scikit-learn will be installed.xxx-dist-info/METADATA
and xxx-egg-info/requires.txt
and, if I'm not mistaken, let you install packages without actually resorting to execute any code from setup.py. Declaring extras sounds like a more correct way of dealing with the issue.With all this in mind, I would see three options to solve the issue.
--no-ml
flag, probably it makes sense to remove it from setup.py to avoid any confusion.extras_require={"ml": ["numpy", "scipy", ...]}
. It's backward incompatible of course, since now everyone who wants to use ML features, has to install it as pip install talon[ml]
and update requirements correspondingly.Thanks!
I'd love to see that happen. Certainly the --no-ml
flag hasn't ended up being actually useful due to the requirements.txt
issues I noted above. And at the same time, the features of this library that don't involve ML are really valuable, but when one isn't using the ML features, it's unfortunate to have to install the ML dependencies (because they are super slow to install and import!).
I wonder whether a better solution would be to split out an independent package for the non-ML parts of talon. E.g. call it
talon-noml
, and havetalon
depend on that.
I’ve implemented this in #200 (calling it talon-core
), since the other extras-based solution was previously rejected in #121.
How does one install talon without ML? I tried both
pip install talon --global-option="--no-ml"
andpip install talon --install-option="--no-ml"
and neither seems to work (admitedly this is the first time I'm using the package options flag). Somehow it ends up trying to install all packages and fails at Scipy (either from the Fortran dependency when installing without the flag, or becauseoption --no-ml not recognized
)Using Python 2.7.12, pip 9.0.1 on macOS