Python Starting to Learn Python: Development Tools and Environments

  • Thread starter Thread starter PeroK
  • Start date Start date
  • Tags Tags
    Python Tools
Click For Summary
Learning Python can be initiated effectively using various IDEs and editors, with PyCharm Community Edition and Anaconda being highly recommended for beginners. Anaconda simplifies package management and deployment, making it suitable for scientific computing and data science. Users can also opt for Jupyter Notebooks for an interactive coding experience. While some prefer command-line tools and lightweight editors like Notepad++, others appreciate the debugging features and user-friendly interfaces of IDEs like Spyder and Thonny.For Windows users, familiarity with the operating system is beneficial, although IDEs can abstract some complexities. Git is widely used for source control, with platforms like GitHub and Bitbucket available for hosting repositories. Python 3 is emphasized over Python 2 due to ongoing deprecation. For GUI development, TkInter is built-in, but wxPython is recommended for more robust applications. Overall, the choice of tools depends on personal preference and specific programming goals, with many resources available for beginners to ease the learning curve.
PeroK
Science Advisor
Homework Helper
Insights Author
Gold Member
2024 Award
Messages
29,401
Reaction score
21,091
TL;DR
A few questions about getting started.
I finally decided to learn how to program in Python. The basic syntax seems easy enough, but I have a few questions:

There is a dizzying array of editors and IDE's out there. What is a good option to get started?

I've never programmed (or done anything technical) on Windows. Is there any general advice about using the Windows environment for programming? I don't want to get into installing Linux at this stage. Do I need to be able to find my way around the Windows O/S, or does an IDE make that unnecessary?
 
  • Like
Likes vanhees71, Ishika_96_sparkles and berkeman
Technology news on Phys.org
Pycharm Community Edition is the absolute best coupled with an Anaconda3 distribution. Most common packages are in Anaconda or can be easily downloaded via:
Bash:
$$ conda search xxxx

$$ conda install xxxx

Pycharm is a project IDE similar to Netbeans and Eclipse but is tuned for Python.

Many folks using or learning machine learning and numerical simulation use Anaconda with Pycharm. Pycharm has a checking feature too that points out when your code violates some PEP rule which means its not how python programmers do it. As an example, I like to use ## for comments ala // in java but PEP warns me it should be # instead or when you don't have spaces separating variables from operators it will warn you. Pycharm has a formatter that will clean some of these things up.

Also you should use Python3 not Python2 as that is slowly very slowly getting deprecated. There are some real differences that can trip you up bouncing between them.

The cheap route is to go Processing IDE with its python mode although it is actually jython (python running on java) and is at python 2.7 level. In addition, there aren't nearly as many packages available for it but it can do graphics programming which is good for self study with immediate feedback.

I've used both and like both.

For example programs for all languages of interest, checkout rosettacode.org

Its especially good for comparing a known language with one you want to learn. Just be aware that examples are user contributed and may not be best practice or even solve the tasks in the same way.
 
  • Like
  • Informative
Likes vanhees71, Ishika_96_sparkles, pbuk and 2 others
Spyder coupled with Anacondais a good IDE. I use it all the time and it has served me well. Works on both Windows and Linux.
 
  • Like
Likes vanhees71, aaroman and PeroK
Anaconda with Jupyter Notebooks.
 
  • Like
Likes vanhees71, scottdave, aaroman and 1 other person
Borg said:
Anaconda with Jupyter Notebooks.
What does Anaconda do?
 
PS I've downloaded Pycharm and will see how that goes.
 
  • Like
Likes vanhees71, StoneTemplePython and pbuk
From Wikipedia:
Anaconda is a free and open-source distribution of the Python and R programming languages for scientific computing (data science, machine learning applications, large-scale data processing, predictive analytics, etc.), that aims to simplify package management and deployment.

I do all of my development in Jupyter which runs using the Anaconda framework. If I need to get a new python library, I open miniconda, load my new libraries and they're available in my Jupyter environment. Like any new language, it takes some time to get used to it but, once you do, it eliminates a lot of the maintainence headaches.
 
  • Like
Likes vanhees71
Borg said:
From Wikipedia:
Anaconda is a free and open-source distribution of the Python and R programming languages for scientific computing (data science, machine learning applications, large-scale data processing, predictive analytics, etc.), that aims to simplify package management and deployment.

I do all of my development in Jupyter which runs using the Anaconda framework. If I need to get a new python library, I open miniconda, load my new libraries and they're available in my Jupyter environment. Like any new language, it takes some time to get used to it but, once you do, it eliminates a lot of the maintainence headaches.
Thanks.
 
Actually there are two varients to Anaconda:
- anaconda everything plus the kitchen sink
- miniconda minimal anaconda about half its size

Both use the conda command to install and manage puthon packages including their depend packages.
 
  • #10
Sorry if I missed it or misunderstood it, but does Python have a built-in GUI builder, or do you use a separate package for building GUIs? Thanks.
 
  • #11
berkeman said:
does Python have a built-in GUI builder, or do you use a separate package for building GUIs?
Yes. :smile:

It has TkInter built in, which isn't great. Install wxPython.
 
  • Informative
Likes berkeman
  • #12
Ibix said:
Install wxPython
Thanks! Also, is there a source control system that works best with Python, or do folks just use whatever they use for other source code control?
 
  • #13
The trend in python for GUIs is to use the web framework instead Using python flask

With Flask you can construct an application specific web server. This gives you the full range of html, css, and JavaScript packages for your GUI.

Another less popular approach is to use the NCurses package for a textual GUI.
 
  • Like
Likes pbuk
  • #14
I'm using Thonny on Unbuntu and that works pretty well, no fluff.
 
  • #15
Interesting, I’ve not heard of Thonny before. It’s from the Univ of Tartu in Estonia and runs on Python 3.7 across all three major OS platforms with good debugging features.

https://thonny.org/

https://en.wikipedia.org/wiki/Thonny

its reminiscent of BlueJ for learning Java from Monash Univ Good for learning and simpler than the more common IDE tools.
 
Last edited:
  • #16
  • Like
Likes Greg Bernhardt
  • #17
rbelli1 said:
https://www.python.org/downloads/release/python-2718/

The terminal release of Python 2 (2.7.18) was April 20, 2020.

BoB

True, but what's happened in the past was user pushback which gave it new life so we'll have to see. There was even a case of retrofitting some feature specifically for 3+ into 2.7 because of user pushback.
 
  • Like
Likes Greg Bernhardt
  • #18
rbelli1 said:
https://www.python.org/downloads/release/python-2718/

The terminal release of Python 2 (2.7.18) was April 20, 2020.

BoB
Unless you're working on legacy scripts
jedishrfu said:
its reminiscent of BlueJ for learning Java from Monash Univ Good for learning and simpler than the more common IDE tools.
Yeah I like it because there is no learning curve. You just write and execute. Perfect for simple scripting. Good debugging capability. Anything heavier and of course, you'll want something more professional.
 
  • Like
Likes vanhees71 and jedishrfu
  • #19
Tell me about legacy scripts, our dept groups are littered with these scripts following the notion of don't fix what's not broken to the point where we still have FORTRAN IV (not a scripting language but definitely legacy) stuff floating around.

We have a real dinosaur boneyard on site.
 
  • #20
PeroK said:
There is a dizzying array of editors and IDE's out there. What is a good option to get started?
I don't use an IDE at all. I write my Python code using either Notepad or Notepad++, save the file, and then run the interpreter from the command prompt window.

My point is that it's not necessary to install a bunch of other software just to write and run Python code.
 
  • Like
Likes vanhees71 and jack action
  • #21
I've used Spyder too, from Anaconda and from WinPython. WinPython is interesting, because you can just download it as a folder in Windows, and can be used with no additional installation steps.

You can also try Google Colab, which you can use to run programs online and is free. It can read from your Google Drive.
 
Last edited:
  • Like
Likes vanhees71
  • #22
Anaconda, simple to install, add packages and use. Don’t use it professionally but the messing about was minimal before I could code and run Python.
 
  • Like
Likes vanhees71 and pbuk
  • #23
jedishrfu said:
Pycharm Community Edition is the absolute best coupled with an Anaconda3 distribution.
Ack, I downloaded it, but that is the single most unfriendly IDE startup I've run into. Too much of a Darth Vader look for me. How can I change to a Princes Leia look?

1594775830329.png
 
  • Haha
Likes atyy
  • #24
Ah, found it under Settings. Turns out the default Appearance is "Dracula". Lordy.

1594776057228.png
 
  • Like
Likes vanhees71
  • #26
berkeman said:
Thanks! Also, is there a source control system that works best with Python, or do folks just use whatever they use for other source code control?
Everyone who has a free (as in speech) choice uses Git for everything now. Bitbucket is a good free (as in beer) online repo (GitHub is only free for public projects).
 
  • #27
berkeman said:
Ah, found it under Settings. Turns out the default Appearance is "Dracula". Lordy.

View attachment 266362

ahh that would be Darkula. Yeah these IDE tools can be daunting at first but they definitely grow on you if you persevere for a few more days. Use google to find a good intro Video on YouTube.

most programmers prefer the dark theme either because we are in the dark about what to do or we’re in that dark stage of a project where we Just want to escape to Hawaii.
 
  • Like
  • Haha
Likes vanhees71, berkeman and atyy
  • #28
I just stumbled across this free online python course offered by Harvard. I guess it might be of interest to many of you.

Using Python for Research

What you'll learn
  • Python 3 programming basics (a review)
  • Python tools (e.g., NumPy and SciPy modules) for research applications
  • How to apply Python research tools in practical settings

https://online-learning.harvard.edu/course/using-python-research
 
  • Like
Likes berkeman, vanhees71 and PeroK
  • #29
You've gotten great responses so far, and I'll see if I can add to it.

PeroK said:
There is a dizzying array of editors and IDE's out there. What is a good option to get started?

I like every suggestion so far. One thing I would say is that while it's perfectly fine to end up using Pycharm or other advanced IDE, I think there's real value in being able to work straight from the command line. I use raw Python (no Conda), vim and venv. There are a few quality of life items that my colleagues using Pycharm have that I don't, but I don't miss them, and I've seen cases where they have to ssh into a server and have no idea what to do without the additional support. Meanwhile, I'm fine.

I've never programmed (or done anything technical) on Windows. Is there any general advice about using the Windows environment for programming?

Installing git will also install git bash, which is a linux-like command line tool you run from windows. It's pretty great! I've used it for several years now, but last year I also tried installing a linux subsystem on Windows 10. That worked great too! They both have advantages and being able to switch between them is very nice.
 
  • Like
Likes jedishrfu, atyy and PeroK
  • #30
pbuk said:
Everyone who has a free (as in speech) choice uses Git for everything now. Bitbucket is a good free (as in beer) online repo (GitHub is only free for public projects).
This is outdated information. Github offers free private repositories since early 2019.
 
  • Informative
Likes pbuk and berkeman

Similar threads

  • · Replies 1 ·
Replies
1
Views
8K
  • · Replies 8 ·
Replies
8
Views
2K
Replies
7
Views
1K
  • · Replies 3 ·
Replies
3
Views
1K
  • · Replies 3 ·
Replies
3
Views
2K
  • · Replies 13 ·
Replies
13
Views
3K
  • · Replies 6 ·
Replies
6
Views
3K
  • · Replies 8 ·
Replies
8
Views
2K
Replies
6
Views
3K
  • · Replies 6 ·
Replies
6
Views
2K