You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Extension version (available under the Extensions sidebar): 2018.6.0
OS and version: Windows 10 Enterprise 1703
Python version (& distribution if applicable, e.g. Anaconda): Anaconda Python 2.7.14
Type of virtual environment used (N/A | venv | virtualenv | conda | ...): conda
Relevant/affected Python packages and their versions: XXX
Actual behavior
Debugger is not activating the Anaconda environment before starting. I get an ImportError which is due to the conda environment not being properly activated when debugging. If I try the same file from the terminal launched via "Python: Create Terminal" it loads the environment properly and works.
ImportError: DLL load failed: The specified module could not be found.
Expected behavior
When launching a debug process against an anaconda environment, the python extension should activate the environment similar to how it works when you use the "Python: Create Terminal" or "Python: Run Python File in Terminal" commands before starting to debug.
Steps to reproduce:
Open VSCode.
Open the python file with import that requires loading DLLs (in this case gurobipy but I've had similar issues with opencv and other packages)
Run default debug "Python: Current File"
Error occurs.
Logs
Output for Python in the Output panel (View→Output, change the drop-down the upper-right of the Output panel to Python)
Traceback (most recent call last):
File "c:\Repos\Package\script.py", line 12, in <module>
from gurobipy import *
File "C:\Users\username\AppData\Local\Continuum\anaconda2\lib\site-packages\gurobipy\__init__.py", line 1, in <module>
from .gurobipy import *
ImportError: DLL load failed: The specified module could not be found.
Output from Console under the Developer Tools panel (toggle Developer Tools on under Help)
Python Extension: Failed to get conda environment list from conda Error: spawn conda ENOENT
at exports._errnoException (util.js:1050:11)
at Process.ChildProcess._handle.onexit (internal/child_process.js:193:32)
at onErrorNT (internal/child_process.js:367:16)
at _combinedTickCallback (internal/process/next_tick.js:80:11)
at process._tickCallback (internal/process/next_tick.js:104:9)
The text was updated successfully, but these errors were encountered:
Environment data
Actual behavior
Debugger is not activating the Anaconda environment before starting. I get an ImportError which is due to the conda environment not being properly activated when debugging. If I try the same file from the terminal launched via "Python: Create Terminal" it loads the environment properly and works.
ImportError: DLL load failed: The specified module could not be found.
Expected behavior
When launching a debug process against an anaconda environment, the python extension should activate the environment similar to how it works when you use the "Python: Create Terminal" or "Python: Run Python File in Terminal" commands before starting to debug.
Steps to reproduce:
Logs
Output for
Python
in theOutput
panel (View
→Output
, change the drop-down the upper-right of theOutput
panel toPython
)Output from
Console
under theDeveloper Tools
panel (toggle Developer Tools on underHelp
)The text was updated successfully, but these errors were encountered: