Scikit-learn, installing with emerge? [Solved]

Anything that pertains to Portage

Moderator: Moderators

Scikit-learn, installing with emerge? [Solved]

Postby kwacorn » Tue Jan 20, 2015 19:46

I am needing to install and use scikit-learn (http://scikit-learn.org/) which is not available in Entropy but is available via Portage. I have little experience of using emerge to install packages and my trial install with the emerge --pretend option produced the following long list of scary messages:

Code: Select all
 ~ # emerge --pretend sci-libs/scikits_learn

These are the packages that would be merged, in order:

Calculating dependencies... done!
[ebuild     U  ] dev-python/setuptools-12.0.3 [9.1] PYTHON_TARGETS="python3_3*"
[ebuild   R    ] dev-python/six-1.9.0  PYTHON_TARGETS="python3_3* -python3_4*"
[ebuild   R    ] dev-python/dbus-python-1.2.0-r1  PYTHON_TARGETS="python3_3* -python3_4*"
[ebuild  N     ] sci-libs/scikits-0.1-r1  USE="-examples" PYTHON_TARGETS="python2_7 python3_3 -pypy -python3_4"
[ebuild     UD ] dev-python/pyparsing-1.5.6-r2 [2.0.1] PYTHON_TARGETS="python3_3*"
[ebuild   R    ] dev-python/sip-4.16.5  PYTHON_TARGETS="python3_3* -python3_4*"
[ebuild   R    ] dev-python/cython-0.21.2  PYTHON_TARGETS="python3_3* -python3_4*"
[ebuild  N     ] dev-python/joblib-0.8.4  USE="-doc {-test}" PYTHON_TARGETS="python2_7 python3_3 -pypy -python3_4"
[ebuild  NS    ] dev-python/python-dateutil-2.4.0 [2.3] PYTHON_TARGETS="python2_7 python3_3 -pypy -python3_4"
[ebuild   R    ] dev-python/pytz-2014.10  PYTHON_TARGETS="python3_3* -python3_4*"
[ebuild   R    ] dev-python/coverage-3.7.1  PYTHON_TARGETS="python3_3* -python3_4*"
[ebuild   R    ] dev-python/pillow-2.5.3-r1  PYTHON_TARGETS="python3_3* -python3_4*"
[ebuild   R    ] dev-python/numpy-1.9.1  PYTHON_TARGETS="python3_3*"
[ebuild   R    ] dev-python/nose-1.3.4  PYTHON_TARGETS="python3_3* -python3_4*"
[ebuild   R    ] virtual/python-imaging-2  PYTHON_TARGETS="python3_3* -python3_4*"
[ebuild   R    ] sci-libs/scipy-0.14.0-r1  PYTHON_TARGETS="python3_3* -python3_4*"
[ebuild   R    ] dev-python/pycairo-1.10.0-r4  PYTHON_TARGETS="python3_3* -python3_4*"
[ebuild   R    ] dev-python/PyQt4-4.11.3  PYTHON_TARGETS="python3_3* -python3_4*"
[ebuild   R    ] dev-python/matplotlib-1.4.2  PYTHON_TARGETS="python3_3* -python3_4*"
[ebuild  N     ] sci-libs/scikits_learn-0.15.2  USE="-doc -examples {-test}" PYTHON_TARGETS="python2_7 python3_3 -python3_4"

!!! Multiple package instances within a single package slot have been pulled
!!! into the dependency graph, resulting in a slot conflict:

dev-python/PyQt4:0

  (dev-python/PyQt4-4.11.3:0/0::gentoo, ebuild scheduled for merge) pulled in by
    dev-python/PyQt4[X,python_targets_python2_7(-)?,python_targets_python3_3(-)?,python_targets_python3_4(-)?,-python_single_target_python2_7(-),-python_single_target_python3_3(-),-python_single_target_python3_4(-)] required by (dev-python/matplotlib-1.4.2:0/0::gentoo, ebuild scheduled for merge)
                                                                                                                                                                                                                                                                                                                         

  (dev-python/PyQt4-4.11.3:0/0::gentoo, installed) pulled in by
    dev-python/PyQt4[python_targets_python2_7(-)?,python_targets_python3_3(-)?,python_targets_python3_4(-)?,-python_single_target_python2_7(-),-python_single_target_python3_3(-),-python_single_target_python3_4(-),svg,webkit] required by (dev-python/spyder-2.3.2:0/0::gentoo, installed)
                                                                                                                                                                                                                                                                                                             
    >=dev-python/PyQt4-4.11.1[python_targets_python2_7(-)?,python_targets_python3_3(-)?,python_targets_python3_4(-)?,-python_single_target_python2_7(-),-python_single_target_python3_3(-),-python_single_target_python3_4(-),dbus,declarative,script,sql,svg,webkit,X] required by (kde-base/pykde4-4.14.3:4/4.14::gentoo, installed)
                                                                                                                                                                                                                                                                                                                                                       
    dev-python/PyQt4[python_targets_python2_7(-)?,python_targets_python3_3(-)?,python_targets_python3_4(-)?,-python_single_target_python2_7(-),-python_single_target_python3_3(-),-python_single_target_python3_4(-)] required by (dev-python/ipython-2.3.1:0/0::gentoo, installed)
                                                                                                                                                                                                                                                                                                   

dev-python/dbus-python:0

  (dev-python/dbus-python-1.2.0-r1:0/0::gentoo, ebuild scheduled for merge) pulled in by
    dev-python/dbus-python[python_targets_python2_7(-)?,python_targets_python3_3(-)?,python_targets_python3_4(-)?,-python_single_target_python2_7(-),-python_single_target_python3_3(-),-python_single_target_python3_4(-)] required by (dev-python/PyQt4-4.11.3:0/0::gentoo, ebuild scheduled for merge)
                                                                                                                                                                                                                                                                                                                         

  (dev-python/dbus-python-1.2.0-r1:0/0::gentoo, installed) pulled in by
    dev-python/dbus-python[python_targets_python2_7(-)?,python_targets_python3_3(-)?,python_targets_python3_4(-)?,-python_single_target_python2_7(-),-python_single_target_python3_3(-),-python_single_target_python3_4(-)] required by (dev-python/PyQt4-4.11.3:0/0::gentoo, installed)
                                                                                                                                                                                                                                                                                                         

dev-python/sip:0

  (dev-python/sip-4.16.5:0/11::gentoo, ebuild scheduled for merge) pulled in by
    >=dev-python/sip-4.16.4:=[python_targets_python2_7(-)?,python_targets_python3_3(-)?,python_targets_python3_4(-)?,-python_single_target_python2_7(-),-python_single_target_python3_3(-),-python_single_target_python3_4(-)] required by (dev-python/PyQt4-4.11.3:0/0::gentoo, ebuild scheduled for merge)
                                                                                                                                                                                                                                                                                                                             

  (dev-python/sip-4.16.5:0/11::gentoo, installed) pulled in by
    >=dev-python/sip-4.16.2:0/11=[python_targets_python2_7(-),python_targets_python3_4(-),-python_single_target_python2_7(-),-python_single_target_python3_3(-),-python_single_target_python3_4(-)] required by (kde-base/pykde4-4.14.3:4/4.14::gentoo, installed)
                                                                                                                                                                                                                                                                                   
    >=dev-python/sip-4.16.4:0/11=[python_targets_python2_7(-),python_targets_python3_4(-),-python_single_target_python2_7(-),-python_single_target_python3_3(-),-python_single_target_python3_4(-)] required by (dev-python/PyQt4-4.11.3:0/0::gentoo, installed)
                                                                                                                                                                                                                                                                                 
    >=dev-python/sip-4.16.4:=[python_targets_python2_7(-)?,python_targets_python3_3(-)?,python_targets_python3_4(-)?,-python_single_target_python2_7(-),-python_single_target_python3_3(-),-python_single_target_python3_4(-)] required by (dev-python/PyQt4-4.11.3:0/0::gentoo, installed)
                                                                                                                                                                                                                                                                                                           
    >=dev-python/sip-4.16.2:=[python_targets_python2_7(-)?,python_targets_python3_3(-)?,python_targets_python3_4(-)?,-python_single_target_python2_7(-),-python_single_target_python3_3(-),-python_single_target_python3_4(-)] required by (kde-base/pykde4-4.14.3:4/4.14::gentoo, installed)
                                                                                                                                                                                                                                                                                                             

dev-python/pyparsing:0

  (dev-python/pyparsing-1.5.6-r2:0/0::gentoo, ebuild scheduled for merge) pulled in by
    >=dev-python/pyparsing-1.5.6[python_targets_python2_7(-)?,python_targets_python3_3(-)?,python_targets_python3_4(-)?,-python_single_target_python2_7(-),-python_single_target_python3_3(-),-python_single_target_python3_4(-)] required by (dev-python/matplotlib-1.4.2:0/0::gentoo, ebuild scheduled for merge)
                                                                                                                                                                                                                                                                                                                                   

  (dev-python/pyparsing-2.0.1:0/0::gentoo, installed) pulled in by
    dev-python/pyparsing[python_targets_python2_7(-)?,python_targets_python3_3(-)?,python_targets_python3_4(-)?,-python_single_target_python2_7(-),-python_single_target_python3_3(-),-python_single_target_python3_4(-)] required by (dev-python/ipython-2.3.1:0/0::gentoo, installed)
                                                                                                                                                                                                                                                                                                       

dev-python/pycairo:0

  (dev-python/pycairo-1.10.0-r4:0/0::gentoo, ebuild scheduled for merge) pulled in by
    dev-python/pycairo[python_targets_python2_7(-)?,python_targets_python3_3(-)?,python_targets_python3_4(-)?,-python_single_target_python2_7(-),-python_single_target_python3_3(-),-python_single_target_python3_4(-)] required by (dev-python/matplotlib-1.4.2:0/0::gentoo, ebuild scheduled for merge)
                                                                                                                                                                                                                                                                                                                         

  (dev-python/pycairo-1.10.0-r4:0/0::gentoo, installed) pulled in by
    >=dev-python/pycairo-1.10.0[python_targets_python2_7(-),python_targets_python3_4(-),-python_single_target_python2_7(-),-python_single_target_python3_3(-),-python_single_target_python3_4(-)] required by (dev-python/pygobject-cairo-3.14.0:3/3::sabayon-distro, installed)
                                                                                                                                                                                                                                                                                                 

dev-python/six:0

  (dev-python/six-1.9.0:0/0::gentoo, ebuild scheduled for merge) pulled in by
    >=dev-python/six-1.4[python_targets_python2_7(-)?,python_targets_python3_3(-)?,python_targets_python3_4(-)?,-python_single_target_python2_7(-),-python_single_target_python3_3(-),-python_single_target_python3_4(-)] required by (dev-python/matplotlib-1.4.2:0/0::gentoo, ebuild scheduled for merge)
                                                                                                                                                                                                                                                                                                                           
    >=dev-python/six-1.5[python_targets_python2_7(-)?,python_targets_python3_3(-)?,python_targets_python3_4(-)?,python_targets_pypy(-)?,-python_single_target_python2_7(-),-python_single_target_python3_3(-),-python_single_target_python3_4(-),-python_single_target_pypy(-)] required by (dev-python/python-dateutil-2.4.0:0/0::gentoo, ebuild scheduled for merge)
                                                                                                                                                                                                                                                                                                                                                                                       

  (dev-python/six-1.9.0:0/0::gentoo, installed) pulled in by
    >=dev-python/six-1.5.2[python_targets_python2_7(-)?,python_targets_python3_3(-)?,python_targets_python3_4(-)?,python_targets_pypy(-)?,-python_single_target_python2_7(-),-python_single_target_python3_3(-),-python_single_target_python3_4(-),-python_single_target_pypy(-)] required by (dev-python/pyopenssl-0.14:0/0::gentoo, installed)
                                                                                                                                                                                                                                                                                                                                                                 
    >=dev-python/six-1.4.1[python_targets_python2_7(-)?,python_targets_python3_3(-)?,python_targets_python3_4(-)?,python_targets_pypy(-)?,-python_single_target_python2_7(-),-python_single_target_python3_3(-),-python_single_target_python3_4(-),-python_single_target_pypy(-)] required by (dev-python/cryptography-0.6.1:0/0::gentoo, installed)
                                                                                                                                                                                                                                                                                                                                                                     


It may be possible to solve this problem by using package.mask to
prevent one of those packages from being selected. However, it is also
possible that conflicting dependencies exist such that they are
impossible to satisfy simultaneously.  If such a conflict exists in
the dependencies of two different packages, then those packages can
not be installed simultaneously. You may want to try a larger value of
the --backtrack option, such as --backtrack=30, in order to see if
that will solve this conflict automatically.

For more information, see MASKED PACKAGES section in the emerge man
page or refer to the Gentoo Handbook.


The following keyword changes are necessary to proceed:
 (see "package.accept_keywords" in the portage(5) man page for more details)
# required by dev-python/matplotlib-1.4.2
# required by sci-libs/scikits_learn-0.15.2
# required by sci-libs/scikits_learn (argument)
=dev-python/pyparsing-1.5.6-r2 ~amd64

!!! The following installed packages are masked:
- dev-python/pyparsing-2.0.1::gentoo (masked by: package.mask)
/etc/portage/package.mask/00-sabayon.package.mask:
# 2014-07-24 Fabio Erculiani: mwlib wants an old pyparsing

- www-plugins/adobe-flash-11.2.202.425::gentoo (masked by: AdobeFlash-11.x license(s))
A copy of the 'AdobeFlash-11.x' license is located at '/usr/portage/licenses/AdobeFlash-11.x'.

- sys-power/cpufrequtils-008-r4::gentoo (masked by: package.mask)
/usr/portage/profiles/package.mask:
# Pacho Ramos <[email protected]> (01 Dec 2014)
# Upstream dead for a long time, use sys-power/cpupower
# instead. Removal in a month.

- virtual/perl-Digest-SHA-5.880.0::gentoo (masked by: package.mask)
/etc/portage/package.mask/00-sabayon.package.mask:
# 2014-09-30 Joost Ruis: Masked because we bump to latest stable pull and not want to pull in unstable

I am not sure how to proceed, if I should at all. Could you advise me please on how to eliminate the problem messages and do a safe install or on any better course of action? Thanks.
Last edited by kwacorn on Fri Feb 06, 2015 22:08, edited 1 time in total.
kwacorn
Young Hen
 
Posts: 37
Joined: Sat Jan 21, 2012 11:50

Re: Scikit-learn, installing with emerge?

Postby xpto » Wed Jan 21, 2015 19:00

You can learn how to mix Entropy and Portage on the wiki.
Follow the guide and the part about Keeping Portage's configuration files in sync with Entropy which I think will resolve some of those R - Replace packages caused by PYTHON_TARGETS.
Make shore that you update make.conf file.

Is you system fully updated?

Try to install every dependency with equo from Entropy, if the dependency isn't available in Entropy you have to install it with emerge from Portage, proceeding like you were doing to install sci-libs/scikits_learn.

I think you have already installed dev-python/setuptools-12.0.3 with emerge because version 9.1 is the latest on Entropy and the one that sci-libs/scikits_learn needs. So you should install this dependency with equo.

Portage is using python3_3 in PYTHON_TARGETS but the packages compiled in Entropy that you have installed are using python3_4 causing emerge to try to rebuilt - R those packages with python3_3 target.
xpto
Baby Hen
 
Posts: 12
Joined: Tue Jul 09, 2013 0:52

Re: Scikit-learn, installing with emerge?

Postby kwacorn » Sat Jan 24, 2015 10:49

Just to acknowledge and thank you for you post @xpto, it has greatly helped clarify what to do next. I am working through the suggestions and a few other ideas, as time permits, I hope to report back later on my progress. Thanks.
kwacorn
Young Hen
 
Posts: 37
Joined: Sat Jan 21, 2012 11:50

Re: Scikit-learn, installing with emerge?

Postby kwacorn » Sat Jan 31, 2015 23:27

Referring to my original post I had already fully updated my system and installed all the dependencies possible with equo. Now with xpto's advice I have followed the instructions in the Sabayon wiki section on Keeping Portage's configuration files in sync with Entropy and also added the Sabayon overlay with layman -a Sabayon followed by emerge --sync --quiet && layman -S && eix-sync. (I am not sure if I also have to implement the earlier instructions on that wiki page, so I have not).

I then tried again with emerge --pretend sci-libs/scikits_learn only to get the same errors again as in my original post (apart from a few later version numbers due to recent updates). The error message suggests increasing the backtrack option, so I also tried emerge --pretend --backtrack=32 sci-libs/scikits_learn, but got the same errors.

So I am still stuck with this problem, what other options can I try (or should have tried)? Thanks.
kwacorn
Young Hen
 
Posts: 37
Joined: Sat Jan 21, 2012 11:50

Re: Scikit-learn, installing with emerge?

Postby xpto » Sun Feb 01, 2015 11:55

Can you post the output of
Code: Select all
grep -i 'python' /etc/make.conf /etc/portage/make.conf

Are you sure that make.conf file was updated?

I think there was a error on that wiki page section: where is shows make.conf.$(uname -m) should be make.conf.$(uname -m | sed -e 's/x86_64/amd64/' -e 's/i.86/x86/') .
This may cause the make.conf file not to be updated.

To be sure, when running eix-sync see if it doesn't output something like WARNING: Skipping make.conf and when running equo conf update you update make.conf file.
xpto
Baby Hen
 
Posts: 12
Joined: Tue Jul 09, 2013 0:52

Re: Scikit-learn, installing with emerge?

Postby kwacorn » Mon Feb 02, 2015 14:20

Code: Select all
 # grep -i 'python' /etc/make.conf /etc/portage/make.conf
grep: /etc/make.conf: No such file or directory
/etc/portage/make.conf:SAB_SYSTEM="cjk unicode gnutls nptl gcj udev systemd logind -consolekit kerberos acl dbus bash-completion lzo rar policykit xcb bzip2 bidi wifi lm_sensors acpi usb pcmcia bluetooth irda ieee1394 perl python"
/etc/portage/make.conf:USE_PYTHON="2.7"
/etc/portage/make.conf:PYTHON_TARGETS="python2_7 python3_3"

/etc/make.conf never existed but /etc/portage/make.conf did and does, the wiki instructs anyway to move it:
Code: Select all
mv /etc/make.conf /etc/portage/make.conf.$(uname -m)

Are you sure that make.conf file was updated?

From the wiki instructions, ln -s make.conf.$(uname -m) make.conf, I had /etc/portage/make.conf
linking to /etc/portage/make.conf.x86_64 and it appears it was not updated, so...
I think there was a error on that wiki page section: where is shows make.conf.$(uname -m) should be make.conf.$(uname -m | sed -e 's/x86_64/amd64/' -e 's/i.86/x86/') .
This may cause the make.conf file not to be updated.

appears to be correct and for me resulted in a file named make.conf.amd64. After running emerge --sync --quiet && layman -S && eix-sync it was necessary to run equo conf update so that /etc/portage/make.conf.amd64 was updated resulting in good news:
Code: Select all
 # emerge --pretend sci-libs/scikits_learn

These are the packages that would be merged, in order:

Calculating dependencies... done!
[ebuild  N     ] dev-python/joblib-0.8.4  USE="-doc {-test}" PYTHON_TARGETS="python2_7 python3_4 -pypy -python3_3"
[ebuild  N     ] sci-libs/scikits-0.1-r1  USE="-examples" PYTHON_TARGETS="python2_7 python3_4 -pypy -python3_3"
[ebuild  N     ] sci-libs/scikits_learn-0.15.2  USE="-doc -examples {-test}" PYTHON_TARGETS="python2_7 python3_4 -python3_3"

I will try the real install later when I have enough time.

Perhaps the wiki instructions need to be checked and updated, though I wonder too if the esteemed Sabayon team could make changes to the Sabayon system so users do not have to make these system edits?
kwacorn
Young Hen
 
Posts: 37
Joined: Sat Jan 21, 2012 11:50

Re: Scikit-learn, installing with emerge?

Postby kwacorn » Tue Feb 03, 2015 21:24

I am glad to report the install was successful, after the second attempt, the first attempt reported a g++ error which was corrected by installing gcc.

Thanks for identifying the original cause of the problems and advising on how to fix them. I should be back in action now :D
kwacorn
Young Hen
 
Posts: 37
Joined: Sat Jan 21, 2012 11:50

Re: Scikit-learn, installing with emerge? [Solved]

Postby Fitzcarraldo » Mon Mar 02, 2015 18:10

If you have found an error in the SL Wiki, will you please edit the relvant Wiki page and fix it, so that other users may benefit in future. Thanks.
User avatar
Fitzcarraldo
Sagely Hen
 
Posts: 8078
Joined: Sat Mar 10, 2007 5:40
Location: United Kingdom

Re: Scikit-learn, installing with emerge? [Solved]

Postby joost » Tue Mar 03, 2015 21:08

Code: Select all
[email protected] ~ $ equo search sci-libs/scikits_learn
╠  @@ Searching...
╠      @@ Package: sci-libs/scikits_learn-0.15.2 branch: 5, [sabayonlinux.org]
╠          Available:     version: 0.15.2 ~ tag: NoTag ~ revision: 0
╠          Installed:     version: Not installed ~ tag: n/a ~ revision: n/a
╠          Slot:          0
╠          Homepage:      http://scikit-learn.org
╠          Description:   Python modules for machine learning
╠                         and data mining
╠          License:       BSD
╠   Keywords:  sci-libs/scikits_learn
╠   Found:     1 entry


I've added it to Entropy.
joost
Sagely Hen
 
Posts: 2639
Joined: Fri Nov 17, 2006 12:11
Location: The Netherlands


Return to Portage|Emerge Package Managers

Who is online

Users browsing this forum: No registered users and 1 guest