complains too many values to unpack #3457

thomasj02 opened this Issue Jul 20, 2014 · 4 comments


None yet
3 participants

I pulled the latest sources from git and tried to run the example. The example gives this error:

$ python ./examples/linear_model/

Lasso and Elastic Net

Lasso and elastic net (L1 and L2 penalisation) implemented using a
coordinate descent.

The coefficients can be forced to be positive.

Computing regularization path using the lasso...
Traceback (most recent call last):
File "./examples/linear_model/", line 33, in
alphas_lasso, coefs_lasso, _ = lasso_path(X, y, eps, fit_intercept=False)
File "/usr/local/lib/python2.7/dist-packages/sklearn/linear_model/", line 262, in lasso_path
return_models=return_models, **params)
File "/usr/local/lib/python2.7/dist-packages/sklearn/linear_model/", line 483, in enet_path
coef_, dual_gap_, eps_ = model
ValueError: too many values to unpack


agramfort commented Jul 21, 2014

@MechCoder can you have a look?


MechCoder commented Jul 21, 2014

this is strange, it works fine for me in master. @agramfort can you verify?


MechCoder commented Jul 21, 2014

@thomasj02 from the error output. I'm guessing you might need to build again.

can you please run?

sudo python build_ext --inplace

Thanks, you're right, it was an installation issue. There were some files from a previous pip install of sklearn that were being used incorrectly

@thomasj02 thomasj02 closed this Jul 21, 2014

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment