Sublime Forum

Setting up Tensorflow with Sublime

#1

Hi everyone! I am running the sublime editor on my Mac but can not for some reason get sublime to import the Tensorflow modules without receiving an error.

I understand that Tensorflow creates a unique environment in which it operates but how do I access that through sublime? At this stage I can only access Tensorflow by activating python through bash and then importing idle while the Tensorflow environment is activated.

Any help would be really appreciated!

John

0 Likes

#2

Does Tensorflow work with Python 3.3? My understanding was that it only works with Python 2. If it only supports Python 2, you won’t be able to import it into the Sublime Text python environment.

You still can run Python 2 scripts through the Python build system, and that should be able to work with Tensorflow.

0 Likes

#3

I am pretty sure Tensorflow supports python 3.3+ versions because as I said before, when I open IDLE through bash, there is no problem running Python 3 scripts. I believe the problem could be the path, its looking through miniconda directory instead of the designated environment that Temsorflow has.

Any idea on how to change the path??

0 Likes

#4

The built in Sublime Text python environment doesn’t look through anything but the bundled Python 3.3 stdlib zip file and the package directories by default.

That is presuming you are trying to use it from a plugin. It almost sounds like you are running it from an external Python executable (since you mention miniconda). In that case, it is probably specific to your environment.

Are you writing a plugin, or running Python via a build system?

0 Likes