Hi,
centos 6.8 comes with python 2.6. But I want to use python 2.7 to build gstreamer sdk. I have built python 2.7 and installed it into my custom directory. How to set centos to use python 2.7 by default instead of python 2.6?
Thanks!
Regards
Andrew
On Mon, 4 Jul 2016, qw wrote:
centos 6.8 comes with python 2.6. But I want to use python 2.7 to build gstreamer sdk. I have built python 2.7 and installed it into my custom directory. How to set centos to use python 2.7 by default instead of python 2.6?
Don't. If you try to swap out the standard python with another one, expect almost everything you hold dear to break.
jh
Hi,
Thanks for your reply.
centos 6.8 comes with python 2.6. But I want to use python 2.7 to build gstreamer sdk. I have built python 2.7 and installed it into my custom directory. How to set centos to use python 2.7 by default instead of python 2.6?
Don't. If you try to swap out the standard python with another one, expect almost everything you hold dear to break.
I want to build gstreamer sdk on centos by using cerbero, which is of python program and demands python 2.7. How to make centos 6.8 choose python 2.7 by default instead of python 2.6, so as to build gstreamer sdk?
Thanks!
Regards
Andrew
At 2016-07-04 22:25:20, "John Hodrien" J.H.Hodrien@leeds.ac.uk wrote:
On Mon, 4 Jul 2016, qw wrote:
centos 6.8 comes with python 2.6. But I want to use python 2.7 to build gstreamer sdk. I have built python 2.7 and installed it into my custom directory. How to set centos to use python 2.7 by default instead of python 2.6?
Don't. If you try to swap out the standard python with another one, expect almost everything you hold dear to break.
jh _______________________________________________ CentOS mailing list CentOS@centos.org https://lists.centos.org/mailman/listinfo/centos
On Mon, 4 Jul 2016, qw wrote:
Don't. If you try to swap out the standard python with another one, expect almost everything you hold dear to break.
I want to build gstreamer sdk on centos by using cerbero, which is of python program and demands python 2.7. How to make centos 6.8 choose python 2.7 by default instead of python 2.6, so as to build gstreamer sdk?
Personally I'd think of this in a much more SCL style than thinking about changing the default python.
https://www.softwarecollections.org
You don't need to make your whole system use a new python, just the new bits you're building that need it.
jh
On Mon, 4 Jul 2016, John Hodrien wrote:
On Mon, 4 Jul 2016, qw wrote:
centos 6.8 comes with python 2.6. But I want to use python 2.7 to build gstreamer sdk. I have built python 2.7 and installed it into my custom directory. How to set centos to use python 2.7 by default instead of python 2.6?
Don't. If you try to swap out the standard python with another one, expect almost everything you hold dear to break.
John Hodrien's reply was done well.
Such replies are so rarely done well that I thought it worth noting. Often it's just "Don't", "Don't do that" or "Don't do that, it's stupid".
On Mon, Jul 04, 2016 at 11:26:25AM -0500, Michael Hennebry wrote:
On Mon, 4 Jul 2016, John Hodrien wrote:
On Mon, 4 Jul 2016, qw wrote:
centos 6.8 comes with python 2.6. But I want to use python 2.7 to build gstreamer sdk. I have built python 2.7 and installed it into my custom directory. How to set centos to use python 2.7 by default instead of python 2.6?
Don't. If you try to swap out the standard python with another one, expect almost everything you hold dear to break.
Not a python programmer, so forgive my ignorance.
On my Fedora system python 2.7 and 3.? peacefully co-exist. And I thought 2.6 and 2.7 did as well.
The python manpage lists a couple of environment variables related to version.
Could you have both installed and when building or testing set your environment to the desired version?
jon
centos 6.8 comes with python 2.6. But I want to use python 2.7 to build gstreamer sdk. I have built python 2.7 and installed it into my custom directory. How to set centos to use python 2.7 by default instead of python 2.6?
You could have used python virtualenv.
I'm not a python dev and only have vague memories and some short notes on the subject. FYI I have all my python 2.7 packages installed from PUIAS_6_computational repo which had a better selection of python packages at the time:
python27-2.7.8 python27-virtualenv-1.10.1 ...
When you have python27-virtualenv package you can create and activate a virtual environment with the following commands:
$ mkdir ~/opt/python27 $ virtualenv-2.7 ~/opt/python27 $ . ~/opt/python27/bin/activate
(python27) prefix will be added to the shell prompt and all subsequent python calls will use version from the virtual environment.
(python27) $ python --version Python 2.7.8
...
(python27) $ deactivate
HTH