0

I'm using VSC Remote Server to access code on a linux server. There I'm trying to import .py files from another directory. I've added the directory to import from to the server's PYTHONPATH via .bashrc and rebooted.

Judging from the syntax highlighting, the files I'm trying to load are being recognized, but then at runtime I get module not found errors.

What could be going wrong? Do I need to supply more info?

Self
  • 1
  • 1
  • 1
    did you restart whatever shell session you were using after editing your .bashrc file? Environment variables are copied from the parent process when the child process is created. They do not pick up updates automatically and dynamically. – starball Mar 02 '23 at 01:10
  • Yup. No avail, unfortunately. And the syntax highlighting does fail to recognize folders not in PYTHONPATH. – Self Mar 02 '23 at 06:31
  • Can [this answer](https://stackoverflow.com/a/67843008/18359438) solve your issue? – MingJie-MSFT Mar 02 '23 at 06:52
  • @MingJie-MSFT Unfortunately, no. Tried that one and a few others in that thread, using linux-equivalent names + rebooting the server. Also added the directory in question to "python.analysis.extraPaths" (and rebooted), but no change. – Self Mar 02 '23 at 11:41

0 Answers0