Sublime Forum

Getting python to work in linux vs windows

#1

I apologize if this has been covered, but I am very new to coding (10 weeks in to my first class) and have been trying to ween myself off of Windows. I am using python through sublime. The problem I am running into is that the exact same code will run on sublime in windows, but not in Linux. I have already changed the line endings to Windows, which fixed one of the issues I was having. But now I am getting traceback errors for non-defined variables. However, the same code will run without any problem in IDLE. I am now running ubuntu gnome 16.10 on my laptop, but I was having the same issue on Mint as well.

0 Likes

#2

Python comes with OS independent modules/classes/functions and with OS dependent counter parts. So you need to make sure not to use functions/classes/modules which are supported by Windows only.

Furthermore an example would help to clarify the reason.

1 Like

#5

0 Likes

#6

I assume you are running python 2.X on one machine and python 3.X on the other machine. You may just check, that you are running the same python versions. In you example you can change input to raw_input to make it work on python 2. (It won’t work in python 3 then.)

0 Likes

#7

I am supposed to be using Python3. SublineREPL says 3.5.2+ idle version is 3.5

0 Likes

#8

You could try entering 'hello', but this looks like a bug in SublimeREPL.

0 Likes