Module not found error in Output panel when running Python script via Remote SSH, despite successful execution in the integrated terminal
- Dominant language
- TypeScript
- Stars
- 193k
- Forks
- 42.4k
- PR merge metrics
- PR metrics pending
Description
Does this issue occur when all extensions are disabled?: **No**
- **VS Code Version**: 1.129.1 (user setup)
- **OS Version**: Windows_NT x64 10.0.26200 (Local Client) connecting to Linux Server via Remote SSH
**Steps to Reproduce:**
1. Connect to a remote Linux server using the "Remote - SSH" extension.
2. Open a Python file that requires specific packages installed in a virtual environment (e.g., conda or venv).
3. Ensure the correct Python interpreter is selected in VS Code (bottom-left status bar).
4. Run the script using the "Run Python File" button (top-right play icon) or the command palette.
5. Observe the "Output" panel: It shows `ModuleNotFoundError`.
6. Run the exact same script manually in the integrated terminal (`python test.py`).
7. Observe the "Terminal" panel: It executes successfully without errors.
**Expected Behavior:**
The "Run Python File" action should utilize the same environment and paths as the integrated terminal, successfully finding the installed modules.
**Actual Behavior:**
There is an inconsistency where the "Output" panel fails to locate modules that are clearly installed and accessible in the integrated terminal.
**Additional Context:**
- I am using a Conda environment named `(scrapy-study)` on the remote server.
- The integrated terminal correctly activates this environment (prefix shows `(scrapy-study)`).
- Screenshots attached showing the error in Output vs success in Terminal.
Contributor guide
Assessment
This issue has not been assessed yet.