[Tutor] Moved Python installation. Need advice rebuilding all *.pyc

Adam adam.jtm30 at gmail.com
Mon Jul 3 20:45:58 CEST 2006


On 03/07/06, Andreas <a.m.i.x at web.de> wrote:
>
> Hi,
>
> I thought, this would be more easy. I wonder why the PYTHONPATH is not
> being considered here, but instead I find the path to modules being
> hardcoded  in the *.pyc file.
>
> I have about 50 3rd party modules installed and I moved my Python
> installation from C:\Python24 to another partition (E:\Python24).
>
> Now, what can I say ? It seems I need to rebuild all, but this would be
> an immense amount of work (finding all the install-archives on the net,
> etc.)
>
> Is there any simple way ? Maybe a script, that iterates through
> "Lib/site-packages" ?
>
> Thanks a lot!


Erm trying to remember exactly how to do this in windows but if you do the
equivalent of an rm -r E:\Python24\site-packages\*.pyc ie remove all the
*.pyc files they will be rebuilt as and when you next import those modules.
HTH.
Adam
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.python.org/pipermail/tutor/attachments/20060703/2980d705/attachment.html 


More information about the Tutor mailing list