Re: multiple versions of python
Thanks, Stanley! On 01/04/2015 10:32 AM, Stanley C. Kitching wrote: > > >> >> 1] Can I have multiple versions of python simultaneously? >> > > yes > > Using Debian Wheezy I have 3 python versions installed > > # ls -1 /usr/lib | grep python | grep -v lib > > python > python2.6 > python2.7 > python3 > python3.2 > > python is python2.7 > python3 is python3.2 > > === > >> 2] Is there a way to specify that one package >> use a non-default version of python ? >> > > yes > > Use the specific python version name > when starting your program > > pythonX.Y /path/to/zProgram.py > > For example, I have a small program > that only prints the current python version > that it has been started with > > $ python $p/amisc/version.py > > python version 2.7.3 > > $ python2.6 $p/amisc/version.py > > python version 2.6.8 > > $ python2.7 $p/amisc/version.py > > python version 2.7.3 > > $ python3 $p/amisc/version.py > > python version 3.2.3 > > $ python3.2 $p/amisc/version.py > > python version 3.2.3 > > > Using the name python is the same > as using the name python2.7 > > python2.7 is the default version > > Using the name python3 is the same > as using the name python3.2 > > === > >> 3] Is this a quick, straightforward install ? >> > > yes > > Use the Debian package manager > to install the different python versions > > # sudo apt-get install python > > # sudo apt-get install python3 > > If you start your python programs > using specific python version names > nothing else should be necessary > > -- hkp://keys.gnupg.net CA45 09B5 5351 7C11 A9D1 7286 0036 9E45 1595 8BC0 -- To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org Archive: https://lists.debian.org/54aaba4d.4000...@gmx.com
Re: multiple versions of python
> > 1] Can I have multiple versions of python simultaneously? > yes Using Debian Wheezy I have 3 python versions installed # ls -1 /usr/lib | grep python | grep -v lib python python2.6 python2.7 python3 python3.2 python is python2.7 python3 is python3.2 === > 2] Is there a way to specify that one package > use a non-default version of python ? > yes Use the specific python version name when starting your program pythonX.Y /path/to/zProgram.py For example, I have a small program that only prints the current python version that it has been started with $ python $p/amisc/version.py python version 2.7.3 $ python2.6 $p/amisc/version.py python version 2.6.8 $ python2.7 $p/amisc/version.py python version 2.7.3 $ python3 $p/amisc/version.py python version 3.2.3 $ python3.2 $p/amisc/version.py python version 3.2.3 Using the name python is the same as using the name python2.7 python2.7 is the default version Using the name python3 is the same as using the name python3.2 === > 3] Is this a quick, straightforward install ? > yes Use the Debian package manager to install the different python versions # sudo apt-get install python # sudo apt-get install python3 If you start your python programs using specific python version names nothing else should be necessary -- Stanley C. Kitching Human Being Phoenix, Arizona -- To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org Archive: https://lists.debian.org/m8bm3f$a3c$1...@dont-email.me
Re: multiple versions of python
On 12/29/2014 09:17 PM, Boruch Baum wrote: > Hello everyone, > > I'm preparing two bug reports, and in trying to sort one of them out, it > seems that it may be linked to an incompatibility of a script with > python2.7 (see bug #659831). So, in test that possibility, what I would > like to do is install some other version of python (I see 2.5 and 2.6 in > the repositories), in order to see whether the package works with > another version. > > My questions revolve around how time-consuming and worthwhile this > exercise will be: > > 1] Can I have multiple versions of python simultaneously? You should give a try to pew which gives more features than virtualenv : https://pypi.python.org/pypi/pew/ Best regards, -- “One original thought is worth a thousand mindless quotings.” “Le vrai n'est pas plus sûr que le probable.” Diogene Laerce signature.asc Description: OpenPGP digital signature
Re: multiple versions of python
On Wednesday, December 31, 2014 12:00:05 AM UTC+5:30, Boruch Baum wrote: > Thanks. Are you recommending virtualenv from experience having used it, > or from heresay? In general there is a spectrum for resources In decreasing order of weight 1. Buy a new machine 2. Use a VM 3. Use docker 4. Use virtualenv You may find 3 suitable: https://www.docker.com/ There are probably more points in the spectrum between 2 and 3 [chroot jails??] -- To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org Archive: https://lists.debian.org/cb1733f5-0a9c-4320-a086-7cc669821...@googlegroups.com
Re: multiple versions of python
Thanks. Are you recommending virtualenv from experience having used it, or from heresay? I would want to know what possible pitfalls and gotchas there might be. Specifically, the description for the package says that it creates "... virtual Python instances, each invokable with its own Python executable. Each instance can have different sets of modules...", but I'm not looking for running two instances with individual custom modules or libraries - I think I'm looking at having two ENTIRE python tool-chains (v2.7 & v2.6). So, I would be asking virtualenv, a python2.7 package itself, to be running an entire python2.6 instance. Would that be in the scope of solution you've suggested? On 12/29/2014 04:30 PM, Alex Mestiashvili wrote: > On 12/29/2014 09:17 PM, Boruch Baum wrote: >> Hello everyone, >> >> I'm preparing two bug reports, and in trying to sort one of them out, it >> seems that it may be linked to an incompatibility of a script with >> python2.7 (see bug #659831). So, in test that possibility, what I would >> like to do is install some other version of python (I see 2.5 and 2.6 in >> the repositories), in order to see whether the package works with >> another version. >> >> My questions revolve around how time-consuming and worthwhile this >> exercise will be: >> >> 1] Can I have multiple versions of python simultaneously? >> >> 2] Is there a way to specify that one package use a non-default version >> of python? (I don't want to set an old version of python as default, if >> that risks having other packages, depending on 2.7, break). >> >> 3] Is this a quick, straightforward install? Or is it going to be >> something like an emacs install, with all kinds of time-consuming, >> interminable local compilations and configurations? >> >> Please respond to me directly, and on list. Thanks. > > It sounds like you need virtualenv: https://pypi.python.org/pypi/virtualenv > > Regards, > Alex -- hkp://keys.gnupg.net CA45 09B5 5351 7C11 A9D1 7286 0036 9E45 1595 8BC0 signature.asc Description: OpenPGP digital signature
Re: multiple versions of python
On 12/29/2014 09:17 PM, Boruch Baum wrote: Hello everyone, I'm preparing two bug reports, and in trying to sort one of them out, it seems that it may be linked to an incompatibility of a script with python2.7 (see bug #659831). So, in test that possibility, what I would like to do is install some other version of python (I see 2.5 and 2.6 in the repositories), in order to see whether the package works with another version. My questions revolve around how time-consuming and worthwhile this exercise will be: 1] Can I have multiple versions of python simultaneously? 2] Is there a way to specify that one package use a non-default version of python? (I don't want to set an old version of python as default, if that risks having other packages, depending on 2.7, break). 3] Is this a quick, straightforward install? Or is it going to be something like an emacs install, with all kinds of time-consuming, interminable local compilations and configurations? Please respond to me directly, and on list. Thanks. It sounds like you need virtualenv: https://pypi.python.org/pypi/virtualenv Regards, Alex -- To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org Archive: https://lists.debian.org/54a1c7f8.2070...@biotec.tu-dresden.de
multiple versions of python
Hello everyone, I'm preparing two bug reports, and in trying to sort one of them out, it seems that it may be linked to an incompatibility of a script with python2.7 (see bug #659831). So, in test that possibility, what I would like to do is install some other version of python (I see 2.5 and 2.6 in the repositories), in order to see whether the package works with another version. My questions revolve around how time-consuming and worthwhile this exercise will be: 1] Can I have multiple versions of python simultaneously? 2] Is there a way to specify that one package use a non-default version of python? (I don't want to set an old version of python as default, if that risks having other packages, depending on 2.7, break). 3] Is this a quick, straightforward install? Or is it going to be something like an emacs install, with all kinds of time-consuming, interminable local compilations and configurations? Please respond to me directly, and on list. Thanks. For background, the python bug is in package reportbug, WHEN BEING USED IN TEXT MODE (See below for version information): $ reportbug --ui=text libpam-mount Traceback (most recent call last): File "/usr/bin/reportbug", line 38, in from reportbug import utils File "/usr/lib/python2.7/dist-packages/reportbug/utils.py", line 70, in import debbugs File "/usr/lib/python2.7/dist-packages/reportbug/debbugs.py", line 40, in import debianbts File "/usr/lib/pymodules/python2.7/debianbts.py", line 33, in import SOAPpy File "usr/lib/python2.7/dist-packages/SOAPpy__init__.py", line 5, in from Client import * File "/usr/lib/python2.7/dist-packages/SOAPpy/Client.py", line 59, in from Parser import parseSOAPRPC File "/usr/lib/python2.7/dist-packages/SOAPpy/Parser.py", line 10, in from wstools.XMLname import fromXMLname File "usr/lib/python2.7/dist-packages/wstools__init__.py", line 6, in import WSDLTools File "/usr/lib/python2.7/dist-packages/wstools/WSDLTools.py", line 15, in from Utility import Collection, CollectionNS, DOM, ElementProxy, basejoin File "/usr/lib/python2.7/dist-packages/wstools/Utility.py", line 30, in from httplib import HTTPConnection, HTTPSConnection ImportError: cannot import name HTTPSConnection dpkg -l |grep reportbug 4715:ii python-reportbug 6.6.1 all Python modules for interacting with bug tracking systems 4951:ii reportbug 6.6.1 all reports bugs in the Debian distribution dpkg -l |grep python2.7 3170:ii libpython2.7:amd64 2.7.8-11 amd64Shared Python runtime library (version 2.7) 3171:ii libpython2.7-dbg:amd64 2.7.8-11 amd64Debug Build of the Python Interpreter (version 2.7) 3172:ii libpython2.7-dev:amd64 2.7.8-11 amd64Header files and a static library for Python (v2.7) 3173:ii libpython2.7-minimal:amd64 2.7.8-11 amd64Minimal subset of the Python language (version 2.7) 3174:ii libpython2.7-stdlib:amd64 2.7.8-11 amd64Interactive high-level object-oriented language (standard library, version 2.7) 4795:ii python2.7 2.7.8-11 amd64Interactive high-level object-oriented language (version 2.7) 4796:ii python2.7-dbg 2.7.8-11 amd64Debug Build of the Python Interpreter (version 2.7) 4797:ii python2.7-dev 2.7.8-11 amd64Header files and a static library for Python (v2.7) 4798:ii python2.7-doc 2.7.8-11 all Documentation for the high-level object-oriented language Python (v2.7) 4799:ii python2.7-examples 2.7.8-11 all Examples for the Python language (v2.7) 4800:ii python2.7-minimal 2.7.8-11 amd64Minimal subset of the Python language (version 2.7) -- hkp://keys.gnupg.net CA45 09B5 5351 7C11 A9D1 7286 0036 9E45 1595 8BC0 signature.asc Description: OpenPGP digital signature