admin管理员组

文章数量:1399006

After creating the project.toml for my project and building it with pip install -e packgedir, it is not being recognized by Pylance in VSCode. The problem do not happen for a standard installation (pip install packgedir), but I want to use the editable mode. Do you know what's wrong?

The Pylance warning: warning

The basic structure of my project:

packgedir/
├── LICENSE
├── pyproject.toml
├── README.md
├── VERSION
├── packge/
    ├── __init__.py
    └── file.py

pyproject.toml:

[build-system]
build-backend = "setuptools.build_meta"
requires = ["setuptools >= 75"]

[project]
name = "packge"
dynamic = ["version"]
description = "Test Package"
readme = "README.md"
authors = [
    {name = "author_name", email = "[email protected]"}
]
requires-python = ">=3.8"
dependencies = [
    "numpy >= 1.2.2",
]
license = {file = "LICENSE"}
classifiers = [
    "Intended Audience :: Developers",
    "License :: OSI Approved :: MIT License",
    "Programming Language :: Python",
]

[tool.setuptools.dynamic]
version = {file = "VERSION"}

I also tried to use a minimal, empty, setuptools.setup() into a setup.py together with the pyproject.toml and didn't solve.

本文标签: pythonPylance can39t recognize installed package built in editable mode using pyprojecttomlStack Overflow