I want to replace the default CPython (Python) with pypy (1.8).
Will this cause a problem? (I ask because python seems to be an important component in Ubuntu.).
I've built pypy and have installed it on a virtual machine of Ubuntu (I'm testing this idea out before I do it to my actual machine. So while we can try thing my intention is to accomplish this in "real life" as it were.).
Pypy is usable from the anywhere in the system via pypy
as opposed to python
.
pypy my_python_script.py
It seems to be installed fine and seems usable.
Now, I want to make it so that any time I want to use python, it'll assume I mean pypy.
For example, I installed Django in to pypy but when I try to run django-admin.py
it has no idea what I'm talking about. I imagine I could accomplish this part by adding wherever django-admin.py is to my $HOME
variable.
That, for now, is aside the point.
So, my question is how do I replace standard python with my own preferred version -- in this case, pypy.
I'm revising my question based on the answer thus far -- that replacing CPython in whole is not a good idea as it could foobar the system.
I've read a bit on virtualenv -- looks good but it doesn't seem to answer my question (or, I'm missing how).
I want to use pypy for my work in python. Development work for things like, Django, Google App Engine and other such nonsense. (I realize there could be a compatibility issue, I'll address those with unit tests or some other means. Just know, it's beside the point at the moment.)
So, keeping this in mind, say I want to use pypy instead of python. And for ./django-admin.py
to work globally, it'd have to be installed with the system's python. How might I configure the system to support these "global" python scripts from either pypy or the main system python?