Skip to content

Instantly share code, notes, and snippets.

@ccaspers
Last active August 29, 2015 14:01
Show Gist options
  • Save ccaspers/7e26f32a9e5700d49b38 to your computer and use it in GitHub Desktop.
Save ccaspers/7e26f32a9e5700d49b38 to your computer and use it in GitHub Desktop.
python with pip, virtualenv and nodeenv without sudo
#!/bin/bash
# .local/bin zu PATH hinzufügen, automatisch bei öffnen des Terminals
# an ~/.bashrc anhängen
echo "export PATH=\$PATH:~/.local/bin" >> ~/.bashrc
#bashrc neu laden
source ~/.bashrc
# setuptools laden und für user installieren
wget https://bootstrap.pypa.io/ez_setup.py -O - | python - --user
#bashrc neu laden
source ~/.bashrc
# pip und virtualenv installieren
easy_install pip
pip install --user virtualenv
pip install --user virtualenvwrapper
# virtualenv zu PATH hinzufügen und in ~/.bashrc eintragen
mkdir -p $HOME/.virtualenvs
echo "export WORKON_HOME=~/.virtualenvs" >> ~/.bashrc
echo "source ~/.local/bin/virtualenvwrapper.sh" >> ~/.bashrc
#bashrc neu laden
source ~/.bashrc
# Virtualenv für Node erzeugen
mkvirtualenv node
# Virtualenv aktivieren
workon node
# Nodeenv installieren
pip install --user nodeenv
# node installieren (kompiliert aktuelle version aus quellen)
nodeenv -p # optional --prebuilt um kompilieren zu sparen
# virtualenve deaktivieren und aktivieren
deactivate
workon node
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment