Thanks to visit codestin.com
Credit goes to github.com

Skip to content

--python-version broken on mypy 0.590 #4923

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
amyreese opened this issue Apr 17, 2018 · 2 comments
Closed

--python-version broken on mypy 0.590 #4923

amyreese opened this issue Apr 17, 2018 · 2 comments

Comments

@amyreese
Copy link
Contributor

With mypy 0.580 and python 3.6, I can run:

$ mypy --python-version 3.5 <module>

This worked fine, and would catch things like use of f-strings that aren't back-compatible.

With mypy 0.590 however, this breaks with the following error:

mypy: error: Error: failed to find a Python executable matching version (3, 5), perhaps try --python-executable, or --no-site-packages?

I am running this against latest master from https://github.com/jreese/aiosqlite

Full repro: https://gist.github.com/jreese/c20759267e08aa45b7ce4a29747f5337

@JelleZijlstra
Copy link
Member

You need to add the --no-site-packages flag to run mypy for a specific version without an accessible executable.

@amyreese
Copy link
Contributor Author

Yep, that did it. I saw that suggestion in the error message (on travis) and tried it on my local machine, but it claimed that didn't exist. Turns out, I still had an old version of mypy installed locally when testing that fix, and didn't retest that fix while generating the repro.

Sorry for the noise. Cheers!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants