Showing posts with label macos. Show all posts
Showing posts with label macos. Show all posts

November 19, 2013

MacOS Migration: If I Have to Shave One More Yak ...

So I decided it was time to update my laptop, the current Macbook Air being three years old and having a tendency to forget that the screen is present. The triggering event was a minor spillage which stopped several crucial keys from working as the beer dried out (yes, I know ...).

Clearly the first thing to do was take the Air off the 'Net and back it up. Connecting the backup disk and starting a Time Machine backup saw it identify about 75,000 files of the 1,500,000 on y hard disk needed backing up. When the backup phase started it took about five minutes to get to "3k of 4.5GB backed up" and I realized I had a problem.

StackOverflow suggested I consider repairing the Time Machine disk. That's another hour I shall never see again, but at least Disk Utility gave the volume a clean bill of health, so I restarted the Time Machine backup and this time (hallelujah!) it ran. I then ran the Migration Assistant on the new (receiving) Mac and told it to restore my account, settings, applications - the whole caboodle. Since the Assistant kindly estimated this would take at least two hours and fifteen minutes I decided this would be an appropriate point at which to go for a couple of drinks with my buddy Kirby.

I found the Apple Migration Assistant to be quite friendly (disclaimer: I have always previously used manual migration procedures to switch computers and so cannot say whether Windows offers similar friendliness; if not, it should). When I returned about 90 minutes later I was delighted to find that the restore was complete (I hadn't waited around for Migration Assistant to upgrade its estimate), so I was able to log in to my newly-restored account on the updated Air.

My joy lasted as long as it took me to run a terminal session, when I saw the following delight:

Last login: Tue Nov 19 01:27:18 on tty??
Traceback (most recent call last):
  File "/usr/local/Cellar/python/2.7.4/Frameworks/Python.framework/Versions/2.7/lib/python2.7/runpy.py", line 162, in _run_module_as_main
    "__main__", fname, loader, pkg_name)
  File "/usr/local/Cellar/python/2.7.4/Frameworks/Python.framework/Versions/2.7/lib/python2.7/runpy.py", line 72, in _run_code
    exec code in run_globals
  File "/Library/Python/2.7/site-packages/virtualenvwrapper/hook_loader.py", line 16, in 
    from stevedore import ExtensionManager
  File "/Library/Python/2.7/site-packages/stevedore/__init__.py", line 3, in 
    from .extension import ExtensionManager
  File "/Library/Python/2.7/site-packages/stevedore/extension.py", line 4, in 
    import pkg_resources
ImportError: No module named pkg_resources
virtualenvwrapper.sh: There was a problem running the initialization hooks.

If Python could not import the module virtualenvwrapper.hook_loader,
check that virtualenv has been installed for
VIRTUALENVWRAPPER_PYTHON=/usr/local/bin/python and that PATH is
set properly.
AirHead:~ sholden$

Not exactly what you want to see when you log in, but at least indicating the the error was probably with my virtual environments. Fortunately it was quite easy to fix this daunting error message by doing a brew install python after uninstalling the previously installed version (thereby achieving an upgrade from 2.7.2 to 2.7.5). Since my account is set to prefer /usr/local/bin to /usr/bin it finds the updated python immediately. I then upgraded pip to the latest version and I appear to be good to go (though I am sure I shall find many other bumps in the road).

A very pleasant surprise was that the Mac knew about all my printers and was happy to try and use them for me. I won't know whether they work until I get back to the network to which they are connected, but if they do I will be both surprised and delighted. This is clearly superior technology where the user experience has been considered relatively carefully.

Unfortunately the user before me had already started using brew, so quite a lot of reowning was required to make my account the owner of essential locations before I could start to access the brew package again. Once I could start to think about doing that I discovered that brew update would not work because "The following untracked working tree files would be overwritten by merge". Thanks to this very helpful web page I updated by brew installation and then the update went ahead just fine. After which a brew upgrade decided that 35 packages needed updating (gulp!) and so I am currently waiting to see if the following packages upgrade without issues:
ack 2.10, atk 2.10.0, cairo 1.12.16, cmake 2.8.12.1, erlang R16B02, fontconfig 2.11.0, gdk-pixbuf 2.30.1, gettext 0.18.3.1, gfortran 4.8.2, git 1.8.4.3, glib 2.38.2, gmp 5.1.3, gtk+ 2.24.22, harfbuzz 0.9.24, icu4c 52.1, libmemcached 1.0.17, libxml2 2.9.1, mercurial 2.8, mplayer 1.1.1, ncdu 1.10, nmap 6.40, pango 1.36.1, pixman 0.32.2, postgresql 9.3.1, pv 1.4.6, pypy 2.2.0, python 2.7.6, python3 3.3.2, redis 2.6.16, sphinx 2.1.3, sqlite 3.8.1, xz 5.0.5, zeromq 3.2.4
I'll let you know how it goes! In the meantime, though my virtual environments still need some attention I am able to run Pythons 2 and 3 and the IPython Notebook. Kudos to Apple, this migration has left me much happier than I would have imagined.

March 1, 2011

Community or Fanbois?

Regular readers will know that I place a lot of stock in community. I started PyCon, the US Python community conference, which has taken off worldwide. In earlier incarnations I was chairman of the Sun UK User Group and Treasurer of DECUS UK. As chairman of the Python Software Foundation I spend a lot of time thinking about how to engender community spirit and encourage people to contribute to the Python language in any way they can. This is an ongoing battle, but I do think that the Board is showing signs of understanding how to involve people, and also that the Foundation relies on the involvement of third parties in order to achieve most of what supports its mission.

In my own life, I have recently decided to become (even) more involved in open source, hopefully to the extent that I can make a better living at it - the PSF chairmanship is an honorary position and takes time away from business matters. So I have moved to Portland (whose natives frequently refer to it by its PDX airport code), and recently hosted a reception to get PDX open source people together with elected representatives and business people with the intention of starting new conversations about how each can benefit the other. I am hoping that the move will allow me to work in a more sympathetic environment, and one in which the potential of open source is more clearly perceived.

So anyone who cares to look should be able to discern that I am at least fairly serious about Portland and its open source community, and working towards improving things for the open source community (on the theory that a rising tide lifts all boats). I have found in the past that it's generally possible to share plans with open source community members and have them respect the sensitive nature of the information you have shared with them. This is one of the things I like about working in the open source community: generally speaking (and with the occasional unavoidable exception) people are willing to respect your concerns, and are generally much more concerned about producing good software than scooping each other on news of features and the like.

The people I meet in the open source world are generally responsive to new ideas and quite willing to discuss them. Generally speaking people are both willing and able to discuss the work they are doing - after all, it i going to be published, so there is little point in secrecy. Contrast this, however, with the brouhaha that arose today about the latest version of Apple's OS X operating system. It seems that Apple shared a beta version with some developers, who have naughtily (and anonymously) disclosed what purports to be real information about what Apple rather grandiosely term "the world's most advanced operating system". To which  my reply is a snort of derision, since I think that Mac OS X is actually in some ways inferior to Windows.

It turns out that they really don't like it when engineers who are given access to a pre-release (in this case OS X Lion, the forthcoming 10.7 release) copy and then promptly spill the beans to all and sundry. But frankly these look like small beans indeed. It seems as though Apple has tweaked quite a bit, but hasn't introduced any fundamentally new features into the operating system.  It's all very well for Apple to delight in being different, but the radical differences between Apple's GUI and everyone else's just don't seem to actually make using the computer any easier, and leave me wondering whether Apple is really heading in the right direction.

Whatever else they may have going for them they certainly don't seem to have engendered a lot of loyalty in their fan base. Or maybe this was just a few bad apples (so to speak).,