View previous topic :: View next topic |
Author |
Message |
miket Guru
Joined: 28 Apr 2007 Posts: 488 Location: Gainesville, FL, USA
|
Posted: Mon Oct 08, 2012 2:43 pm Post subject: I hate Python! [solved] |
|
|
This isn't so much of a matter of hating Python's crazy block-grouping scheme that uses whitespace instead of proper syntax, its object-orientation scheme that fails to enforce proper abstraction, or its sometimes iffy performance: it's the careless way it deals with multiple versions of the Python interepreter. In a word, Python doesn't play nicely with Gentoo slots.
In the middle of my big upgrade the ebuild for dbus-python failed. The message stated that it didn't deal with C-Python 3--even though my eselect for Python had never been set to any version of Python greater than 2.7. Responses here in the forum advised eselecting Python 3, which I did. That worked for a while--until I needed to use the equery utility and got a message about a missing module. I had the bright idea to switch things back to Python 2.7, so things worked again. Things worked OK until I got to PyQt4, which couldn't find sipconfig. I get the *strong* suspicion that if I switched back to Python 3.2 the ebuild would work but my system would be flaky.
If there is supposed to be a good way for me to deal with this, where is the news item for it? The most recent news item for Python 3 is 2.5 years old. It advised not setting the active version to 3.1 because utilities had not been ported, but it would be ready if you needed. There was also this promise:
Quote: | When setting it becomes recommended, a separate news item will be created to notify users. |
So I am caught between two Python slots and seemingly some things want to be only in a 3.x slot and others only in a 2.x slot. Is this right? How do I straighten this out?
Last edited by miket on Mon Oct 08, 2012 6:31 pm; edited 1 time in total |
|
Back to top |
|
|
frostschutz Advocate
Joined: 22 Feb 2005 Posts: 2977 Location: Germany
|
Posted: Mon Oct 08, 2012 3:01 pm Post subject: |
|
|
On my ~amd64 Gentoo install it's like this:
Code: |
# eselect python list
Available Python interpreters:
[1] python2.7 *
[2] python3.2
|
And I've never had any issues with PyQt4 (using it for Anki) or any of the Portage/equery utils. I don't really use Python 3 for anything as of yet.
Not sure what went wrong for you, maybe python-updater or emerge oneshotting all Python packages would help fix something? |
|
Back to top |
|
|
BillWho Veteran
Joined: 03 Mar 2012 Posts: 1600 Location: US
|
Posted: Mon Oct 08, 2012 3:01 pm Post subject: |
|
|
miket,
When I had conflicts with python I set it to python2.7 and ran python-updater - problem solved _________________ Good luck
Since installing gentoo, my life has become one long emerge |
|
Back to top |
|
|
gerard27 Advocate
Joined: 04 Jan 2004 Posts: 2377 Location: Netherlands
|
Posted: Mon Oct 08, 2012 3:14 pm Post subject: |
|
|
I've never had problems like you mention with 2.7 & 3.2.
2.7 is set according to eselect python list.
dbus-python and PyQt4 were emerged with that setting,no problem.
sip is a dependency of PyQt4-4.9.5 and plasma-workspace and pykde4.
Something wrong in your setup?
Gerard. _________________ To install Gentoo I use sysrescuecd.Based on Gentoo,has firefox to browse Gentoo docs and mc to browse (and edit) files.
The same disk can be used for 32 and 64 bit installs.
You can follow the Handbook verbatim.
http://www.sysresccd.org/Download |
|
Back to top |
|
|
dol-sen Retired Dev
Joined: 30 Jun 2002 Posts: 2805 Location: Richmond, BC, Canada
|
Posted: Mon Oct 08, 2012 3:38 pm Post subject: |
|
|
I suspect you do not have USE_PYTHON set in your make.conf.
When you switched to 3.2 some things are installed there, some only in 2.7 and vice-versa
if you want to switch between the 2 and have everything capable of both 2.7 and 3.2 installed in both, then set Code: | USE_PYTHON="2.7 3.2" | in make.conf and run python-updater. _________________ Brian
Porthole, the Portage GUI frontend irc@freenode: #gentoo-guis, #porthole, Blog
layman, gentoolkit, CoreBuilder, esearch... |
|
Back to top |
|
|
miket Guru
Joined: 28 Apr 2007 Posts: 488 Location: Gainesville, FL, USA
|
Posted: Mon Oct 08, 2012 3:50 pm Post subject: |
|
|
I was on Python 2.7 for everything until I got to that problem with PyQt4--I don't know what would have been so strange for it that it didn't like it when I was set to Python 2.7 but did when I switched to Python 3.2. I'd be quite pleased to put everything back to Python 2.7--if I could be sure it would work.
Well, I'll give BillWho's suggestion a try: set things to Python 2.7 and run python-updater. I'm kind of inclined also to apply dol-sen's suggestion of building for both targets with USE_PYTHON (which is the Python analogue to PHP_TARGETS I thought ought to exist), but I'm afraid of how that might confuse system utilities. I'm about to try the python-updater and I'll let you know what happens.
One other thing I noticed though: on a newer system I built, Python 3.2 was installed as the default, and everything seems to work. No news item about that, alas. |
|
Back to top |
|
|
miket Guru
Joined: 28 Apr 2007 Posts: 488 Location: Gainesville, FL, USA
|
Posted: Mon Oct 08, 2012 6:30 pm Post subject: Aha! |
|
|
Setting the default Python to 2.7 and running python-updater did the trick. There are two things I learned while watching python-updater run:
1. I had a split setup all right--between Python 2.7 and Python 3.1. The new stuff was for Python 3.2, but there was only 3.1, not 3.2.
2. Even without USE_PYTHON, python_updater told me it was making dual targets--2.7 and 3.2--for package that are capable of that.
I still have one nagging issue: why is Python so intolerant of bytecode files of a different version? I'll grant that going from 2.x to 3.x ought to be large enough to break compatablity, but why is there never compatability between version V.m and V.m+1 files? Those Python version bumps always entail a big round of python-updater. For a language which has insinuated itself so far into systems programming, shouldn't they at least *try* to get the kind of compatability we usually see as implied by the sonames of libraries compiled from C? I wish they would be more responsible.
Since there was no change from a 2.7 slot to a 2.8 slot, I had thought there was no need for the python-updater. Evidently, it is what would have saved me when I hit that problem with PyQt4. |
|
Back to top |
|
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|