mypy-pycharm: Unable to configure mypy binary on Linux

Step 1: Are you in the right place?

  • I have verified there are no duplicate active or recent bugs, questions, or requests
  • I have verified that I am using the latest version of the plugin.

Step 2: Describe your environment

  • Plugin version: 0.10.2
  • PyCharm/IDEA version: 2018.2.4 (CE)
  • Mypy version: 0.641

Step 3: Describe the problem:

Steps to reproduce:

  1. I am using Ubuntu/Debian based distro
  2. I have both python2 and python3 installed
  3. Installed python3-pip
  4. installed mypy using pip3 install mypy
  5. Properly installed in /usr/local/bin/mypy
  6. above path is in $PATH
  7. mypy runs when started from shell
  8. Attempt to configure your plugin with either mypy or /usr/local/bin/mypy as mypy binary does not work (test fails) with Mypy Plugin: Failure: executable "mypy" not found.

This looks similar to #12

About this issue

  • Original URL
  • State: open
  • Created 6 years ago
  • Comments: 19 (2 by maintainers)

Most upvoted comments

I ran into a similar issue, it was because it was using the python binary in my venv to execute the global mypy installed with pip3. I had to install mypy in my venv and then I had to provide the path to that mypy in the “Path to Mypy executable” setting.

This managed to fix the issue for me. I belive my pipenv enviroment appears twice in PyCharm. When I select the second one (see screenshot), it even automatically detected the package. image

It seems like a lot of people are running into this same basic problem. Issues #18 and #26 are basically the same.