leinardi / mypy-pycharm

A plugin providing both real-time and on-demand scanning of Python files with Mypy from within PyCharm/IDEA.
Apache License 2.0
195 stars 31 forks source link

Make the mypy plugin work with mypy installed under WSL when using Windows. #55

Open ashwinkapur opened 4 years ago

ashwinkapur commented 4 years ago

Is your feature request related to a problem? Please describe. I use this plugin on IntelliJ and Pycharm under Windows. My python interpreter and virtual environments are all on WSL, a linux environment that runs under Windows 10. This plugin (and the pylint plugin cannot use a mypy installed in WSL. I give it the right path but I get an error that it cannot execute.

Describe the solution you'd like Enable the use of mypy installed under WSL when running in Windows (and ideally using a remote interpreter)

Describe alternatives you've considered

  1. Install python 3.8.1 on windows, the windows version of pipx and then mypy.exe in windows using pipx. This sort of works but then mypy cannot find the packages I'm using in each project. So I have to manually activate the virtual environment pipx has created for mypy and then install the packages I need under that.

  2. 1 is no better than creating a windows based virtual environment and installing mypy in that so I'm not doing this anymore. I now create a linux virtual environment under WSL and a regular Windows virtual environment only for pylint and mypy which includes the other packages the project uses. Still not great because there are some python packages that I use that cannot be installed under Windows and mypy (and pylint) will complain due to them being missing.

Additional context Ideally you would come up with a general solution that will work with remote python interpreters. Basically I would like to be able to install mypy (and pylint) under a python interpreter on a remote machine and have this plugin use that pylint and mypy when I'm working with a python interpreter on a remote machine.

Thanks for the great mypy and pylint plugins.

stale[bot] commented 4 years ago

This issue has been automatically marked as stale because it has not had activity in the last 60 days.

dbalabka commented 4 years ago

I guess this ticket should not be stale. It is also has a duplicate #53

NKPmedia commented 1 year ago

What's the progress here?

gogognome commented 2 months ago

Is this a duplicte of #110?