Python Forum
Which is best for python?Linux or windows?
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Which is best for python?Linux or windows?
#11
(May-02-2017, 08:24 AM)Mekire Wrote: Windows is more friendly to an inexperienced programmer.

https://en.wikipedia.org/wiki/Circe
Unless noted otherwise, code in my posts should be understood as "coding suggestions", and its use may require more neurones than the two necessary for Ctrl-C/Ctrl-V.
Your one-stop place for all your GIMP needs: gimp-forum.net
Reply
#12
I've used Python in both environments and will say I prefer Linux. That said, I wouldn't mind being Windows if that was my only choice.
My views from someone with basic experience...

Windows
Install IDLE, and you're pretty much good to go! F5 to run the program. Annoying thing with IDLE is there's one branch that only works with 2.x, while the other branch of IDLE only works with python 3.x. The former has a memory leak bug, but I'm already 45% of the way through one project with 2.x! Angry

Beginners will appreciate doing things more through a GUI.
You can still do CLI with Windows, but I prefer using Unix.
I have not tried any of the commercial Python IDEs, so for all I know, they make developing with Python an even better experience!

AFAIK, Notepad++ should work out well for advanced users and something that's free. There's a way to run programs, but that's something you'll need to look up (I've been sticking with IDLE thus far)

Linux
In college, I did a lot via CLI. Plus, as mentioned, I prefer typing in Unix commands vs. ones in DOS.
However, Linux still has a GUI if that's what you like.

I used Atom, which is nice since it's freeware, but also has word completion. E.g., I have a variable called "numDarkItems". I can type in the first few letters, and it'll generate a list of variables to choose from. Helpful to avoid mistakes in typos!

(May-02-2017, 07:21 PM)sparkz_alot Wrote: Just as a side note, if you are new to Python and have a Linux or Mac, you probably have two versions of Python pre-installed, v2.x and v3.x, I encourage you to use the 3.x version (it is typically invoked by typing python3 on the command line.  If you are using Windows, I again encourage you to install the latest v3.x.
If you end up using Python 3 more, I would even go so far as to look up instructions on going into the Unix shell and setting a shortcut so just python will invoke Python 3.
Reply
#13
(Jun-14-2017, 12:01 AM)ackmondual Wrote: If you end up using Python 3 more, I would even go so far as to look up instructions on going into the Unix shell and setting a shortcut so just python will invoke Python 3.

If you do that, be careful that many system script assume python=python2. So it depends how you set up the shortcut.

OTOH, if you use a shebang in your scripts, then it determines which version of Python is used and you seldom call python explicitly.
Unless noted otherwise, code in my posts should be understood as "coding suggestions", and its use may require more neurones than the two necessary for Ctrl-C/Ctrl-V.
Your one-stop place for all your GIMP needs: gimp-forum.net
Reply
#14
If using pyenv installing and switching between version become seamless and simple.
It's also safe will not mess up system version.

Install python 3.6.1 and set global python to be python 3.6.1.
mint@mint ~ $ pyenv install 3.6.1
Downloading Python-3.6.1.tar.xz...
-> https://www.python.org/ftp/python/3.6.1/Python-3.6.1.tar.xz
Installing Python-3.6.1...
Installed Python-3.6.1 to /home/mint/.pyenv/versions/3.6.1

# Make it default version
mint@mint ~ $ pyenv global 3.6.1
mint@mint ~ $ python
Python 3.6.1 (default, May 25 2017, 14:44:39) 
[GCC 5.4.0 20160609] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> 
What to use miniconda i shell session.
mint@mint ~ $ pyenv shell miniconda3-4.3.11
(miniconda3-4.3.11) mint@mint ~ $ python
Python 3.6.0 |Continuum Analytics, Inc.| (default, Dec 23 2016, 12:22:00) 
[GCC 4.4.7 20120313 (Red Hat 4.4.7-1)] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> 
Want to go back to OS default.
mint@mint ~ $ pyenv local system
mint@mint ~ $ python
Python 2.7.12 (default, Nov 19 2016, 06:48:10) 
[GCC 5.4.0 20160609] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> 
mint@mint ~ $ python3
Python 3.5.2 (default, Nov 17 2016, 17:05:23) 
[GCC 5.4.0 20160609] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> 
(Jun-14-2017, 12:01 AM)ackmondual Wrote: You can still do CLI with Windows, but I prefer using Unix.
If using cmder you get a shell which is simelar to a Unix shell.
Reply
#15
First I will say that my association with Windows ended in 2013 so things may have changed.

The biggest difference I recall is that the Windows versions come with Tkinter GUI modules and the Linux versions come with GTK. I find GTK a little more cumbersome so I tend to avoid GUI coding on Linux (which means at all these days).

You can of course install Tkinter on Linux.
Reply
#16
I am using Linux constantly and I never had to install Tkinter in order to use it. It is a part of the standard library.
"As they say in Mexico 'dosvidaniya'. That makes two vidaniyas."
https://freedns.afraid.org
Reply
#17
(Jun-18-2017, 10:17 AM)wavic Wrote: I am using Linux constantly and I never had to install Tkinter in order to use it. It is a part of the standard library.
I do. Arch and Gentoo are two linux distros that i know that you need to install python as well as tkinter in addition. I also have it happen on Ubuntu. So much so that i know the package name for ubuntu is python3-tk or python-tk for py2 without even looking at their repos. .
Recommended Tutorials:
Reply
#18
on my Linux Mint, Tkinter is not install by default too
Reply
#19
(May-02-2017, 07:21 PM)sparkz_alot Wrote: Just as a side note, if you are new to Python and have a Linux or Mac, you probably have two versions of Python pre-installed, v2.x and v3.x, I encourage you to use the 3.x version (it is typically invoked by typing python3 on the command line.  If you are using Windows, I again encourage you to install the latest v3.x.
I doubt new users are using advanced linux distros. But Arch Linux and Gentoo Linux have been using python3.x for years by default. Hence in these distros if you type python you invoke python3.x from default, and if you type python2 you invoke python2.x. And this is when you install it fresh before any customization.
Recommended Tutorials:
Reply
#20
Well ain't that something. I always presumed all Linux distros came with Python pre-installed. I guess I've been spoiled by openSuse and now Raspian, though, to be honest, I did have to install 'pip' on both. I just checked the openSuse and tkinter is installed on both python2 and python3. Haven't checked the Raspberry Pi for tkinter yet.
If it ain't broke, I just haven't gotten to it yet.
OS: Windows 10, openSuse 42.3, freeBSD 11, Raspian "Stretch"
Python 3.6.5, IDE: PyCharm 2018 Community Edition
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Pandas + PIL on Linux (Python 32) Clives 3 2,109 Mar-25-2022, 07:46 PM
Last Post: snippsat
  Run Python 3 script with the same command on Windows, Linux, and macOS? ssrobins 3 2,754 Nov-15-2020, 07:32 AM
Last Post: Gribouillis
  Best compiler for windows or mac linux Shadowdevelopment 0 1,617 Jan-21-2020, 02:25 AM
Last Post: Shadowdevelopment
  how to install python on linux manchun 5 4,520 Mar-01-2018, 09:09 AM
Last Post: wavic
  many versions on python on linux Skaperen 8 5,737 Oct-17-2017, 02:22 AM
Last Post: Skaperen
  Windows/VBA on at work, Linux+Haskell (and Python) on weekends Ofnuts 4 4,626 Feb-09-2017, 03:11 AM
Last Post: Larz60+

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020