Skip to content

MyPy install fails after upgrade to python 3.9.0 #9581

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
pjljvandelaar opened this issue Oct 12, 2020 · 3 comments
Closed

MyPy install fails after upgrade to python 3.9.0 #9581

pjljvandelaar opened this issue Oct 12, 2020 · 3 comments
Labels
bug mypy got something wrong

Comments

@pjljvandelaar
Copy link

Today I installed mypy under python 3.8.5 - no problem
then I updated to python 3.9.0, and installation of mypy fails:

PS C:\Users\laarpjljvd> pip install mypy
Collecting mypy
  Using cached mypy-0.790-py3-none-any.whl (2.4 MB)
Collecting typing-extensions>=3.7.4
  Using cached typing_extensions-3.7.4.3-py3-none-any.whl (22 kB)
Collecting typed-ast<1.5.0,>=1.4.0
  Using cached typed_ast-1.4.1.tar.gz (208 kB)
Collecting mypy-extensions<0.5.0,>=0.4.3
  Using cached mypy_extensions-0.4.3-py2.py3-none-any.whl (4.5 kB)
Using legacy 'setup.py install' for typed-ast, since package 'wheel' is not installed.
Installing collected packages: typing-extensions, typed-ast, mypy-extensions, mypy
    Running setup.py install for typed-ast ... error
    ERROR: Command errored out with exit status 1:
     command: 'c:\users\laarpjljvd\appdata\local\programs\python\python39\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\laarpjljvd\\AppData\\Local\\Temp\\pip-install-2a6r9tqw\\typed-ast\\setup.py'"'"'; __file__='"'"'C:\\Users\\laarpjljvd\\AppData\\Local\\Temp\\pip-install-2a6r9tqw\\typed-ast\\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record 'C:\Users\laarpjljvd\AppData\Local\Temp\pip-record-kl5fc1ru\install-record.txt' --single-version-externally-managed --compile --install-headers 'c:\users\laarpjljvd\appdata\local\programs\python\python39\Include\typed-ast'
         cwd: C:\Users\laarpjljvd\AppData\Local\Temp\pip-install-2a6r9tqw\typed-ast\
    Complete output (16 lines):
    running install
    running build
    running build_py
    creating build
    creating build\lib.win-amd64-3.9
    creating build\lib.win-amd64-3.9\typed_ast
    copying typed_ast\ast27.py -> build\lib.win-amd64-3.9\typed_ast
    copying typed_ast\ast3.py -> build\lib.win-amd64-3.9\typed_ast
    copying typed_ast\conversions.py -> build\lib.win-amd64-3.9\typed_ast
    copying typed_ast\__init__.py -> build\lib.win-amd64-3.9\typed_ast
    package init file 'ast3\tests\__init__.py' not found (or not a regular file)
    creating build\lib.win-amd64-3.9\typed_ast\tests
    copying ast3\tests\test_basics.py -> build\lib.win-amd64-3.9\typed_ast\tests
    running build_ext
    building '_ast27' extension
    error: Microsoft Visual C++ 14.0 is required. Get it with "Build Tools for Visual Studio": https://visualstudio.microsoft.com/downloads/
    ----------------------------------------
ERROR: Command errored out with exit status 1: 'c:\users\laarpjljvd\appdata\local\programs\python\python39\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\laarpjljvd\\AppData\\Local\\Temp\\pip-install-2a6r9tqw\\typed-ast\\setup.py'"'"'; __file__='"'"'C:\\Users\\laarpjljvd\\AppData\\Local\\Temp\\pip-install-2a6r9tqw\\typed-ast\\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record 'C:\Users\laarpjljvd\AppData\Local\Temp\pip-record-kl5fc1ru\install-record.txt' --single-version-externally-managed --compile --install-headers 'c:\users\laarpjljvd\appdata\local\programs\python\python39\Include\typed-ast' Check the logs for full command output.
PS C:\Users\laarpjljvd>
@pjljvandelaar pjljvandelaar added the bug mypy got something wrong label Oct 12, 2020
@pjljvandelaar
Copy link
Author

Note: I have the following C++ installed and that was always more than enough:
image

@pjljvandelaar
Copy link
Author

Seems like an issue in typed-ast.
See python/typed_ast#146
Typed-ast will not support python > 3.8, so mypy should look for an alternative?

@hauntsaninja
Copy link
Collaborator

Thanks, duplicate of #9488

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

No branches or pull requests

2 participants