简体   繁体   中英

Vscode python interactive window timed out on running python script on other conda environment apart from base environment

In vscode, While running my python script on interactive python window in other conda environment (apart from base environment), I get the following error - 'Timed out waiting to get a heartbeat from kernel process.'

Script works fine in base environment but not in other envrionments. Also, this is specific for python interactive window. It works fine in terminal.

Has anyone faced this issue as well?

According to your description, code works fine in base environment and terminal, while got error in other conda and interactive window. So try to solve the problem with following steps:

  1. Create a new conda environment, reference: python-environments
  2. To use the window with a.py file, select the Run Current File in Python Interactive window command from the Command Palette. More information and details you can reference: python-interactive.
  3. Here you'll get the output. The following is a demo screenshot. 在此处输入图像描述

Considering your question is related to python extension, if the above not work, reinstall python extension and try again.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM