【发布时间】:2017-06-28 16:58:49
【问题描述】:
所以我已经在 [我的 Windows 10] 上安装了:
- Python3 Anaconda 分布
- 崇高文本 3
- 崇高的 REPL
- 崇高的虚拟环境
我正在尝试让 SublimeREPL python - virtualenv 工作。目前运气不好。
virtualEnv Repl 在我打开时关闭。
工具 -> SublimeREPL -> Python -> python - virtualEnv
REPL 弹出,然后给我这个:
C:\Users\joshu\Anaconda3\lib\site-packages\IPython\config.py:13: ShimWarning: The `IPython.config` package has been deprecated. You should import from traitlets.config instead.
"You should import from traitlets.config instead.", ShimWarning)
C:\Users\joshu\Anaconda3\lib\site-packages\IPython\terminal\console.py:13: ShimWarning: The `IPython.terminal.console` package has been deprecated. You should import from jupyter_console instead.
"You should import from jupyter_console instead.", ShimWarning)
Traceback (most recent call last):
File "C:\Users\joshu\AppData\Roaming\Sublime Text 3\Packages/SublimeREPL/config/Python/ipy_repl.py", line 52, in <module>
embedded_shell.initialize()
File "<decorator-gen-114>", line 2, in initialize
File "C:\Users\joshu\Anaconda3\lib\site-packages\traitlets\config\application.py", line 87, in catch_config_error
return method(app, *args, **kwargs)
File "C:\Users\joshu\Anaconda3\lib\site-packages\jupyter_console\app.py", line 137, in initialize
self.init_shell()
File "C:\Users\joshu\Anaconda3\lib\site-packages\jupyter_console\app.py", line 110, in init_shell
client=self.kernel_client,
File "C:\Users\joshu\Anaconda3\lib\site-packages\traitlets\config\configurable.py", line 412, in instance
inst = cls(*args, **kwargs)
File "C:\Users\joshu\Anaconda3\lib\site-packages\jupyter_console\ptshell.py", line 252, in __init__
self.init_prompt_toolkit_cli()
File "C:\Users\joshu\Anaconda3\lib\site-packages\jupyter_console\ptshell.py", line 404, in init_prompt_toolkit_cli
self.pt_cli = CommandLineInterface(app, eventloop=self._eventloop)
File "C:\Users\joshu\Anaconda3\lib\site-packages\prompt_toolkit\interface.py", line 80, in __init__
self.output = output or create_output()
File "C:\Users\joshu\Anaconda3\lib\site-packages\prompt_toolkit\shortcuts.py", line 114, in create_output
return Win32Output(stdout)
File "C:\Users\joshu\Anaconda3\lib\site-packages\prompt_toolkit\terminal\win32_output.py", line 80, in __init__
info = self.get_win32_screen_buffer_info()
File "C:\Users\joshu\Anaconda3\lib\site-packages\prompt_toolkit\terminal\win32_output.py", line 150, in get_win32_screen_buffer_info
raise NoConsoleScreenBufferError
prompt_toolkit.terminal.win32_output.NoConsoleScreenBufferError: No Windows console found. Are you running cmd.exe?
***Repl Closed***
虚拟环境位置
我目前为我的虚拟环境尝试了三个位置,但都不起作用。
项目文件夹:
C:\users\joshu\documents\Code\Sentient-CNC
Home Envs 文件夹
C:\users\joshu\Envs
SublimeREPL 默认 venv 卷
C:\users\joshu\.venv
在我的用户设置中,我设置了 python_virtualenvs_paths 变量:
// Where to look for python virtualenvs
{
"python_virtualenv_paths": [
"~\\Documents\\Code\\Sentient-CNC",
"~\\.venv", // venv.bash https://github.com/wuub/venv
"~\\Envs"
]
}
我认为这并不重要,但我将“/”切换为“\”作为解决问题的一种方法,但它没有改变任何东西。
控制台日志在运行时不会产生任何错误。
我也尝试过先在终端中激活虚拟环境,然后运行 SublimeREPL,但这并没有改变任何东西。
路径信息
来自 Cygwin:
joshua@Josh-Laptop ~
$ which python
/cygdrive/c/Users/joshu/Anaconda3/python
joshua@Josh-Laptop ~
$ where python
C:\Users\joshu\Anaconda3\python.exe
C:\cygwin64\bin\python
来自 cmd:
C:\Users\joshu>where python
C:\cygwin64\bin\python
C:\Users\joshu\Anaconda3\python.exe
C:\Users\joshu>which python
/usr/bin/python
【问题讨论】:
标签: python sublimetext3 virtualenv sublimerepl