mkelley33
mkelley33

Reputation: 5601

How can I replace a Python 2.65 UCS-2 build with one built using UCS-4 without losing everything in my site-packages?

I downloaded the Python 2.6.5 source, built it for OS 10.6.4 64-bit, and installed numerous dependencies. I opened a big project our team has been working on recently, ran the unit tests, and one of the tests failed because I had installed Python built using UCS-2 (I didn't know this was the default of OS X!)

In a nutshell: I didn't supply flag --enable-unicode=ucs4 when building Python. (as I discovered was necessary: http://copia.posterous.com/confusion-over-python-storage-form-for-unicod)

Now I want to correct this without losing everything I put in site-packages.

Is this possible? If so, how?

Thank you! Michaux

Upvotes: 0

Views: 732

Answers (1)

Alex Martelli
Alex Martelli

Reputation: 882681

You can save and restore /Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages (e.g. as a .tar.bz2), but the restored .sos will not work properly if any of their entry points deal with Python Unicode objects -- so, those packages (containing any such .so files) you'll have to rebuild/reinstall once your new Python version is working! Hopefully that's a far cry from "everything" you've put in site-packages (fingers crossed).

Upvotes: 1

Related Questions