简体   繁体   中英

SublimeREPL to python

How i can tune sublimeREPL to python in Sublime Text 2? My use (Python 3.3 on windows 7):

"default_extend_env": {"PYTHONPATH": "C://Python33"},

It not work, because in build (Tools -> SublimeREPL -> Python -> Python (or Python RUN current file)) alert error and not have message on bottom console.

Error message:

错误

I don't know if you still need it, but someone else might. According to

https://github.com/wuub/SublimeREPL/issues/96

You should go to Settings -> Package Settings -> SublimeREPL -> Settings - User

And add this option:

{
    "default_extend_env": {"PATH": "{PATH};C:\\Python27"}
}

First of all i find the double slashes kind of strange so I'd start with removing them.

"default_extend_env": {"PYTHONPATH": "C://Python33"},

to

"default_extend_env": {"PYTHONPATH": "C:/Python33"},

That might fix your problems, but I find it kind of strange that you have to do any editing/configuration at all. I'm running SublimeREPL and I have python 3 installed on my system and that is the version that is running in my REPL out of the box.

The error that you are getting is telling you that windows can't find the specified file , this has happened for me when trying to configure SublimeREPL or trying to run the PHP REPL which has some strange default config for windows. I have no idea why the text is in hex though.

If it is that you have two different versions of python installed I guess that the way you're going is correct, unless python 3 is the default, ie the version that you have in your path , then I'd recommend that you revert back to the default config and verify if haven't already that you are indeed not running Python 3 in the REPL, you can do that by executing these commands:

import sys
help(sys)

For some reason print sys.version doesn't work for me, but that would be more sensible.

"default_extend_env": {"PYTHONPATH": "C://Python33"}

because the PATH——"C://Python33" is wrong.

You must input the path to the Python you installed in your computer.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM