0

I've been trying to set up my computer environment to start coding in python3.

I started by installing package controller, then sublimeREPL. After creating the first build system following the steps answered in this question. I did the things explained in the top 3 answers on that page.

This worked, but it ran my program in the already installed python2, instead of my newly installed python3.

I found the solution to this problem here. I didn't go the virtualenv route, instead following MattDMo's solution.

changing the two directories in his code to match me like this:

[
     {
        "id": "tools",
        "children":
        [{
            "caption": "SublimeREPL",
            "mnemonic": "r",
            "id": "SublimeREPL",
            "children":
            [
                {"caption": "Python",
                "id": "Python",

                 "children":[
                    {"command": "repl_open",
                     "caption": "Python 3",
                     "id": "repl_python3",
                     "mnemonic": "p",
                     "args": {
                        "type": "subprocess",
                        "encoding": "utf8",
                        "cmd": ["/usr/local/bin/python3", "-i", "-u"],
                        "cwd": "$file_path",
                        "syntax": "Packages/Python/Python.tmLanguage",
                        "external_id": "python",
                        "extend_env": {"PYTHONIOENCODING": "utf-8"}
                        }
                    },
                    {"command": "repl_open",
                     "caption": "Python 3 - IPython",
                     "id": "repl_python_ipython3",
                     "mnemonic": "p",
                     "args": {
                        "type": "subprocess",
                        "encoding": "utf8",
                        "autocomplete_server": true,
                        "cmd": {
                            "osx": ["/usr/local/bin/python3", "-u", "${packages}/SublimeREPL/config/Python/ipy_repl.py"]
                        },
                        "cwd": "$file_path",
                        "syntax": "Packages/Python/Python.tmLanguage",
                        "external_id": "python",
                        "extend_env": {
                            "PYTHONIOENCODING": "utf-8",
                            "SUBLIMEREPL_EDITOR": "$editor"
                        }
                    }
                    }
                ]}
            ]
        }]
    }
]

Now, when i try to 'build' the simple program i have written, at the bottom of the screen it says "No Build System".

Community
  • 1
  • 1
kALiEN
  • 1
  • What do you expect to happen when you run 'build'? In general, Python has no "build" step, because it's a directly-interpreted language, not a compiled one. Or rather, the only compilation is done on-the-fly in a just-in-time fashion. – Mark Reed Feb 21 '17 at 01:35
  • Im expecting it to open a different tab and run my program. I had to get REPL plugin because for some reason, i couldn't gather user input with the default python3 build system. – kALiEN Feb 21 '17 at 01:40
  • I'm not a user myself, but I don't think SublimeREPL gives you a "build". Just keybindings for "evaluate this".. – Mark Reed Feb 21 '17 at 01:45

0 Answers0