[Eric] screwed up my python install

detlev detlev at die-offenbachs.de
Tue Jan 19 19:40:46 GMT 2010


Hi,

really old versions of eric created/patched sitecustomize.py. However, this 
has been replaced by some other mechanism using an eric4.pth file.

eric4 never ever deleted setdefaultencoding. It actually saved a reference to 
this method because this method gets deleted from sys by site.py once it was 
imported (note that site.py gets imported automatically by Python). That means 
if you import it once more, you might get errors. See the Python docu for more 
details.

Detlev

On Dienstag, 19. Januar 2010, Ken Dere wrote:
> trying to solve one problem, I created a bunch of others.  I have mostly
> recovered except when eric is installed.
> 
> I get the error:
> 
> import site # precompiled from
> /usr/lib64/python2.6/site.pyc
> 
> 'import site' failed;
> traceback:
> 
> Traceback (most recent call
> last):
> 
>   File "/usr/lib64/python2.6/site-packages/site.py", line 73, in
> <module>
> 
> __boot()
> 
>   File "/usr/lib64/python2.6/site-packages/site.py", line 48, in
> __boot
> 
> addsitedir(item)
> 
>   File "/usr/lib64/python2.6/site.py", line 185, in
> addsitedir
> 
>     addpackage(sitedir, name,
> known_paths)
> 
>   File "/usr/lib64/python2.6/site.py", line 155, in
> addpackage
> 
>     exec
> line
> 
>   File "<string>", line 1, in
> <module>
> 
> AttributeError: 'module' object has no attribute
> 'setdefaultencoding'
> 
> 
> it looks like when python is started, it tries to import everything
> twice.  when eric is imported the first time, it deletes the method
> 'setdefaultencoding' so that on the 2nd go around, it is missing.
> 
> any idea what I can do to fix this?
> 
> thanks,
> 
> Ken Dere
> 


-- 
Detlev Offenbach
detlev at die-offenbachs.de


More information about the Eric mailing list