Jump to content

Photo

Coexistence of Python 2 and 3

- - - - - python use flags

Best Answer sputnik , 11 June 2014 - 02:46 AM

I have those flags, but as drobbins says, I believe they are only a gentoo thing, not needed here and I should remove them.  But zero issues because of them.

I think it's likely you need to do python-updater, painless and at the very least you'll rule out any problem there.

Go to the full post »


3 replies to this topic

#1
navigium

navigium

    Newbie

  • Members
  • Pip
  • 8 posts

Warning: This is probably a noob question, I just replaced Debian on my Desktop with Funtoo...

 

Now I try to allow Python 2 and 3 to coexist peacefully. The main problem are the python_single_target_pythonX_X use flags. A lot of packages need exactly one of them specified. But some require Python 2 and some Python 3.

 

In /etc/portage/make.conf  I specified

PYTHON_TARGETS="python2_7 python3_4"
PYTHON_SINGLE_TARGET="python3_4"

If I add python2_7 as single target, some ebuilds start complaining about needing exacly one of the two but not both specified. But if I don't add python2_7, ebuilds that depend on Python 2 won't build. The only solution I found was to specify the use flag for every single application in /etc/portage/package.use like this:

app-office/libreoffice python_single_target_python2_7

But that's a lot of lines to add to that file and I figured there has to be a easier way to do this. I tried to find some documentation about Python on Gentoo but wasn't lucky.

 

When I try to install ports that depend on Python 2 or when I try to do a 'emerge -uND @world' I get this error:

The following REQUIRED_USE flag constraints are unsatisfied:
    python_single_target_python2_7

Thank you,

 

Beni

 



#2
drobbins

drobbins

    Administrator

  • Administrators
  • 136 posts

Hi Beni,

 

It's my understanding that you should not need to mess with those USE flags at all. By default, Funtoo will have python2 and python3 available.

 

Let's back up -- can you describe the original issue you had with having python2 and 3 co-existing peacefully?

 

-Daniel



#3
sputnik

sputnik

    Advanced Member

  • Members
  • PipPipPip
  • 117 posts
✓  Best Answer

I have those flags, but as drobbins says, I believe they are only a gentoo thing, not needed here and I should remove them.  But zero issues because of them.

I think it's likely you need to do python-updater, painless and at the very least you'll rule out any problem there.



#4
navigium

navigium

    Newbie

  • Members
  • Pip
  • 8 posts

Thanks @Mike! I removed these use flags, ran python-updater and did a 'emerge -uND @world' and everything seems to work now. I don't really know why I set those USE flags in the first place.





Reply to this topic



  



Also tagged with one or more of these keywords: python, use flags

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users