0

My question: I have introduced pre compiled protubuf file packages into the project, but due to certain reasons, these packages cannot be placed in the current project directory, so the intelligent perception and code prompt functions of vscode are invalid

Attempts made: I configured 'Python.autoComplete.extraPaths' in the settings directory, but it didn't work

Currently allocated:

Project folder path:~/project/test

_pb2.py path: ~/proto/protos/xx_pb2.py

Python.autoComplete.extraPaths config: ["~/proto/protos","~/proto/protos/xx_pb2.py"]

May I ask if anyone can help me? Thank you very much

Dylan
  • 17
  • 3
  • Resolved, just configure python.analysis.extraPaths – Dylan Jul 26 '23 at 06:12
  • Does this answer your question? ['Import "Path.to.own.script" could not be resolved Pylance (reportMissingImports)' in VS Code using Python 3.x on Ubuntu 20.04 LTS](https://stackoverflow.com/questions/65252074/import-path-to-own-script-could-not-be-resolved-pylance-reportmissingimports) – starball Jul 26 '23 at 23:13

1 Answers1

0

Use the following configuration:

    "python.analysis.extraPaths": [
        "input/path/here"
    ],
JialeDu
  • 6,021
  • 2
  • 5
  • 24