Reputation: 57
I installed package called Anaconda into my Sublime Text 3
Simple command such as 1+1 doesn't show anything but function print does.
Simple code like 1+1 doesn't work
But python's print function works well.
Can you tell me what am I doing wrong?
Upvotes: 1
Views: 617
Reputation: 492
Yes it may give you correct answers for the script part i.e print
but for things such as 1+1
you need an interactive console. You can just install anaconda directly in your os from this link this would be better.
Upvotes: 1
Reputation: 1319
Sublime console is not made an interactive console. When you run the python code it actually runs the file. You can check this by typing 1+1
in a file, saving it in a .py format and then running the file as
python -u filename.py
which is how sublime executes the code as seen in https://www.youtube.com/watch?v=6ZpuwW-9T54 at 2:36.
You can check the same response to a similar question in this discussion forum as well. https://forum.sublimetext.com/t/running-python-on-sublime-console/18621/2
Upvotes: 2