Recurse Center: week 9, day 1

Didn’t get out the door on time, and couldn’t make up the time on the funky loaner bike. (I am SO looking forward to getting my bike back today.) Missed check-ins, but didn’t miss resident Ranjit‘s “let’s play with words and see what mischief we can make” workshop shortly thereafter.

Unfortunately, I was distracted by trying to get IPython Notebooks up and running again on my computer. (They worked last week! In a virtual environment. For reasons I don’t entirely understand, it was important to me to get them running ~*~ globally ~*~, so off I went.)

DOWN THE RABBIT HOLE:

Doing the same thing got me different results
(if this is tl;dr to you, just skip to the horizontal line):
Googled a bit. Ended up running pip uninstall ipython (I wanted to reinstall it with alllll the goods, including Notebook, so the internet said uninstall, then reinstall with pip install "ipython[all]"): lots of successful lines. So many. Then

Proceed (y/n)? y

Yeah! y. Let’s do this. Except uh oh, EXCEPTION TRACEBACK TIME:

OSError: [Errno 13] Permission denied: '/System/Library/Frameworks/Python.framework/Versions/2.7

Googling wasn’t terribly helpful. So I ran it again, because sometimes I just do this:

IOError: [Errno 2] No such file or directory: '/Library/Python/2.7/site-packages/ipython-3.2.1.dist-info/RECORD'

Welp. A different error! So I tried just, you know, installing again, on the off chance that things had been Successful Enough:

? pip install "ipython[all]"

IOError: [Errno 2] No such file or directory: '/Library/Python/2.7/site-packages/ipython-3.2.1.dist-info/METADATA'

Nope. Sudo pip uninstall?

The directory '/Users/liene/Library/Caches/pip/http' or its parent directory is not owned by the current user and the cache has been disabled. Please check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag." (-H cannot help you here, it turns out.)

What if I chown that? Nope.  How about installing again? Same thing, but with a different intro:

? pip install "ipython[all]"

Requirement already satisfied (use --upgrade to upgrade): ipython[all] in /Library/Python/2.7/site-packages

Exception: (blah blah blah…then…)

IOError: [Errno 2] No such file or directory: '/Library/Python/2.7/site-packages/ipython-3.2.1.dist-info/METADATA'

Alright, I’ll upgrade in a new terminal window, just in case:

? pip --upgrade "ipython[all]"

Usage:   

  pip <command> [options]

no such option: --upgrade

ಠ_ಠ

But apparently --upgrade is a flag on install. Fixable!

? pip install --upgrade "ipython[all]"

Collecting ipython[all]

[hella install messages]

NOW we’re in business. Progress bars fill in the beautiful blue that I have selected with a freakin’ ANSI escape code. Angels sing. And then another IOError: [Errno 13] Permission denied:, so I sudo chown -R the offending directory, and run pip install --upgrade "ipython[all]" again.

Another Errno13, but on a different file. Another day, another chown. Pip install blah blah again. And we’re back to Errno 2 again:

IOError: [Errno 2] No such file or directory: '/Library/Python/2.7/site-packages/ipython-3.2.1.dist-info/RECORD'

But it’s back to the RECORD file this time! (In a moment of unadulterated hope, I tested whether this was a meaningless error, and tried to fire up an IPython Notebook. NOPE. ImportError: No module named IPython. Definitely no good.)

pip uninstall got me the SAME “nothing named RECORD in this file.” In a moment of frustration and curiosity, I cd‘d to the directory in question, and just, like

? touch RECORD

I still got THIS:

? pip uninstall "ipython[all]"

Can't uninstall 'ipython'. No files were found to uninstall.

(Which, what? I disagree! There are definitely files, and you are having Computer Feelings about them.) But when I did THIS

pip install --upgrade "ipython[all]"

I got no errors, ending in this semi-cryptic message:

Installing collected packages: ipython

  Found existing installation: ipython 3.2.1

    Can't uninstall 'ipython'. No files were found to uninstall.

Successfully installed ipython-4.0.0

Which reads like “it’s already here, but there aren’t any files so it’s not here, and also I made it be here now.” And now I can open Notebooks no problem.

\o/

…I’m suspicious, but so far, so good. Although I also learned that which -a python gives me three results, two of which are identical.  :/


What else? A really good nap. A later-than-anticipated ready-to-go bike. A good discussion about similarities between parallel parking and regexes (they’re both puzzles!). Trying to figure out productive havoc to wreak with Linz’s persnickety external HD, made a little trickier by the fact that it’s not here today.

Also dove into the Udacity Intro to Relational Databases course (I think that link will work). It’s self-paced, which is EXACTLY what I keep hoping to stumble into. No way am I paying $200/month for the fancier version, no matter how awesome their “nanodegree” is, but the thing that’s been tripping me up lately with Coursera (etc.) courses is that they start on a particular date and go at a particular speed.

I have the time to go fast right now, if I’m interested, and I want to take advantage of that. So here we are! May go back to the Khan Academy one at some point, but this one was like, “yo do you know Python? We could do things with SQL and Python” and that is EXACTLY what I have been wanting to learn lately. Yay!

Leave a Reply

Your email address will not be published. Required fields are marked *