Sushant Kumar
Sushant Kumar

Reputation: 1

Python and Sublime text related query

I was trying to build a new system in Sublime Text that can build code with Python. But I was wondering if we need Python 3 separately installed as well?

Also where can I install packages like PyPDF2 directly: into Sublime Text or in Python shell or in terminal (Mac user)?

Upvotes: 0

Views: 127

Answers (1)

Matias Agelvis
Matias Agelvis

Reputation: 971

Sublime text is just a text editor, it doesn't come with any compiler or interpreted included, it runs them for you, so you would need to install Python 3 if you are going to code in it, you can install it in you machine with Homebrew, in case that you don't have Homebrew you can install it pasting this in the terminal:

ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"

and then

brew install python

You can follow these instructions for more details.

Then if you want to build python3 in sublime text you can use the sublime text packages Python 3 or Anaconda, which you can install through packagecontrol. In case that you haven't installed packagecontrol yet you can find the instructions here, it's very simple, open sublime text, hit cmd+shift+p, type Install Package Control, and enter.

With some tricks you can install packages from sublime text, but I would not recommend it when doing it from the terminal is so simple, just using pip or pip3 for python 3, for example pip3 install PyPDF2, you can search for python packages at the Python Package Index.

Upvotes: 2

Related Questions