Apr-10-2022, 01:54 PM
New to the forum and Python and struggling to search with the right terminology to fix this s issue or if it's possible. When I install a custom module using pip, should intellisense work for shorthand use of that module in Visual Studio Code IDE when using an import Alias as below? Intelisense otherwise works fine and I've installed the Python extension which includes Pylance and works fine for native modules. Native and installed modules are all in the same global folder where pip installs by default, PATH set for Windows. Python --version 3.10.4
No intellisense
import mediapipe as mp
mp_face_mesh = mp.solutions.face_mesh
If I explicitly go through the entire module Intellisense works
import mediapipe as mp
mp_face_mesh = mp.solutions.mediapipe.python.solutions.face_mesh
Here's the 'show' from pip of this particular module
C:\Users\skhoc>pip show mediapipe
Name: mediapipe
Version: 0.8.9.1
Summary: MediaPipe is the simplest way for researchers and developers to build world-class ML solutions and applications for mobile, edge, cloud and the web.
Home-page: https://github.com/google/mediapipe
Author: The MediaPipe Authors
Author-email: [email protected]
License: Apache 2.0
Location: c:\users\skhoc\appdata\local\packages\pythonsoftwarefoundation.python.3.10_qbz5n2kfra8p0\localcache\local-packages\python310\site-packages
Requires: absl-py, attrs, matplotlib, numpy, opencv-contrib-python, protobuf
Required-by:
No intellisense
import mediapipe as mp
mp_face_mesh = mp.solutions.face_mesh
If I explicitly go through the entire module Intellisense works
import mediapipe as mp
mp_face_mesh = mp.solutions.mediapipe.python.solutions.face_mesh
Here's the 'show' from pip of this particular module
C:\Users\skhoc>pip show mediapipe
Name: mediapipe
Version: 0.8.9.1
Summary: MediaPipe is the simplest way for researchers and developers to build world-class ML solutions and applications for mobile, edge, cloud and the web.
Home-page: https://github.com/google/mediapipe
Author: The MediaPipe Authors
Author-email: [email protected]
License: Apache 2.0
Location: c:\users\skhoc\appdata\local\packages\pythonsoftwarefoundation.python.3.10_qbz5n2kfra8p0\localcache\local-packages\python310\site-packages
Requires: absl-py, attrs, matplotlib, numpy, opencv-contrib-python, protobuf
Required-by: