Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #62990
| References | <CAN5p5FV7=RKK0cmE_=n+te07CEt678OX1Wwj+96T9eAuDujpfA@mail.gmail.com> <CAPM-O+wAZFmde2bVhqqs4==a-jy3AXfv3f9JNQwcNmTJHCak+Q@mail.gmail.com> <CAJ+Teoc0f3S2FRPwrtHuao+7aKiA=57Nn1UVpoH0-3WRTNQbgg@mail.gmail.com> <la483g$19i$1@ger.gmane.org> |
|---|---|
| From | Rustom Mody <rustompmody@gmail.com> |
| Date | 2014-01-02 23:16 +0530 |
| Subject | Re: About some problem |
| Newsgroups | comp.lang.python |
| Message-ID | <mailman.4799.1388684810.18130.python-list@python.org> (permalink) |
On Thu, Jan 2, 2014 at 11:06 PM, Ned Batchelder <ned@nedbatchelder.com> wrote: > On 1/2/14 12:05 PM, Rustom Mody wrote: > >> >> i'm not sure about this but isnt it normally the case that different >> version modules dont get mixed up like that? >> IOW if pytesser was a properly packaged 2.7 module would python 3 be >> able to get at it ?? >> > > If you use a Python 3 installer it can succeed at installing a Python 2 > package. Then you won't find out until you try to run the package that it is > incompatible. A mechanism to prevent this seems like a good idea, but since > it wasn't in place at the dawn of Python 3, it would be difficult to put in > place now. $ python3 Python 3.3.3 (default, Dec 8 2013, 16:34:29) [GCC 4.8.2] on linux Type "help", "copyright", "credits" or "license" for more information. >>> from sys import path >>> path ['', '/usr/lib/python3.3', '/usr/lib/python3.3/plat-i386-linux-gnu', '/usr/lib/python3.3/lib-dynload', '/usr/local/lib/python3.3/dist-packages', '/usr/lib/python3/dist-packages'] $ python Python 2.7.6 (default, Dec 6 2013, 21:56:56) [GCC 4.8.2] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> from sys import path >>> path ['', '/usr/local/lib/python2.7/dist-packages/pip-1.0-py2.7.egg', '/usr/lib/python2.7', '/usr/lib/python2.7/plat-i386-linux-gnu', '/usr/lib/python2.7/lib-tk', '/usr/lib/python2.7/lib-old', '/usr/lib/python2.7/lib-dynload', '/usr/local/lib/python2.7/dist-packages', '/usr/lib/python2.7/dist-packages', '/usr/lib/python2.7/dist-packages/PILcompat', '/usr/lib/python2.7/dist-packages/gst-0.10', '/usr/lib/python2.7/dist-packages/gtk-2.0', '/usr/lib/pymodules/python2.7', '/usr/lib/python2.7/dist-packages/wx-2.8-gtk2-unicode'] So as far as I can see (on a debian linux system) the paths are clearly 2.7-prefixed or 3.3-prefixed. So apart from being stupid and/or malicious to munge sys.path to tread on the other python's toes...??? Oh ok I get what you are saying: python3 will not recognize a python2 package and install it seemingly correctly but actually wrongly
Back to comp.lang.python | Previous | Next | Find similar | Unroll thread
Re: About some problem Rustom Mody <rustompmody@gmail.com> - 2014-01-02 23:16 +0530
csiph-web