Skip to content

Instantly share code, notes, and snippets.

@paul-schwendenman
Last active December 21, 2015 11:59
Show Gist options
  • Save paul-schwendenman/6303074 to your computer and use it in GitHub Desktop.
Save paul-schwendenman/6303074 to your computer and use it in GitHub Desktop.
Install node in a virtualenv rather than in the system path
  1. Change directory to vitualenv:

    cd /path/to/virtualenv
    
  2. Download node:

    wget http://nodejs.org/dist/v0.10.17/node-v0.10.17.tar.gz
    
  3. Set prefix variable:

    export VPREFIX=$(pwd)
    
  4. Untar the archive:

    tar xfz node-v0.10.17.tar.gz
    
  5. Change to that new directory:

    cd node-v0.10.17.tar.gz
    
  6. Run configure:

    ./configure --prefix=$VPREFIX
    

    Note: you should see something about you virtualenv's python in the configure output

  7. Run make:

    make
    
  8. Install node:

    make install
    
  9. Verify the correct path:

    which node
    

    note: you have to have you virutalenv activated.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment