LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 03-17-2014, 09:47 PM   #1
browny_amiga
Member
 
Registered: Dec 2001
Location: /mnt/UNV/Mlkway/Earth/USA/California/Silicon Valley
Distribution: Kubuntu, Debian Buster Stable, Windoze 7
Posts: 684

Rep: Reputation: 56
Having Python 2.7 and 3.x installed at the same time?


Hi,

I have finally run into the problem of having tools that require python 3.x on a system that uses python 2.7 standard (Debian Wheezy)

What are the implications of having both installed at the same time?
The tool that I am using is only installing its modules in 2.7, but not in 3.x, how can I fix this without making 3.x default? I would assume that this would break pretty much all the python scripts that are running on the system by default.
 
Old 03-18-2014, 12:47 AM   #2
John VV
LQ Muse
 
Registered: Aug 2005
Location: A2 area Mi.
Posts: 17,623

Rep: Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651
Debian is not as uppity as RHEL about python
BUT
you really should KEEP the system default AS THE SYSTEM DEFAULT

then for programs that need settings set for the side by side install of 3.3
use a script to set those in a launcher script

an example on my suse 12 install
i have 3 versions installed
one is a OLD 2.6 for a few old Blender 2.49 plugins i NEED
blender 2.69 uses 3.3 and suse uses 2.7.3

see the mess

well i have to set "PYTHONHOME=" to the OLD 2.6 for the old blender
so it is set in a script used to launch the old version of blender

and reset it back on close
because that setting is in conflict with another python set of tools
"FWTools-linux-x86_64-3.0.6f-usgs"
and that sets all kinds of python variables


but you will want to KEEP the system default as the system default

just change things as needed
 
Old 03-18-2014, 03:26 PM   #3
sundialsvcs
LQ Guru
 
Registered: Feb 2004
Location: SE Tennessee, USA
Distribution: Gentoo, LFS
Posts: 10,642
Blog Entries: 4

Rep: Reputation: 3933Reputation: 3933Reputation: 3933Reputation: 3933Reputation: 3933Reputation: 3933Reputation: 3933Reputation: 3933Reputation: 3933Reputation: 3933Reputation: 3933
Also, in any mixed-versions environment, be careful to keep the libraries of the two versions altogether separate. Most languages have an installed set of libraries that you can reference in your programs, and there can be a lot of C/C++ "voodoo" associated with these things that can be highly dependent upon the APIs exposed by an interpreter. (All of this voodoo is taken care of by the package install process.) So, you want to scrupulously keep these things separate. One library for one version; another library for the other; each installed and maintained using the interpreter version that will be running against it.

The admonition to "not change the system default" is quite crucial since the software that's used to maintain the operating system might conceivably stop working correctly. If you muck-up the package management software, you can find yourself "hoisted on your own petard" (i.e. screwed) rather quickly.

Last edited by sundialsvcs; 03-18-2014 at 03:28 PM.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Why do we need Python installed if we use Python apps in Linux? Mr. Alex Linux - Software 3 07-29-2011 06:05 AM
[SOLVED] Python Installed; bash command: python base.py. gets syntax error in base.py cre84j Linux - Software 4 01-23-2011 04:46 PM
Software shows up as installed and not installed at same time in zypper. LazerPhreak Linux - Software 2 12-13-2009 01:01 AM
How can I uninstall a python package installed with python setup.py install? milomak Linux - Software 1 11-16-2009 09:22 PM
Why dbus-python is installed, but it is flagged as not installed? redhatwannabe Linux - Enterprise 2 09-26-2009 03:08 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 10:45 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration