Referencing Python Unix-only Standard Library Modules (e.g. pwd, grp) from Windows?

For the project I'm currently working on, I'm developing on a Windows machine, but much of the code I'm working on is intended to be run on Linux machines, and some of it makes use of Unix-only standard library modules, such as pwd and grp. PyCharm, however, does not recognise these modules, marking them as 'Module not found' errors.

Is there any way to install these libraries, at least in stub format, so that PyCharm will recognise them and be able to offer code completion and inline help as normal?

I'm currently running PyCharm 2019.3.3 Community Edition, using the Python 3.7.3 64-bit Windows version.

3 comments
Comment actions Permalink

It seems the better way would be to develop on the Linux remotely. There's a bunch of options available:

- SSH interpreter

- WSL interpreter

- Docker/Vagrant support

All of which can run the code inside the Linux environment while being developed on Windows.

0
Comment actions Permalink

Andrey Resler I'm already using a remote Linux machine to test and run the code. My only concern here is getting PyCharm to acknowledge these libraries in the editor window.

Or are you saying configuring a remote interpreter would allow PyCharm to use its libraries for code completion and such? Unfortunately, I'm running PyCharm Community Edition, and remote interpreter support is Profession Edition-only.

0
Comment actions Permalink

>Or are you saying configuring a remote interpreter would allow PyCharm to use its libraries for code completion and such?

That's right. But this is available only in Pro version.

0

Please sign in to leave a comment.