Skip to content

Instantly share code, notes, and snippets.

@goldsmith
Last active December 25, 2024 20:56

Revisions

  1. goldsmith revised this gist Jan 31, 2014. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion python_mavericks_guide.sh
    Original file line number Diff line number Diff line change
    @@ -31,7 +31,7 @@ $ python <myproject.py>
    $ cd /System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/setuptools/command
    $ python easy_install.py virtualenv

    Reinstall Xcode Command Line Tools
    # Reinstall Xcode Command Line Tools
    ##################################

    # Yes, for some reason Mavericks uninstalls command line tools...
  2. goldsmith revised this gist Oct 26, 2013. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion python_mavericks_guide.sh
    Original file line number Diff line number Diff line change
    @@ -28,7 +28,7 @@ $ python <myproject.py>
    # Reinstall Virtualenv
    ######################

    $ cd /System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/setuptools/comman
    $ cd /System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/setuptools/command
    $ python easy_install.py virtualenv

    Reinstall Xcode Command Line Tools
  3. goldsmith revised this gist Oct 25, 2013. 1 changed file with 10 additions and 10 deletions.
    20 changes: 10 additions & 10 deletions python_mavericks_guide.sh
    Original file line number Diff line number Diff line change
    @@ -2,20 +2,20 @@
    # This will vary greatly depending on system set up, so read the instructions carefully

    # Back up Virtulenvs
    ##################
    ####################

    # Very important!
    # For each virtualenv you have, run "pip freeze > requirements.txt" while in the activated virtualenv
    # in order to prevent loss of dependencies during the upgrade.

    # Install Mavericks
    #################
    ###################

    # Go to the App Store and install Mavericks
    # Takes about 15 - 20 mins including set up

    # Test Configuration
    ##################
    ####################

    # See if anything broke during the upgrade - I obviously had errors here.

    @@ -26,21 +26,21 @@ $ python <myproject.py>
    # If everything works, you're good! Otherwise, continue...

    # Reinstall Virtualenv
    ####################
    ######################

    $ cd /System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/setuptools/comman
    $ python easy_install.py virtualenv

    Reinstall Xcode Command Line Tools
    #################################
    ##################################

    # Yes, for some reason Mavericks uninstalls command line tools...
    # Make sure you get the latest version (5.0.1)

    $ xcode-select --install

    # Repair Homebrew
    ###############
    #################

    # If you don't already have Homebrew, I highly recommend that you install it now (http://brew.sh/)
    # It will make fixing Python much easier if you need to relink it
    @@ -50,7 +50,7 @@ $ brew upgrade
    $ brew doctor

    # Reinstall Python (if necessary)
    ###############################
    #################################

    # Try python from the command line. If it works, congratulations!
    # Depending on your system set up, you may need to reinstall using Homebrew.
    @@ -65,13 +65,13 @@ $ brew unlink python3
    $ brew link --overwrite python3

    # Reinstall virtualenv{,wrapper}
    ##############################
    ################################

    $ sudo pip install virtualenv
    $ sudo pip install virtualenvwrapper

    # Reinstall requirements
    ######################
    ########################

    # You might need to reinstall pip requirements (usually not, but if you have any issues, do this):

    @@ -80,7 +80,7 @@ $ mkvirtualenv <project>
    $ pip install -r requirements.txt # you backed them up didn't you?

    # Finish
    ######
    ########

    # I hope this guide was helpful!
    # Please fork if you have any suggestions, or shoot me an email at [email protected].
  4. goldsmith revised this gist Oct 25, 2013. 1 changed file with 26 additions and 24 deletions.
    50 changes: 26 additions & 24 deletions python_mavericks_guide.sh
    Original file line number Diff line number Diff line change
    @@ -1,31 +1,31 @@
    # A guide to prevent pain and suffering while upgrading to OS X Mavericks
    # This will vary greatly depending on system set up, so read the instructions carefully

    Back up Virtulenvs
    # Back up Virtulenvs
    ##################

    Very important!
    For each virtualenv you have, run "pip freeze > requirements.txt" while in the activated virtualenv
    in order to prevent loss of dependencies during the upgrade.
    # Very important!
    # For each virtualenv you have, run "pip freeze > requirements.txt" while in the activated virtualenv
    # in order to prevent loss of dependencies during the upgrade.

    Install Mavericks
    # Install Mavericks
    #################

    Go to the App Store and install Mavericks
    Takes about 15 - 20 mins including set up
    # Go to the App Store and install Mavericks
    # Takes about 15 - 20 mins including set up

    Test Configuration
    # Test Configuration
    ##################

    See if anything broke during the upgrade - I obviously had errors here.
    # See if anything broke during the upgrade - I obviously had errors here.

    $ cd project/using/virtualenv
    $ workon <myproject>
    $ python <myproject.py>

    If everything works, you're good! Otherwise, continue...
    # If everything works, you're good! Otherwise, continue...

    Reinstall Virtualenv
    # Reinstall Virtualenv
    ####################

    $ cd /System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/setuptools/comman
    @@ -34,51 +34,53 @@ $ python easy_install.py virtualenv
    Reinstall Xcode Command Line Tools
    #################################

    Yes, for some reason Mavericks uninstalls command line tools...
    Make sure you get the latest version (5.0.1)
    # Yes, for some reason Mavericks uninstalls command line tools...
    # Make sure you get the latest version (5.0.1)

    $ xcode-select --install

    Repair Homebrew
    # Repair Homebrew
    ###############

    If you don't already have Homebrew, I highly recommend that you install it now (http://brew.sh/)
    It will make fixing Python much easier if you need to relink it
    # If you don't already have Homebrew, I highly recommend that you install it now (http://brew.sh/)
    # It will make fixing Python much easier if you need to relink it

    $ brew update
    $ brew upgrade
    $ brew doctor

    Reinstall Python (if necessary)
    # Reinstall Python (if necessary)
    ###############################

    Try python from the command line. If it works, congratulations! Depending on your system set up, you may need to reinstall using Homebrew.
    # Try python from the command line. If it works, congratulations!
    # Depending on your system set up, you may need to reinstall using Homebrew.

    $ brew install python # if you have an error, it's already installed and there's no issue
    $ brew unlink python
    $ brew link --overwrite python

    Then, if you want to include Python 3 as well (recommended):
    # Then, if you want to include Python 3 as well (recommended):
    $ brew install python3 # same deal here
    $ brew unlink python3
    $ brew link --overwrite python3

    Reinstall virtualenv{,wrapper}
    # Reinstall virtualenv{,wrapper}
    ##############################

    $ sudo pip install virtualenv
    $ sudo pip install virtualenvwrapper

    Reinstall requirements
    # Reinstall requirements
    ######################

    You might need to reinstall pip requirements (usually not, but if you have any issues, do this):
    # You might need to reinstall pip requirements (usually not, but if you have any issues, do this):

    $ cd path/to/project
    $ mkvirtualenv <project>
    $ pip install -r requirements.txt # you backed them up didn't you?

    Finish
    # Finish
    ######

    I hope this guide was helpful! Please fork if you have any suggestions, or shoot me an email at [email protected].
    # I hope this guide was helpful!
    # Please fork if you have any suggestions, or shoot me an email at [email protected].
  5. goldsmith renamed this gist Oct 25, 2013. 1 changed file with 0 additions and 0 deletions.
  6. goldsmith created this gist Oct 25, 2013.
    84 changes: 84 additions & 0 deletions OS X Mavericks Python Transition Guide
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,84 @@
    # A guide to prevent pain and suffering while upgrading to OS X Mavericks
    # This will vary greatly depending on system set up, so read the instructions carefully

    Back up Virtulenvs
    ##################

    Very important!
    For each virtualenv you have, run "pip freeze > requirements.txt" while in the activated virtualenv
    in order to prevent loss of dependencies during the upgrade.

    Install Mavericks
    #################

    Go to the App Store and install Mavericks
    Takes about 15 - 20 mins including set up

    Test Configuration
    ##################

    See if anything broke during the upgrade - I obviously had errors here.

    $ cd project/using/virtualenv
    $ workon <myproject>
    $ python <myproject.py>

    If everything works, you're good! Otherwise, continue...

    Reinstall Virtualenv
    ####################

    $ cd /System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/setuptools/comman
    $ python easy_install.py virtualenv

    Reinstall Xcode Command Line Tools
    #################################

    Yes, for some reason Mavericks uninstalls command line tools...
    Make sure you get the latest version (5.0.1)

    $ xcode-select --install

    Repair Homebrew
    ###############

    If you don't already have Homebrew, I highly recommend that you install it now (http://brew.sh/)
    It will make fixing Python much easier if you need to relink it

    $ brew update
    $ brew upgrade
    $ brew doctor

    Reinstall Python (if necessary)
    ###############################

    Try python from the command line. If it works, congratulations! Depending on your system set up, you may need to reinstall using Homebrew.

    $ brew install python # if you have an error, it's already installed and there's no issue
    $ brew unlink python
    $ brew link --overwrite python

    Then, if you want to include Python 3 as well (recommended):
    $ brew install python3 # same deal here
    $ brew unlink python3
    $ brew link --overwrite python3

    Reinstall virtualenv{,wrapper}
    ##############################

    $ sudo pip install virtualenv
    $ sudo pip install virtualenvwrapper

    Reinstall requirements
    ######################

    You might need to reinstall pip requirements (usually not, but if you have any issues, do this):

    $ cd path/to/project
    $ mkvirtualenv <project>
    $ pip install -r requirements.txt # you backed them up didn't you?

    Finish
    ######

    I hope this guide was helpful! Please fork if you have any suggestions, or shoot me an email at [email protected].