Starting to Learn Python: Development Tools and Environments

  • Thread starter PeroK
  • Start date
  • Featured
  • #1
PeroK
Science Advisor
Homework Helper
Insights Author
Gold Member
14,351
6,724

Summary:

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

Answers and Replies

  • #2
12,022
5,672
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
  • #3
Dr Transport
Science Advisor
Gold Member
2,412
543
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
  • #4
Borg
Science Advisor
Gold Member
1,881
2,355
Anaconda with Jupyter Notebooks.
 
  • Like
Likes vanhees71, scottdave, aaroman and 1 other person
  • #5
PeroK
Science Advisor
Homework Helper
Insights Author
Gold Member
14,351
6,724
Anaconda with Jupyter Notebooks.
What does Anaconda do?
 
  • #6
PeroK
Science Advisor
Homework Helper
Insights Author
Gold Member
14,351
6,724
PS I've downloaded Pycharm and will see how that goes.
 
  • Like
Likes vanhees71, StoneTemplePython and pbuk
  • #7
Borg
Science Advisor
Gold Member
1,881
2,355
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
  • #8
PeroK
Science Advisor
Homework Helper
Insights Author
Gold Member
14,351
6,724
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.
 
  • #9
12,022
5,672
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
berkeman
Mentor
57,957
8,035
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
Ibix
Science Advisor
Insights Author
6,830
5,678
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
berkeman
Mentor
57,957
8,035
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
12,022
5,672
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
  • #15
12,022
5,672
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:
  • #18
18,243
7,873
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
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
12,022
5,672
Tell me about legacy scripts, our dept groups are littered with these scripts following the notion of don't fix whats 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
33,964
5,620
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
atyy
Science Advisor
13,997
2,276
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
cobalt124
Gold Member
47
32
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
berkeman
Mentor
57,957
8,035
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
berkeman
Mentor
57,957
8,035
Ah, found it under Settings. Turns out the default Appearance is "Dracula". Lordy.

1594776057228.png
 
  • Like
Likes vanhees71

Related Threads on Starting to Learn Python: Development Tools and Environments

  • Last Post
Replies
4
Views
2K
  • Last Post
Replies
2
Views
2K
Replies
6
Views
2K
  • Last Post
Replies
12
Views
3K
Replies
7
Views
7K
  • Last Post
Replies
1
Views
4K
  • Last Post
Replies
4
Views
648
  • Last Post
Replies
1
Views
784
Replies
2
Views
777
  • Last Post
Replies
1
Views
3K
Top