mfussenegger / nvim-dap-python

An extension for nvim-dap, providing default configurations for python and methods to debug individual test methods or classes.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

python not found in virtual environment

c30ra opened this issue · comments

On Windows, it can't find the python executable, cause it searches for python3. On Windows, usually there is no python3 executable installed.

I've temporary fixed it by rename the python executable from python.exe to python3.exe.

I'm doing something wrong or nvim-dap-python really expect a python3.exe on Windows??

It doesn't look for a python3.exe

return venv .. '\\Scripts\\python.exe'

return venv_path .. '\\python.exe'

Thanks for the the quick reply! Once I'm back home I'll double check my configuration. Today I managed to make it work only by renaming the executable. The error it gave me was something like: ENOENT: python3 file not found or something similar..

I confirm that there is nothing on my nvim config that set python3

Well, the only other python3 occurrance is for the python that's used to run the debugpy adapter itself, which you can configure with the setup method.

See

adapter_python_path = adapter_python_path and vim.fn.expand(vim.fn.trim(adapter_python_path), true) or 'python3'

Otherwise it has to come from your configuration.