Skip to content

Instantly share code, notes, and snippets.

View Kile's full-sized avatar
💭
Minding my own business

Kile Kile

💭
Minding my own business
View GitHub Profile
@krisbolton
krisbolton / vscode-import-could-not-be-resolved-by-pylance.md
Last active September 30, 2025 08:07
VSCode import could not be resolved by Pylance (reportMissingImports)

Problem

Visual Studio Code (VSCode) reports an error (yellow squiggly lines) saying "Import [nameOfModule] could not be resolved by Pylance (reportMissingImports)". You may be using a virtual environment (e.g., venv).

Solution

You need to tell Pylance where pip has installed the module you are trying to import. This is called an "additional path".

  1. Find the location of the module. In the VSCode terminal within your project enter the python interpreter by typing python.
  2. Once the interpreter is active (shown by >>> instead of $ or %) type import [nameOfModule] and press enter.
@domnikl
domnikl / build.yml
Last active December 21, 2024 12:01
GitHub Action Workflow to build a Rust project with tests and clippy
name: main
on:
push:
branches: [ main ]
env:
CARGO_TERM_COLOR: always
jobs:
@shaypal5
shaypal5 / readme_content_in_sphinx.rst
Last active April 11, 2025 22:53
Including parts of README.rst in your sphinx docs