Reputation: 16194
so i installed pythonbrew on my ubuntuo 11.04 the other day - yesterday, actually - and now i cannot "find" it. Where before i would switch to 2.7.2, now all my requests for pythonbrew end in errors -
pythonbrew: command not found
What did i do wrong, and where is my pythonbrew?
which pythonbrew
doesn't return anything... was i meant to make pythonbrew some sort of startup thing?
ps if you haven't guessed already, I am not very familiar with unixy things, sorry if this is an obvi question.
UPDATE i installed pythonbrew as per this SO item: Python 2.7 on Ubuntu
UPDATE2 ok so i reinstalled pythonbrew as per that so link (ie i ran curl -kL http://github.com/utahta/pythonbrew/raw/master/pythonbrew-install | bash from my / directory)
that went and told me it had installed pythonbrew to the /home/{loginname}/.pythonbrew directory
so i went there and then i ran the other line in that so link (i have nfi what this line does, but run it!) . $HOME/.pythonbrew/etc/bashrc
ok, and now pythonbrew is back and running. even better, virtualenv, which i'd installed via pip after installing pythonbrew is also back. i don't know what is going on, but apparently every time i log in i need to
go to /home/{loginname}/.pythonbrew directory
run . $HOME/.pythonbrew/etc/bashrc
any ideas if ubuntu can do the above two steps on startup/login?
Upvotes: 1
Views: 1035
Reputation: 550
If you add
[[ -s $HOME/.pythonbrew/etc/bashrc ]] && source $HOME/.pythonbrew/etc/bashrc
to the end of the .bashrc file in your /home/{loginname} directory, Linux will automatically source pythonbrew's bashrc (assuming your permissions are all correct).
After adding the new line to your .bashrc either run
source /home/{loginname}/.bashrc
or fire up a new terminal
Upvotes: 3