Follow

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use
Contact

Why isn't autocompleteworking in vscode for python external packages?

I am new to python and I guess pyCharm is the most preferred IDE for python but I want to stick to vscode if possible. I have the python extension installed in vscode and autocomplete works fine for default python packages but for external packages like pillow or PyPDF2, its not working.
I created a virtual environment where I installed the above 2 packages using pip and even checked if the packages are installed using pip freeze.
Pip freeze is showing:

Pillow==9.0.1

PyPDF2==1.26.0

MEDevel.com: Open-source for Healthcare and Education

Collecting and validating open-source software for healthcare, education, enterprise, development, medical imaging, medical records, and digital pathology.

Visit Medevel

Below is my project structure. I need to import PyPDF2 module from basic.py. Also, if it helps, I am using python 3.9.6. Any help or suggestions are greatly appreciated.

enter image description here

>Solution :

Did you select the interpreter inside the vscode?
Enter vscode and type

ctrl+shift+p

and type in command prompt

>python:Select Interpreter

and then activate the Interpreter.
This will do the trick for you.

Add a comment

Leave a Reply

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use

Discover more from Dev solutions

Subscribe now to keep reading and get access to the full archive.

Continue reading