python - virtualenvwrapper-win如何支持SublimeREPL
PHP中文网
PHP中文网 2017-04-18 09:44:19
0
2
561

安装好了virtualenvwrapper-win感觉非常舒爽,但是有一个问题因为我一直再用Sublime text3的SublimeREPL执行python文件,默认的是python的解释器,在设置中发现这么一段,预感是支持的,请问大神们如何设置呢?能让它方便的切换到env虚拟的python解释器

PHP中文网
PHP中文网

认证高级PHP讲师

reply all(2)
Ty80

This link should solve your problem:
Using virtualenv with Sublime Text 3 and SublimeREPL

阿神

Now I have found a manual method, open ST3's X: Sublime Text 3x64DataPackagesSublimeREPLconfigPython
There are three files in it, st3 opens Main.sublime-menu. Find the code with the caption Python-Run current file, that is, we usually set it as the run python option of the shortcut key F5, and change the CMD python to the env interpreter path.

                {"command": "repl_open",
                 "caption": "Python - RUN current file",
                 "id": "repl_python_run",
                 "mnemonic": "R",
                 "args": {
                    "type": "subprocess",
                    "encoding": "utf8",
                    "cmd": ["E:\Python35\ENVS\jia\Scripts\python", "-u", "$file_basename"],
                    "cwd": "$file_path",
                    "syntax": "Packages/Python/Python.tmLanguage",
                    "external_id": "python",
                    "extend_env": {"PYTHONIOENCODING": "utf-8"}
                    }
                },

The disadvantage is that the environment cannot be transplanted. The advantage is that you know how to change it, and it is actually very convenient and simple. Just change the path to whichever virtual environment you want to use and it will be OK.

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!