Hello there,
What would be considered the correct/best way to run a current release
of python locally vs. the installed system version? On openSUSE 12.3,
the repos currently have 2.7.3 and 3.3.0. As far as I know, I’m not
really hitting any limitations with the existing versions - my skills
just aren’t that far along - so its not a burning ‘need’ but I’m still
curious/interested in the topic.
Also… in some places in the 'Net I see references to installing
everything ‘locally’ via pip, etc. in virtualenvs and not touching the
system installed version of python… yet most linux distros seem to
have many/most such packages available in their package repos, which
seems like it’d be easier to install via the package manager and let it
keep things updated. Could someone touch on what they feel the pros and
cons would be either way?
Thanks,
Monte
You can build a newer version of python from source using the --prefix option so that it installs where you wish, leaving system python untouched.
Technovelty - Python and --prefix
As for my thoughts on pros and cons of installing packages via pip vs system provided packages: It used to be that distributions provided very few perl, python and other modules. Perl used to use cpan almost exclusively, then came ActivePerl, etc. Over time modules became increasingly available as system packages. Generally, I like system packages as they are easier to update / maintain. When you use cpan, pip, gem, etc. you are giving control over to that tool. Sometimes uninstalling such packages is a real pain - they generally suck at uninstalling. And usually the modules that pip, gem, cpan, etc. install are all unsigned - whereas (if so created) .rpm packages are signed by the creator and you can import the gpg key when adding the repo. Of course, sometimes I do use cpan, pip, gem, etc. to install something if I want a newer version - and often more obscure modules are not available as packages.
Thanks for the input! One thing I’m finding is that there seem to be more/newer packages for python than python3 (python3 has pylint 0.25 vs. 0.28, no virtualenv package, etc.) on openSUSE, beyond the normal ‘that-module-hasn’t-been-ported-to-python3-yet’ bit. Most of which are easily addressed using pip or easy_install… I hadn’t considered the signing aspect of things, as that hasn’t been a concern for me (yet). I know I’ve mentioned virtualenv a few times… but the more I think about it, the more I think thats just a wee bit more than I need (at this point) - I’m not working on anything that sophisticated.