PyCharm interpreter paths for WSL interpreter

Answered

I'm running on Windows and because I had to use some libraries that work only with Windows Subsystem for Linux (WSL) I set PyCharm interpreter to use the one in my WSL. (Following this guide: https://www.jetbrains.com/help/pycharm/using-wsl-as-a-remote-interpreter.html)

Everything works fine except adding a new path (my personal lib) among interpreter paths via PyCharm. The path is on my D drive (D:/projects/data_downloader) so I added it in PyCharm as /mnt/d/projects/data_downloader. After applying, PyCharm still doesn't recognize particular import (Unresolved reference) and when I run Python console, I still cannot import it, it's neither in sys.path nor PYTHONPATH. But when I manually add the path (/mnt/d/projects/data_downloader) to my path in the console, I have no problem with importing this library. Any ideas?

WSL: Ubuntu 18.04.3 LTS
PyCharm: 2019.3.1 (PE)

2
4 comments

Hi Simon,

While trying to reproduce this issue, I've stumbled on another one: https://youtrack.jetbrains.com/issue/PY-40106

Which seems like a regression.

Can you specify how exactly did you add the path to the interpreter? Did you use this dialog: https://www.jetbrains.com/help/pycharm/python-interpreters.html#paths ?

0
Avatar
Permanently deleted user

This appears to still be a bug in the 2020.1 EAP. Just added a WSL interpreter and was able to, at least in the UI, add another interpreter path - but this doesn't seem to actually be looked at or used when generating a skeleton... Searching my idea.log for the given path and I see nothing.

0

The issue is known https://youtrack.jetbrains.com/issue/PY-33295 but, unfortunately, was not addressed yet. Please upvote and feel free to leave comments.

0

I stumbled across the same problem: https://youtrack.jetbrains.com/issue/PY-47145 Running 2020.3.3 Thanks for your post, I can probably close my issue then.

0

Please sign in to leave a comment.