Open marctheshark3 opened 6 years ago
Hi! I think that the sklearn.cross_validation module is deprecated, and replaced by the sklearn.model_selection module in the newer scikit-learn versions, you could create a pull-request after correcting this in mlp.py.
Same problem here :
ModuleNotFoundError Traceback (most recent call last)
I have the same issue:
(soph_py3) slocum:analysis sclayton$ nosetests -v sknn ERROR Failure: ModuleNotFoundError (No module named 'sklearn.cross_validation') ... ERROR
Traceback (most recent call last):
File "/miniconda2/envs/soph_py3/lib/python3.7/site-packages/nose/suite.py", line 210, in run
self.setUp()
File "/miniconda2/envs/soph_py3/lib/python3.7/site-packages/nose/suite.py", line 293, in setUp
self.setupContext(ancestor)
File "/miniconda2/envs/soph_py3/lib/python3.7/site-packages/nose/suite.py", line 316, in setupContext
try_run(context, names)
File "/miniconda2/envs/soph_py3/lib/python3.7/site-packages/nose/util.py", line 471, in try_run
return func()
File "/miniconda2/envs/soph_py3/lib/python3.7/site-packages/sknn/backend/init.py", line 24, in setup
from . import lasagne
File "/miniconda2/envs/soph_py3/lib/python3.7/site-packages/sknn/backend/lasagne/init.py", line 5, in
Traceback (most recent call last):
File "/miniconda2/envs/soph_py3/lib/python3.7/site-packages/nose/failure.py", line 39, in runTest
raise self.exc_val.with_traceback(self.tb)
File "/miniconda2/envs/soph_py3/lib/python3.7/site-packages/nose/loader.py", line 418, in loadTestsFromName
addr.filename, addr.module)
File "/miniconda2/envs/soph_py3/lib/python3.7/site-packages/nose/importer.py", line 47, in importFromPath
return self.importFromDir(dir_path, fqname)
File "/miniconda2/envs/soph_py3/lib/python3.7/site-packages/nose/importer.py", line 94, in importFromDir
mod = load_module(part_fqname, fh, filename, desc)
File "/miniconda2/envs/soph_py3/lib/python3.7/imp.py", line 244, in load_module
return load_package(name, filename)
File "/miniconda2/envs/soph_py3/lib/python3.7/imp.py", line 216, in load_package
return _load(spec)
File "
Ran 1 test in 0.003s
FAILED (errors=2)
@sophieclayton It works for me. Thank you!
I am using most up to data Mac OS. Not sure where I am going wrong. pip and numpy are both up to date. Also when I try the command suggested:
" nosetests -v sknn "
for the test it gives me these errors:
Traceback (most recent call last): File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/nose/failure.py", line 39, in runTest raise self.exc_val.with_traceback(self.tb) File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/nose/loader.py", line 418, in loadTestsFromName addr.filename, addr.module) File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/nose/importer.py", line 47, in importFromPath return self.importFromDir(dir_path, fqname) File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/nose/importer.py", line 94, in importFromDir mod = load_module(part_fqname, fh, filename, desc) File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/imp.py", line 245, in load_module return load_package(name, filename) File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/imp.py", line 217, in load_package return _load(spec) File "", line 684, in _load
File "", line 665, in _load_unlocked
File "", line 678, in exec_module
File "", line 219, in _call_with_frames_removed
File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/sknn/tests/init.py", line 1, in
from sknn.backend import lasagne
File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/sknn/backend/lasagne/init.py", line 5, in
from .mlp import MultiLayerPerceptronBackend
File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/sknn/backend/lasagne/mlp.py", line 22, in
import sklearn.cross_validation
ModuleNotFoundError: No module named 'sklearn.cross_validation'
Ran 1 test in 0.005s
FAILED (errors=2)
I also used the optional method with no luck
So if someone could help me out so I can use scikit-neuralnetwork.
Thank you!