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

Installation requires nose #302

Closed
ColCarroll opened this issue Dec 15, 2017 · 1 comment
Closed

Installation requires nose #302

ColCarroll opened this issue Dec 15, 2017 · 1 comment

Comments

@ColCarroll
Copy link
Contributor

Importing certain modules requires nose (stack attached at bottom). Two possible solutions:

  1. add nose to the install_requires in setup.py (it looks like you might also want to add the rest of requirements.txt there? Or perhaps you are leaving them all out on purpose?)
  2. Use a bit of a hack in permutation.py:
try:
    from nose.tools import nottest
except ImportError:
    def nottest(f):
        return f

Let me know if either of these would be helpful and I would be happy to submit a patch!

>>> from mlxtend import evaluate

---------------------------------------------------------------------------
ModuleNotFoundError                       Traceback (most recent call last)
<ipython-input-125-94b63739480a> in <module>()
----> 1 from mlxtend import evaluate

~/anaconda3/envs/gates_labels3.6/lib/python3.6/site-packages/mlxtend/evaluate/__init__.py in <module>()
     13 from .bootstrap_outofbag import BootstrapOutOfBag
     14 from .bootstrap_point632 import bootstrap_point632_score
---> 15 from .permutation import permutation_test
     16 
     17 

~/anaconda3/envs/gates_labels3.6/lib/python3.6/site-packages/mlxtend/evaluate/permutation.py in <module>()
     10 from itertools import combinations
     11 from math import factorial
---> 12 from nose.tools import nottest
     13 
     14 

ModuleNotFoundError: No module named 'nose'
@rasbt
Copy link
Owner

rasbt commented Dec 16, 2017

Good point, we should definitely do something about that. While I try to avoid "hacky" workarounds, I would actually favor your second suggestion because nose is not required for the function itself but the nottest is more required as a consequence of nose itself.

Let me know if either of these would be helpful and I would be happy to submit a patch!

If you could submit a patch, that'd be great! Thanks!

requirements.txt there? Or perhaps you are leaving them all out on purpose?

Hm, I think the requirements file got a bit stale/abandoned over time and could def. use an update :P

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants