What problems can I have if I will use python 2.7 instead python 2.6 for my pylons/pyramid projects? Before I use python 2.6 on my ubuntu 10.04 but now I have ubuntu 11.04 on my laptop with python 2.7.
If you're using Ubuntu the package manager will fix most of the minor issues such as finding the packages you used to have in 2.6.
But there are some Packages that isn't compliant with Python2.7.
Mainly Python2.7 is a backwards compatible version from 3.X, or at least Python 2.7 was an upgrade from 2.6 towards the 3.X syntax and all it's new functions while the translation to 3.X was made.
Here's some info:
http://docs.python.org/dev/whatsnew/2.7.html
http://www.python.org/getit/releases/2.7/
Mainly Python2.7 should just give you more functions but can cause unexpected problems,
Go ahead and upgrade it on a seperate machine, run your code, if it works, upgrade your real machine to Python2.7.
The problems that might occur are minor, you should be able to fix them within 1h.
According to this post, Pyramid 1.2 (as is 1.1) is fully supported on Python 2.5.x, 2.6.x, and 2.7.x so you should be all set. From my own personal experience,I haven't run into any issues with Pyramid/Python2.7.
These days my Pyramid stack consists of:
python 2.7
khufu
sqlalchemy 0.7.x
and it works quite well.
Take a look at http://docs.python.org/dev/whatsnew/2.7.html
You'll find what all you'll ever need to know.
Related
I have a project with Python 3.5.4, but I want to use a Python library called pyghmi, but the library only supports the Python 2.x.
How can I solve this issue?
The project was updated for python3 and is tested with python 3.5, though I will confess the vast majority of users are using python 2.7 at the moment. The building of rpms, however, has not yet been tested for python3 (so far system python of centos 6 and centos7 has been the rpm environment).
I would be interested to know the issue you are hitting.
New to python, hence the question...
I am going to be working with python 2.6.6 and I am trying to set up my eclipse on CentOS for the same. While trying to get the pydev version I don't know which version I should get? I see a bunch of them listed for 2.6.x.x and 2.7.x.x. Can I select the latest one in the version series 2.7?
How does this matter with me working with a specific older version of python.
Appreciate the help.
According to http://pydev.org/download.html, the latest version of PyDev supports Python 2.1 or later, no qualifications. So you should be OK with Python 2.6.6 and at least could ask for support if you run into a problem with it.
Sorry to hear your initial experiences with Python have to be with an older version of the interpreter!
I had already installed Python 3.2 on my development computer. It was mainly for exploring it.
Now I have to perform some "real" work, modifying then porting to C++ something in Python, but using the Enthought (EPD Free) package, that depends on Python 2.7.
Do you think I should uninstall Python 3.2, are there any possible side effects of having both installed on my machine ?
I fear any unwanted side effects ;-)
It's no problem to have multiple Pythons on your machine. I currently have 2.5, 2.6, 2.7, 3.0, 3.1 and 3.2. Where it can get a little more complicated is if you want to have multiple installations of the same version, i.e. two different distributions based on 2.7, say. But that's not what you are doing here so you have nothing to fear.
This question already has answers here:
Closed 11 years ago.
Possible Duplicate:
Can I install python 3.x and 2.x on the same computer?
I am learning Python which I started with 3.2. Now I know basics and want to use some frameworks to learn web development. Here, I came to notice Django doesn't supports Python 3x yet.
So, I need to use Python 2x on same machine. How can I install both?
PS. I am currently using Windows XP.
Just install them normally. By default each version of Python is installed to a different path, and won't conflict. Python 3 and Python 2 don't even use the same executable name (python vs python3), so there's not a lot to worry about.
they will install into C:\Python27, and C:\Python32 by default.
no conflicts.
i didn't want to answer this but i have to since you might have a problem that no one is talking about lol
first don't install python from the official website go to activestate and download activepython for python 2,7
here's a direct link
http://downloads.activestate.com/ActivePython/releases/2.7.2.5/ActivePython-2.7.2.5-win32-x86.msi
activepython will help a lot when downloading packages trust me, so to install django, open pypm and type pypm install django
learn python 2.x and not 3.x because:
1-All the modules work on 2.x and not 3.x, python is a modular language, it's useless if you can't find modules
2- python 2.x will be there for at least 5 years so there's a long time for you to get started on 3.x maybe by then it will be more supported
3-now we are using 2.7, starting from 2.5 python started doing small changes to help programmers have a smooth transition from 2.x and 3.x, so when 2.9 arrives it will look a lot like 3.x
4-if you installed 2.7 and 3.2 on xp and lets say you made 2.7 your default version, which is the right thing to do, then there's a big possibility that 3.2 won't work, it will give you this error: Error runtime
program C:\python32\pythonw.py
this application has requested the runtime to terminate it in an unusual way, please contact the application support team for more information
so it will just give you a headache lol
After going through hell trying to install the latest version of postgresql and psycopg2 today I'm going for a complete reinstall of Leopard.
I've been sticking with macpython 2.5 for the past year but now I'm considering macports even 2.6
For me it's most important for Twisted, PIL and psycopg2 to be working without a problem.
Can anyone give some guidelines for what version I should choose, based on experience?
Edit:
Ok I've decided to go without reinstalling the os. Hacked around to clean up the bad PostgresPlus installation and installed another one. The official python 2.6.1 package works great, no problem installing it alongside 2.5.2. Psycopg2 works. But as expected PIL wont compile.
I guess I'll be switching between the 2.5 from macports and the official 2.6 for different tasks, since I know the macports python has it's issues with some packages.
Another Edit:
I've now compiled PIL. Had to hide the whole macports directory and half the xcode libraries, so it would find the right ones. It wouldn't accept the paths I was feeding it. PIL is notorious for this on leopard.
You can install them side-by-side. If you've encounter problems just set python 2.5 as the standard python and use e.g. python26 for a newer version.
Read this
http://farmdev.com/thoughts/66/python-3-0-on-mac-os-x-alongside-2-6-2-5-etc-/
I still use macports python25, because so many other packages depend on it, and have not updated to use python26.
$ port dependents python25
gnome-doc-utils depends on python25
mod_python25 depends on python25
postgresql83 depends on python25
gtk-doc depends on python25
at-spi depends on python25
gnome-desktop depends on python25
mercurial depends on python25
And that's excluding the py25-* packages I have installed.
I wrote something today on this very subject, my recommendation? Run multiple version, and slap virtualenv down to compartmentalize things.
http://jessenoller.com/2009/03/16/so-you-want-to-use-python-on-the-mac/
I also wouldn't both with macports. I don't see a need for it.
I've updated my macbook running leopard to python 2.6 and haven't had any problems with psycopg2. For that matter, I haven't had any compatibility issues anywhere with 2.6, but obviously switching to python3k isn't exactly recommended if you're concerned about backwards compatibility.
I would stick with the MacPython version 2.5.x (I believe 2.5.4 currently). Here's my rationale:
Snow Leopard may still be on the 2.5 series, so you might as well be consistent with the future OS (i.e. no point in going too far ahead).
For most production apps, nobody is going to want to use 2.6 for another year.
No frameworks/programs are going to leave 2.5 behind for at least 2 years.
In other words, my approach is that the only reason to do 2.6 is for fun. If you're looking to have fun, just go for 3.0.
I use both Twisted and Psycopg2 extensively on OSX, and both work fine with Python 2.6. Neither has been ported to Python 3.0, as far as I know.
Several of Python 3.0's features have been back-ported to 2.6, so you gain quite a bit by moving from 2.5 to 2.6. But I wouldn't switch to 3.0 until all of your thirdparty libraries support it; and this may not happen for some time.
I had some trouble installing PIL. I compiled it and it worked with the modification explained on this post http://passingcuriosity.com/2009/installing-pil-on-mac-os-x-leopard/
After that it worked fine.
I am using Python 2.5.1. It's working great for me for general scripting and some CherryPy web projects.
If your using Macports, I recommend downloading the python_select package, which facilitates easy switching between different versions including the built in apple versions. Makes life a lot easier.