Welcome to Soft32 Linux Forums!
FAQFAQ    SearchSearch      ProfileProfile    Private MessagesPrivate Messages   Log inLog in

[gentoo-user] broken python howto

 
   Soft32 Home -> Linux -> User RSS
Next:  [gentoo-user] [Gentoo-user] Ati-drivers, no DRI  
Author Message
Daniel Iliev

External


Since: Jul 05, 2006
Posts: 155



(Msg. 1) Posted: Mon Jan 29, 2007 1:10 pm
Post subject: [gentoo-user] broken python howto
Archived from groups: linux>gentoo>user (more info?)

Hi, everyone

I'm facing the following problem:

emerge "<whatever>"


!!! Failed to complete python imports. These are internal modules for
!!! python and failure here indicates that you have a problem with python
!!! itself and thus portage is not able to continue processing.

!!! You might consider starting python with verbose flags to see what has
!!! gone wrong. Here is the information we got for this exception:
No module named time

Traceback (most recent call last):
File "/usr/bin/emerge", line 28, in ?
import portage
File "/usr/lib/portage/pym/portage.py", line 20, in ?
import copy, errno, os, re, shutil, string, time, types
ImportError: No module named time


How could I fix this? I found an official "howto" on recovering broken
portage but the problem here is with python, isn't it? I have no
experience with python other than using the python based tools of Gentoo
(such as portage itself) therefore I'm helpless.

Any ideas and/or suggestions will be much appreciated.

--
Best regards,
Daniel


--
gentoo-user RemoveThis @gentoo.org mailing list
Back to top
Login to vote
Kent Fredric

External


Since: Jan 10, 2007
Posts: 74



(Msg. 2) Posted: Mon Jan 29, 2007 1:40 pm
Post subject: Re: [gentoo-user] broken python howto [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

On 1/30/07, Daniel Iliev <danny DeleteThis @ilievnet.com> wrote:

> Any ideas and/or suggestions will be much appreciated.
>
> --

The Last time i had one of those problems I cracked out an old binpkg
I had lying around ( a lesson I learned a while back on freebsd when i
had make,gcc and tar ALL break due to a common lib dying : moral of
the story: always have static copies of tar/make/bz2 in binpkgs Neutral )

I know its a nasty solution, but in times of desperation, a manual
untarring of a binpkg into the right place will save you much anguish.

I've not read of any other way to save that problem, other than
hacking up a recent "snapshot" and copying the files into place.

I'm sure theres a better answer than this, but I've yet to see it.
--
Kent
ruby -e '[1, 2, 4, 7, 0, 9, 5, 8, 3, 10, 11, 6, 12, 13].each{|x| print
"enNOSPicAMreil kdrtf DeleteThis @gma.com"[(2*x)..(2*x+1)]}'
--
gentoo-user DeleteThis @gentoo.org mailing list
Back to top
Login to vote
Albert Hopkins

External


Since: Sep 21, 2005
Posts: 87



(Msg. 3) Posted: Mon Jan 29, 2007 1:40 pm
Post subject: Re: [gentoo-user] broken python howto [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

On Mon, 2007-01-29 at 20:06 +0200, Daniel Iliev wrote:
> Hi, everyone
>
> I'm facing the following problem:
>
> emerge "<whatever>"
>
>
> !!! Failed to complete python imports. These are internal modules for
> !!! python and failure here indicates that you have a problem with
> python
> !!! itself and thus portage is not able to continue processing.
>
> !!! You might consider starting python with verbose flags to see what
> has
> !!! gone wrong. Here is the information we got for this exception:
> No module named time
>
> Traceback (most recent call last):
> File "/usr/bin/emerge", line 28, in ?
> import portage
> File "/usr/lib/portage/pym/portage.py", line 20, in ?
> import copy, errno, os, re, shutil, string, time, types
> ImportError: No module named time
>
>
> How could I fix this? I found an official "howto" on recovering broken
> portage but the problem here is with python, isn't it? I have no
> experience with python other than using the python based tools of
> Gentoo
> (such as portage itself) therefore I'm helpless.
>
> Any ideas and/or suggestions will be much appreciated.

First question: what did you do?

# python
Python 2.4.4 (#1, Jan 2 2007, 19:55:21)
[GCC 4.1.1 (Gentoo 4.1.1-r3)] on linux2
Type "help", "copyright", "credits" or "license" for more
information.
>>> import time
>>> time.__file__
'/usr/lib/python2.4/lib-dynload/time.so'

Make sure that file exists and that the files that it links to exist.


--
gentoo-user.RemoveThis@gentoo.org mailing list
Back to top
Login to vote
Daniel Iliev

External


Since: Jul 05, 2006
Posts: 155



(Msg. 4) Posted: Mon Jan 29, 2007 2:50 pm
Post subject: Re: [gentoo-user] broken python howto [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

Kent Fredric wrote:
>
> The Last time i had one of those problems I cracked out an old binpkg
> I had lying around ( a lesson I learned a while back on freebsd when i
> had make,gcc and tar ALL break due to a common lib dying : moral of
> the story: always have static copies of tar/make/bz2 in binpkgs Neutral )
>
> I know its a nasty solution, but in times of desperation, a manual
> untarring of a binpkg into the right place will save you much anguish.
>
> I've not read of any other way to save that problem, other than
> hacking up a recent "snapshot" and copying the files into place.
>
> I'm sure theres a better answer than this, but I've yet to see it.


Thanks for the reply.

Yes, I keep this solutions as my last resort before full reinstall. I
just didn't want to take rash course of action before asking for advice
here.


--
Best regards,
Daniel


--
gentoo-user RemoveThis @gentoo.org mailing list
Back to top
Login to vote
Daniel Iliev

External


Since: Jul 05, 2006
Posts: 155



(Msg. 5) Posted: Mon Jan 29, 2007 3:10 pm
Post subject: Re: [gentoo-user] broken python howto [SOLVED] [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

Albert Hopkins wrote:
>
> First question: what did you do?
>
> # python
> Python 2.4.4 (#1, Jan 2 2007, 19:55:21)
> [GCC 4.1.1 (Gentoo 4.1.1-r3)] on linux2
> Type "help", "copyright", "credits" or "license" for more
> information.
> >>> import time
> >>> time.__file__
> '/usr/lib/python2.4/lib-dynload/time.so'
>
> Make sure that file exists and that the files that it links to exist.
>
>
>


First of all thank you very much! Smile)

Actually I don't know what happened yet. I have another system with the
same hardware, the same software configuration and almost the same world
file. The first thing I checked after your message was:

"ls -la /usr/lib/python2.4/lib-dynload/"

on the broken system and it showed an empty dir. Next I made the same
check on the healthy system and it was full of files including
"time.so". So, I transfered the whole directory to the broken system and
now "emerge" works fine (at least at first glance).

Thanks again!



[OT]
Strange.
I did

"qfile time.so"

on the healthy system and it gave no results. Also I did

"qlist python | grep time.so"

and it gave no results either. I suspect something went wrong on both
systems but I'm not sure what and how to fix it.

Even more strange.
Before sending my question here I tried

"quickpkg python portage"

and extracted the contents of the archives in the root ("/") dir of the
broken system. This action didn't help. After your answer I checked the
contents of the packages made by "quickpkg":

localhost / # tar jtf python-2.4.3-r4.tbz2 | grep lib-dyn
../usr/lib/python2.4/lib-dynload/

bzip2: (stdin): trailing garbage after EOF ignored

localhost / # tar jtf portage-2.1.1-r2.tbz2 | grep lib-dyn

bzip2: (stdin): trailing garbage after EOF ignored


It appears that python only creates this directory, but I can't figure
out which packages put files in it.

Is it normal?

--
Best regards,
Daniel


--
gentoo-user DeleteThis @gentoo.org mailing list
Back to top
Login to vote
Albert Hopkins

External


Since: Sep 21, 2005
Posts: 87



(Msg. 6) Posted: Mon Jan 29, 2007 4:40 pm
Post subject: Re: [gentoo-user] broken python howto [SOLVED] [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

You didn't do something crazy like put "-static" in your CFLAGS did you?

--
gentoo-user.RemoveThis@gentoo.org mailing list
Back to top
Login to vote
Display posts from previous:   
Related Topics:
[gentoo-user] python emerge appears to have broken my pyth.. - Hey all. I updated my home server today, and while looking through the resultant emails from portage, I find this..

[gentoo-user] emerge dev-python/python-fchksum-1.7.1 fails.. - -----BEGIN PGP SIGNED MESSAGE----- Hash: RIPEMD160 Dear list, emerge of dev-python/python-fchksum-1.7.1 fails (for...

[gentoo-user] python problem - Hi! I have a problem. My python applications doesn't work. I tried gentoo-stats and porthole, both installed..

[gentoo-user] fork in python - I'm having a problem in python doing a fork, getting data, then returning it. I'm using a pipe to send the data back,..

[gentoo-user] Python-Updater - Hi I upgraded to version 2.3.4-r1. At the end of emerge A message tells that I need to run /usr/sbin/python-updater I...

[gentoo-user] It's baaaaack...! (Python 2.4.1) - Hi all, I seem to have painted myself into a corner, and hope that someone can see a way out before I repeat my..
       Soft32 Home -> Linux -> User All times are: Pacific Time (US & Canada) (change)
Page 1 of 1

 
You can post new topics in this forum
You can 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

Categories:
 Windows
  Linux
 Mac
 PDA


[ Contact us | Terms of Service/Privacy Policy ]