IDEA 14/Python Plug-in Remote Interpreter/"Local" Python package resolution issues

Hi,

I have a file structure like this on a remote machine called supercell:

py/util/units.py
py/util/__init__.py


py/vantage/vantage.py
py/vantage/__init__.py

I run my app from the command line (on supercell) with PYTHONPATH set to py thus:
$ python -m vantage.vantage

... and it works fine.

I want to run Intellij on another machine (a Mac) but edit the files on supercell. To do this I took the following approach:

  • Remote mount supercell:/home/<my-username> on my Mac.
  • Create a New Project.
  • Import utils and vantage from the remote mounted folder using File/Import Module...
  • Set-up a Remote Python interpreter, set it as the Project Interpreter and ensure it's specified on each of the two modules.


vantage.py has this line in it:

import util.units

In the IDE this is show as unresolved. All standard Python imports (e.g. ctypes, collections etc) all resolve correctly.

There's something wrong with my configuration of Intellij I guess. Any ideas? Is this the wrong approach? Does anyone have something similar working successfully?

Thanks i advance for any thoughts,

Andy

2 comments
Comment actions Permalink

I have discovered that if I import py as a Module it works better, then some of the modules under py resolve. However others don't. It's as if there's a cache I need to clear or refresh somewhere....

0
Comment actions Permalink

... OK, so I removed all the Python modules from the project and re-added them and it started working properly. I wish I knew where the "cache refresh" button was!

0

Please sign in to leave a comment.