How to add existing package in Python project in Visual Studio 2017
(for IntelliSense)
It is quite strange and it seems that you have created such folder in its physical path which contains a self-created file called __init__.py
, but it works well in my side and I can get the Intellisense from the new module. You can follow my steps:
Step
1) I have created a folder called package 3
and add a file called __init__.py
under the physical path manually.


2) then open VS, start the project, right-click on it-->Add-->Existing Folder-->add package 3 into it. Then it will import the package 3 folder and its content into Solution Explorer.
3) if you want to use new module in package 3
's __init__.py
, you could use import node in init.py(package 3) :
import module1;

In addition, if Intellisense does not work either, you should close VS Instance, delete .vs
hidden folder under solution folder, then restart the project again to test it. You can try it several times.