0

Sublime Text 3, Windows 7, Anaconda - Using anaconda because I can't install scipy.

Having trouble setting up my Anaconda.sublime-settings and running python scripts in anaconda in general.

When I build with anaconda in sublime, here is my console. I verified that my PATH is working by opening anaconda through cmd prompt, but still have very little clue as to how I would run my .py scripts in it.

logs:

__init__() got an unexpected keyword argument 'python_interpreter'
[cmd: None]

1 Answers1

0

The easiest way to get Sublime + Anaconda + Python 3 (AND Python 2 in paralell if needed) is to install python 3.3 or higher (and if needed python 2.7).

With python 3.3+ two programs called "py.exe" and "pyw.exe" will be installed in "C:\Windows" and as "C:\Windows" is already in your PATH environment variable you will be able to start a python 3 interpreter by opening a cmd and typing "py". (If you have additionally installed python 2.7 you can start a python2 interpreter by adding the flag "-2" - so in a cmd just type "py -2")

If this works you simply have to add a build-system to Sublime Text which contains the "py" and the version flag. So just follow these Steps:

  1. In Sublime go to the menu "Preferences > Browse Packages...". In the opened folder go to the "user" folder.
  2. Create a file called for example "Anaconda Python 2.sublime-build" and open it in Sublime.
  3. Add:

    {
        "selector": "source.python",
        "cmd": ["py","-2", "-u", "$file"]
    }
    

Replace the "-2" with "-3" if needed.

Now you should see your added build system in Sublime under "Tools > Build Systems" and it should work as expected.

Jobomat
  • 699
  • 6
  • 7