Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Anaconda activating after first run of debugger #3124

Closed
lynchkp opened this issue Oct 2, 2019 · 1 comment
Closed

Anaconda activating after first run of debugger #3124

lynchkp opened this issue Oct 2, 2019 · 1 comment
Assignees

Comments

@lynchkp
Copy link

lynchkp commented Oct 2, 2019

I'm trying to run the debugger on simple python scripts with Anaconda 3.7.3, VSCode 1.38.1, and Python extension 2019.9.34911. I notice that when the debugger is run "fresh," i.e., opening up a new integrated terminal, the command to run the debugger executes first, fails, then the command to activate the conda environment runs. It is not a huge problem, because I can run the debugger afterwards without an error because the environment has been activated. However, it is distracting and can confuse a new user. How can the activation code run before the debugger is called?

Thanks!

See below for output of the python debug console,

Microsoft Windows [Version 10.0.17134.1009]
(c) 2018 Microsoft Corporation. All rights reserved.

c:\Users\k\Desktop\test>C:\Users\k\AppData\Local\Continuum\anaconda3\python.exe c:\Users\k\.vscode\extensions\ms-python.python-2019.9.34911\pythonFiles\ptvsd_launcher.py --default --client --host localhost --port 57897 c:\Users\k\Desktop\test\test.py
Traceback (most recent call last):
  File "c:\Users\k\.vscode\extensions\ms-python.python-2019.9.34911\pythonFiles\ptvsd_launcher.py", line 43, in <module>
    main(ptvsdArgs)
  File "c:\Users\k\.vscode\extensions\ms-python.python-2019.9.34911\pythonFiles\lib\python\ptvsd\__main__.py", line 432, in main
    run()
  File "c:\Users\k\.vscode\extensions\ms-python.python-2019.9.34911\pythonFiles\lib\python\ptvsd\__main__.py", line 316, in run_file
    runpy.run_path(target, run_name='__main__')
  File "C:\Users\k\AppData\Local\Continuum\anaconda3\lib\runpy.py", line 263, in run_path
    pkg_name=pkg_name, script_name=fname)
  File "C:\Users\k\AppData\Local\Continuum\anaconda3\lib\runpy.py", line 96, in _run_module_code
    mod_name, mod_spec, pkg_name, script_name)
  File "C:\Users\k\AppData\Local\Continuum\anaconda3\lib\runpy.py", line 85, in _run_code
    exec(code, run_globals)
  File "c:\Users\k\Desktop\test\test.py", line 1, in <module>
    import numpy
  File "C:\Users\k\AppData\Local\Continuum\anaconda3\lib\site-packages\numpy\__init__.py", line 140, in <module>
    from . import _distributor_init
  File "C:\Users\k\AppData\Local\Continuum\anaconda3\lib\site-packages\numpy\_distributor_init.py", line 34, in <module>
    from . import _mklinit
ImportError: DLL load failed: The specified module could not be found.

c:\Users\k\Desktop\test>C:/Users/k/AppData/Local/Continuum/anaconda3/Scripts/activate.bat

(base) c:\Users\k\Desktop\test>
@DonJayamanne
Copy link
Contributor

This is a duplicate of the issue microsoft/vscode-python#5559

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants