Forums

Skip to content

Advanced search
  • Quick links
    • Unanswered topics
    • Active topics
    • Search
  • FAQ
  • Login
  • Register
  • Board index Assistance Portage & Programming
  • Search

Programs can't find python modules after python update

Problems with emerge or ebuilds? Have a basic programming question about C, PHP, Perl, BASH or something else?
Post Reply
Advanced search
17 posts • Page 1 of 1
Author
Message
ChrisWhite
Retired Dev
Retired Dev
User avatar
Posts: 399
Joined: Thu Jul 08, 2004 7:19 pm
Location: Stockton, CA
Contact:
Contact ChrisWhite
Website

Programs can't find python modules after python update

  • Quote

Post by ChrisWhite » Wed Oct 12, 2005 4:00 pm

I've seen this a lot lately, so I think I'll clarify it here. When you update portage, it uses the site-packages directory for that version of python. Now the following situation comes into play. Let's say you have python2.3. It will look something like this:

Code: Select all

/usr/lib/python2.3/site-packages/
Now let's say drv_libxml2.py is located there and a program uses it. Now you update to python 2.4. The site-packages directory will now be here:

Code: Select all

/usr/lib/python2.4/site-packages/
So your poor program will look in THAT directory instead, and find drv_libxml2.py is no longer there and panic. That said, a nice program was created to rebuild modules that are using the older site directory, python-updater. So please make sure you

Code: Select all

# python-updater
to recompile all the modules stuck in the older site-packages directory.
Top
garion911
Tux's lil' helper
Tux's lil' helper
Posts: 88
Joined: Tue Jun 04, 2002 1:30 pm

  • Quote

Post by garion911 » Thu Oct 13, 2005 8:49 pm

Here's a question:

I have a need to have packages installed for -both- 2.3 and 2.4 (developing for machines wth only 2.3)...

Now that gentoo has upgraded to 2.4, how can I easily emerge twisted (for example) for 2.3?

I did try this, but it didn't work:

Code: Select all

python-updater -o 2.4 -n 2.3
It looked like it just emerged stuff for 2.4, which didn't help me much :(
Top
doppelganger
Tux's lil' helper
Tux's lil' helper
User avatar
Posts: 84
Joined: Wed Jun 30, 2004 10:42 pm

  • Quote

Post by doppelganger » Fri Oct 14, 2005 6:39 pm

python-updater works fine on most packags....but there are several that are failing compliation with Python 2.4
pylibpcap is one example, original question posted here
Top
Decibels
Veteran
Veteran
User avatar
Posts: 1635
Joined: Fri Aug 16, 2002 12:51 am
Location: U.S.A.

wxPython with python-updater doesn't work.

  • Quote

Post by Decibels » Sat Oct 15, 2005 12:44 am

Python-updater didn't work with wxPython either, had to emerge: wxpython-2.4.2.4-r3
It's in several post, just thought would add to this sticky for faster help.
Support bacteria – they’re the only culture some people have.”

– Steven Wright
Top
renrutal
Tux's lil' helper
Tux's lil' helper
User avatar
Posts: 135
Joined: Sat Mar 26, 2005 3:28 am
Location: Brazil

  • Quote

Post by renrutal » Fri Oct 21, 2005 2:39 am

Is there a way to move the system entirely to 2.4 so portage or some of its tools can remove /usr/lib/python2.3? Maybe revdep-rebuild?
Top
bluenuht
Tux's lil' helper
Tux's lil' helper
User avatar
Posts: 149
Joined: Sat Oct 01, 2005 9:09 pm

just python-update worked for me

  • Quote

Post by bluenuht » Sat Oct 22, 2005 12:37 pm

I just ran

Code: Select all

python-updater
on its own with no paramaters and now my python progies work again !

thanks
x86_64 Intel(R) Core(TM) i5-9400F CPU @ 2.90GHz GenuineIntel GNU/Linux GeForce GTX NVIDIA 1660TI 16GB
Top
richk449
Guru
Guru
User avatar
Posts: 345
Joined: Fri Oct 24, 2003 4:23 am

  • Quote

Post by richk449 » Sun Nov 13, 2005 5:11 pm

Perhaps this is the wrong place for this (feel free to move/remove it if so), but why isn't python-updater run automatically, or, at minimum, a warning added to the end of an emerge which upgrades to 2.4?

I upgraded to 2.4 without realizing it, and it took me a week to figure out why half my GNOME programs were not working. I have spent another week re-emerging every python package I can think of. python-updater obviously saves me this trouble, but I only stumbled on this post by accident.
Top
slycordinator
Advocate
Advocate
User avatar
Posts: 3065
Joined: Sat Jan 31, 2004 9:51 pm
Location: Korea

  • Quote

Post by slycordinator » Mon Nov 28, 2005 9:48 pm

richk449 wrote:Perhaps this is the wrong place for this (feel free to move/remove it if so), but why isn't python-updater run automatically, or, at minimum, a warning added to the end of an emerge which upgrades to 2.4?
Every ebuild of python since at least 2.3.5-r1 has the following (or something very similar)

Code: Select all

ewarn
        ewarn "If you have just upgraded from an older version of python you will need to run:"
        ewarn
        ewarn "/usr/sbin/python-updater"
        ewarn
        ewarn "This will automatically rebuild all the python dependent modules"
        ewarn "to run with python-${PYVER}."
        ewarn
        ewarn "Your original Python is still installed and can be accessed via"
        ewarn "/usr/bin/python2.x."
        ewarn
So it already gives you the warning; you just didn't bother reading it.
Top
red-wolf76
l33t
l33t
User avatar
Posts: 714
Joined: Wed Apr 13, 2005 6:20 pm
Location: Rhein-Main Area

  • Quote

Post by red-wolf76 » Wed Nov 30, 2005 9:44 pm

slycordinator wrote:(...) you just didn't bother reading it.
Yah, right. As if everyone gets off, watching tons of shyte fly by on a monitor while they're busy updating their system. :roll: :lol:

Some of us actually do other stuff while these warnings fly by. It would do a lot of good if Portage could "collect" all these warnings and regurgitate them at the end, not only of individual merges, but overall...

Or write them to a sort of "warning.log" and output a reminder to look there after finishing up.
0mFg, G3nt00 r0X0r$ T3h B1g!1111 ;)

Use sane CFLAGS! If for no other reason, do it for the lulz!
Top
slycordinator
Advocate
Advocate
User avatar
Posts: 3065
Joined: Sat Jan 31, 2004 9:51 pm
Location: Korea

  • Quote

Post by slycordinator » Wed Nov 30, 2005 10:19 pm

I agree. The new suggestion you made would be a good one. Might be a suggestion you could make at http://bugs.gentoo.org

Sorry if I was coming off as an ass. I think I had little sleep that night.
Top
red-wolf76
l33t
l33t
User avatar
Posts: 714
Joined: Wed Apr 13, 2005 6:20 pm
Location: Rhein-Main Area

  • Quote

Post by red-wolf76 » Wed Nov 30, 2005 10:32 pm

You didn't come of as an ass at all... :wink: I just couldn't resist the snappy remark... Sorry on my behalf for that, mate.

Might be a good idea to suggest that.

[EDIT:] Seems like someone already did (#98118).
0mFg, G3nt00 r0X0r$ T3h B1g!1111 ;)

Use sane CFLAGS! If for no other reason, do it for the lulz!
Top
slycordinator
Advocate
Advocate
User avatar
Posts: 3065
Joined: Sat Jan 31, 2004 9:51 pm
Location: Korea

  • Quote

Post by slycordinator » Wed Nov 30, 2005 11:02 pm

red-wolf76 wrote:You didn't come of as an ass at all... :wink: I just couldn't resist the snappy remark... Sorry on my behalf for that, mate.

Might be a good idea to suggest that.

[EDIT:] Seems like someone already did (#98118).
That one was a DUPE of http://bugs.gentoo.org/show_bug.cgi?id=11359

Which includes a link for a utility to do exactly what you're asking for.

And it appears the feature you're asking for is in CVS so it'll be implemented in a later version of portage (version 2.1 as I read).
Top
red-wolf76
l33t
l33t
User avatar
Posts: 714
Joined: Wed Apr 13, 2005 6:20 pm
Location: Rhein-Main Area

  • Quote

Post by red-wolf76 » Wed Nov 30, 2005 11:12 pm

slycordinator wrote: And it appears the feature you're asking for is in CVS so it'll be implemented in a later version of portage (version 2.1 as I read).
Yay! So all we do is wait! :twisted:
0mFg, G3nt00 r0X0r$ T3h B1g!1111 ;)

Use sane CFLAGS! If for no other reason, do it for the lulz!
Top
slycordinator
Advocate
Advocate
User avatar
Posts: 3065
Joined: Sat Jan 31, 2004 9:51 pm
Location: Korea

  • Quote

Post by slycordinator » Wed Nov 30, 2005 11:51 pm

red-wolf76 wrote:
slycordinator wrote: And it appears the feature you're asking for is in CVS so it'll be implemented in a later version of portage (version 2.1 as I read).
Yay! So all we do is wait! :twisted:
Or install the utility that someone provided... and remove that utility later when the new version of portage comes out. :P
Top
vikwiz
n00b
n00b
User avatar
Posts: 50
Joined: Sat Mar 01, 2003 12:42 am
Location: Budapest
Contact:
Contact vikwiz
Website

Using python 2.3 and 2.4 together.

  • Quote

Post by vikwiz » Mon Dec 12, 2005 10:12 am

Hi,
I'm looking for information if it is possible to use packages for python 2.3 and 2.4 both, in a portage friendly way. Untill now I fond no definite answer.

Of course it's possible to install them conventionaly under 2.3 (from original source, doing python2.3 setup.py install on them), but that's why we use portage, not to mess around in /usr randomly. Until now portage is prime in ability to manage multiple versions of packages with SLOTS, so I thought this is an evident functionality, just surprised it's not.

There is something like PYTHON_SLOT_VERSION, but it seems it has nothing to do with this problem.

If it's not supported, I imagine a way to specify something like PYTHON_SLOTS in make.conf, as a list of used python slots (like "2.3 2.4"), so all python packages installs under both versions. As a personal preference, of course.

Looking for your definite yes or no answer, before installing needed packages under 2.3!
Top
JCDenton
n00b
n00b
User avatar
Posts: 8
Joined: Tue Jan 25, 2005 12:44 pm

switch to python 2.4

  • Quote

Post by JCDenton » Fri Feb 24, 2006 1:15 pm

Hi !

I have exactly the same problem.
renrutal wrote:Is there a way to move the system entirely to 2.4 so portage or some of its tools can remove /usr/lib/python2.3? Maybe revdep-rebuild?
I tried the "python-updater" but I got the following message:

$ python-updater
* Can't determine any previous Python version(s).

Can I remove all the python2.3 stuff by hand?


Thanks!!
Top
huh_dude
Apprentice
Apprentice
User avatar
Posts: 166
Joined: Fri Aug 12, 2005 9:26 am
Location: Melbourne, Australia

  • Quote

Post by huh_dude » Sun Apr 23, 2006 7:25 am

JCDenton wrote: I tried the "python-updater" but I got the following message:

$ python-updater
* Can't determine any previous Python version(s)
Aye, have the same result.

My knowledge is too scant to pretend this is expert authority speaking but have you a copy of the bash shell surving in its directory. Mine has departed this life. One suggestion in my own thread (mdeininger's post) has been to copy bash from the livecd. I haven't done it myself because I don't understand the problem which caused bash to fade away in the first place.
teh last part was important, setflags bit in...
#include <milk>
#include <iomanip>
int main()
{
const float large_mug=pourPot;
cin>> coffee | large_mug;
cout<<"Coffee"=coffee;
}
#make Coffee ..was zero, the program wouldn't work.
Top
Post Reply

17 posts • Page 1 of 1

Return to “Portage & Programming”

Jump to
  • Assistance
  • ↳   News & Announcements
  • ↳   Frequently Asked Questions
  • ↳   Installing Gentoo
  • ↳   Multimedia
  • ↳   Desktop Environments
  • ↳   Networking & Security
  • ↳   Kernel & Hardware
  • ↳   Portage & Programming
  • ↳   Gamers & Players
  • ↳   Other Things Gentoo
  • ↳   Unsupported Software
  • Discussion & Documentation
  • ↳   Documentation, Tips & Tricks
  • ↳   Gentoo Chat
  • ↳   Gentoo Forums Feedback
  • ↳   Duplicate Threads
  • International Gentoo Users
  • ↳   中文 (Chinese)
  • ↳   Dutch
  • ↳   Finnish
  • ↳   French
  • ↳   Deutsches Forum (German)
  • ↳   Diskussionsforum
  • ↳   Deutsche Dokumentation
  • ↳   Greek
  • ↳   Forum italiano (Italian)
  • ↳   Forum di discussione italiano
  • ↳   Risorse italiane (documentazione e tools)
  • ↳   Polskie forum (Polish)
  • ↳   Instalacja i sprzęt
  • ↳   Polish OTW
  • ↳   Portuguese
  • ↳   Documentação, Ferramentas e Dicas
  • ↳   Russian
  • ↳   Scandinavian
  • ↳   Spanish
  • ↳   Other Languages
  • Architectures & Platforms
  • ↳   Gentoo on ARM
  • ↳   Gentoo on PPC
  • ↳   Gentoo on Sparc
  • ↳   Gentoo on Alternative Architectures
  • ↳   Gentoo on AMD64
  • ↳   Gentoo for Mac OS X (Portage for Mac OS X)
  • Board index
  • All times are UTC
  • Delete cookies

© 2001–2026 Gentoo Foundation, Inc.

Powered by phpBB® Forum Software © phpBB Limited

Privacy Policy

 

 

magic