所以我安装在[我的Windows 10]上:
我正在尝试使用 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:\用户\上州\文件\代码\森廷-CNC
首页Envs文件夹
C:\用户\上州\ ENVS
SublimeREPL默认venv volder
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"
]
}
我认为这不重要,但我改变了&#39; /&#39;到&#39; \&#39;作为解决我的问题的一种方法,但它没有改变任何东西。
运行此控制台日志时,控制台日志不会生成任何错误。
我还尝试首先在终端中激活虚拟环境,然后运行SublimeREPL,但这并没有改变任何内容。
:
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
答案 0 :(得分:0)
在cmd终端中,使用conda create在我的Anaconda包中创建虚拟环境:
conda create venv
在Sublime Text 3中,导航到SublimeREPL包设置,并添加到Anaconda conda virtualenv文件夹的路径:
// Where to look for python virtualenvs
{
"python_virtualenv_paths": [
"~\\Anaconda3\\envs"
]
}
当您从sublimeREPL菜单中选择python-virtualenv时,您应该能够选择之前创建的虚拟环境,并且REPL应该将其加载并运行。