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

Pavel Minaev
  • 99,783
  • 25
  • 219
  • 289
mpardalos
  • 171
  • 1
  • 1
  • 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 refreshed – ashwinjv Sep 23 '14 at 16:54
  • Refreshing the DB only adds modules in the python lib directory. My problem is with modules in the local directory. – mpardalos Sep 23 '14 at 18:39
  • 1
    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 Studio – mpardalos Sep 24 '14 at 15:18
  • 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. – melwil Feb 11 '18 at 22:57

2 Answers2

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.

0x8BADF00D
  • 962
  • 1
  • 8
  • 18
3

Restart just worked for me. ;)

Grzegorz Smulko
  • 2,525
  • 1
  • 29
  • 42