Intellisense in python tools for visual studio
Asked Answered
C

2

13

Sorry if this seems like a noob question but I have never used visual studio. I am trying to use PTVS and while it works great in general, I can't get Intellisense to work for imports from the local directory. When I import a local module I get

Unable to resolve (module). Intellisense may be missing for this module

Thanks in advance

Chagrin answered 23/9, 2014 at 16:17 Comment(4)
You just need to refresh the Database. It works for me. Check to make sure the environment options are set (specifically path variable to PYTHONPATH) and the DB is refreshedGiza
Refreshing the DB only adds modules in the python lib directory. My problem is with modules in the local directory.Chagrin
I actually just solved the problem. All i had to do was add the file I was importing to the Project file list in Visual StudioChagrin
Could you explain in more detail what you mean by that? I'm having this issue right now, and I'm not sure I understand what you meant here.Katzenjammer
I
3

I also experienced that issue even if I had added all my files to the project. Deleting the __init__.py file in my source root directory did the trick, see this issue on the PTVS repository.

Infusion answered 8/2, 2015 at 20:53 Comment(0)
D
3

Restart just worked for me. ;)

Danettedaney answered 17/3, 2018 at 16:45 Comment(0)

© 2022 - 2025 — McMap. All rights reserved.