Skip to content

Run Code Cannot Find installed Modules #4505

@jacobwhitten

Description

@jacobwhitten

Environment data

  • VS Code version: 1.31.1
  • Extension version (available under the Extensions sidebar): 2019.1
  • OS and version: Windows 10 1809
  • Python version (& distribution if applicable, e.g. Anaconda): 3.7.2
  • Type of virtual environment used (N/A | venv | virtualenv | conda | ...): venv
  • Relevant/affected Python packages and their versions: all pip installed modules

Expected behaviour

Able to import pip installed packages and run using "Ctrl+Alt+N"

Actual behaviour

Cannot run, however, can debug and copy the executed command in the integrated power shell window. Pylint also appears to find the module. Correct interpreter in the .env folder is selected.

Error in Output Log:

Traceback (most recent call last):
File "c:\Data Drive\Programming\Project1\main.py", line 1, in
import urllib3
ModuleNotFoundError: No module named 'urllib3'

Steps to reproduce:

  1. Set up python per vs code python install.
  2. Create a new virtual env.
  3. Install any module
  4. Import one module.
  5. Run code.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions