Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 8 years ago.
Improve this question
I'm new to programming as well as Linux. Will using Python 2.7.6 as opposed to the latest version affect
my learning?
*nix distributions use Python for many of their core system utilities, and as a result, they are a bit conservative on moving to new versions, especially major non-backward-compatible versions like Python 3. You should have a Python 3 interpreter available on Ubuntu though, you just have to run python3 from the terminal instead of just python. That said, for introductory programming, differences between 2 and 3 are negligible (to say nothing of differences between minor versions), so you should be fine with whatever interpreter you have access to.
Python 3 has improvements that are not compatible with Python 2, so Python 2 is still needed for a lot of software that hasn't been upgraded.
You can install Python 3 alongside Python 2.
For someone who's just learning, it makes sense to use Python 3 unless you're in a class or company that's using Python 2. The improvements are worthwhile and easier to work with. It's not difficult to apply knowledge of one to the other, but better to focus on one of them while learning.
Both python (Python 2) and python3 (Python 3) are installed on Ubuntu 14.04 by default. For both Ubuntu and Debian, we have ongoing project goals to make Python 3 the default, preferred Python version in the distros.
There are many scripts that were written for Python 2 that expect that python refers to Python 2 interpreter. Run python3 to get Python 3 interpreter.
Related
Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 1 year ago.
Improve this question
This is the repo and on searching for the python versions available (searching page for "python-3.6.") I noticed that 3.6.0 was not available. Python 3.6.2 upwards was available.
What difference would it actually make if I'm running an old code that specifically mentions compatibility with just 2.7.12 and 3.6. ?
The three groups of numbers in a Python version are "major", "minor", and "micro":
new major versions are exceptional; they only come when strongly incompatible changes are deemed necessary, and are planned very long in advance;
new minor versions are feature releases; they get released annually, from the current in-development branch;
new micro versions are bugfix releases; they get released roughly every 2 months; they are prepared in maintenance branches.
Micro versions don't introduce features or break backwards compatibility. Anything that runs on, for instance, 3.6.1 should run just as well on 3.6.2, and so on. (The exception would be code that accidentally relies on a bug, but that's pretty rare.)
Generally speaking, you should use the newest micro version available.
Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 4 years ago.
Improve this question
I recently switched jobs and have the oportunity to create a clean programming working environment, cleaner and better than I used to have before. In my previous work I had some problems with running different versions of python next to eachother (or different versions of package) so I thought it would be a good idea to use Conda as a python install/package manager.
As an IDE I used to use idle because I find spyder a little cluttered, but I do however miss some functionality of a proper IDE and was thinking about switching to PyCharm for personal use and iPython (that is the same as python notebook isn't it?) for courses on python I will be giving.
What is the best way to do a very clean install? Do I install miniconda first and then python3.6 (and/or python2.7), pycharm, iPython? Or can I do this in a better way without getting to much clutter?
I would definitely suggest to go for miniconda or anaconda, as you already said yourself, since it allows you to keep different Python versions separated in different environments.
I cannot really give you advice on the editor to use, since I always use Spyder. It takes some time to get used to, but it very versatile and extremely useful when dealing with large and many Python scripts.
Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 8 years ago.
Improve this question
On a developer site like PyPI, when a module says it supports Python 3 (like the requests package), can I use it with any Python 3 release or is it literally Python 3.0?
If it does mean the latest Python version, how can you be sure that it is true? For example if the project has been untouched for like 1 or 2 years?
Supporting Python 3 means supporting Python 3 up to the current point release.
Python point releases are backward compatible. What works on 3.0 should generally work on 3.4. See PEP 387 for the general guidelines on this policy. Python 3.4 added some deprecations but none of these will affect packages that were once only written for 3.0, at least until Python 3.5 or 3.6 are released.
Exceptions are more easily made for C extensions. Python 3.3 saw a new internal Unicode format, but support for the old Unicode C APIs is still present in 3.4.
The 3.4 deprecations are for the most part for code that has been extremely rarely used, if at all. Any code that uses features that are now slated for removal should trigger warning messages.
For future Python 3.x releases, just download the package and use it. If anything were to break, look through the Deprecated entries in recent Python 3 release notes to see if the project may have been using a feature since removed.
In any case, try and check the project documentation; a good project will list exact versions on which they have tested the package. The requests project states:
Requests officially supports Python 2.7 & 3.4–3.7, and runs great on PyPy.
Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 9 years ago.
Improve this question
In trying to answer this question, I ran across this thread which is now close to three years old:
Should I wait for Django to start supporting Python 3?
I've spent the last year learning all I can about Python 3 and have a few Python 3 command-line applications in production. I now need to start offering a UI to other users to support other Python projects in the queue, and Django looks to me to be the best tool for doing that within our environment. However, Django 1.5 is supporting Python 3 "experimentally" and there is no word on how soon we can expect Django 1.6 (which is claimed to fully support Python 3) to be available.
Obviously, it's going to take some months for me to do anything useful with Django, and I would be surprised if Django 1.6 isn't in stable release by the time I'm ready to deploy a production Django application, but I'm wondering what kind of frustration I'm in for in trying to learn Django with only Python 3 experience.
Thanks.
In 2013, I still advise that if you're learning Django, use Python 2.
Many resources, including the official tutorial for Django 1.6 are written for Python 2.X. You may have problems using Python 3.X unless you are aware of the subtleties of porting code from Python 2 to 3.
Once you are a bit more familiar with Django, then you can try converting your project to Python 3.
It depends on what third-party packages you plan on using.
According to the documentation here:
If you’re starting a new project, and the dependencies you plan to use work on Python 3, you should use Python 3. If they don’t, consider contributing to the porting efforts, or stick to Python 2.
If I were you, I would see what packages and dependencies you are going to use and decide from there. If you are not going to be using anything other than what you write then go for django 1.6 and python 3.
I just helped a friend through the Django tutorial using python 3 a few weeks ago and it went smoothly enough.
And remember there is an channel on irc.freenode.net for #django. The people there are really helpful make sure to check them out.
Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 1 year ago.
Improve this question
I am now on the road to learn Python (not the first time I wanted to get this done) now I am standing in front of a decision which I am not able to make so easily
Which Version should I use?!
I found that question was asked about a year ago and Python 2.6 was chosen (more or less) now whats the status quo now ?!
I am running my home and business environment mixed with Windows (XP, 7, 2003, 2008), Linux (Ubuntu Intel & PPC) and Mac OS X (PPC & Intel) Environments and my first approach is to learn the language by creating few scripts to help me do my job as a network administrator and server administrator.
Thanks for your help, by the way I am not new in programming.
For writing admin scripts, I would recommend the current Python 3.x variant and http://diveintopython3.org. As you already know how to program, you will pick up the differences between 3.x and 2.x rather easily in case you should need a 2.x-only library.
For your purposes, the major difference between 2.x and 3.x are likely print being a function (3.x) vs. a special command (2.x) and strings that are always unicode (3.x) vs. special unicode-strings (2.x).
for real projects: 2 (many libs are incompatible with 3), for small scripts and learning: 3.
I'd favour 2.7 at the moment.
There are more libraries available for 2.7, and new features are still being added.
It's still Python 2.x, but 2.7 should serve your needs now. Python 3 is still some way off comprehensive support from the universe of tools, libraries and frameworks.
I'm new to Python as well...for what i've read, 2.7 is the one, but i had to downgrade to 2.5 to be able to use Google App Engine's SDK.