Skip to content
This repository has been archived by the owner on Jul 5, 2023. It is now read-only.

Error installing on Windows with Python 3.8 #126

Closed
zed-g opened this issue Oct 16, 2019 · 5 comments
Closed

Error installing on Windows with Python 3.8 #126

zed-g opened this issue Oct 16, 2019 · 5 comments

Comments

@zed-g
Copy link

zed-g commented Oct 16, 2019

I encountered this problem trying to install mypy: When I try to install Typed AST in Windows 7 in a new Python 3.8 environment with

python.exe -m pip install --user typed-ast

I run into an error:

Collecting typed-ast
  Using cached https://files.pythonhosted.org/packages/34/de/d0cfe2ea7ddfd8b2b8374ed2e04eeb08b6ee6e1e84081d151341bba596e5/typed_ast-1.4.0.tar.gz
Installing collected packages: typed-ast
    Running setup.py install for typed-ast: started
    Running setup.py install for typed-ast: finished with status 'error'
    ERROR: Command errored out with exit status 1:
     command: 'C:\Users\user\AppData\Local\Programs\Python\Python38-32\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\user\\AppData\\Local\\Temp\\pip-install-iwbwixcb\\typed-ast\\setup.py'"'"'; __file__='"'"'C:\\Users\\user\\AppData\\Local\\Temp\\pip-install-iwbwixcb\\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\user\AppData\Local\Temp\pip-record-r3_rbm3b\install-record.txt' --single-version-externally-managed --compile --user --prefix=
         cwd: C:\Users\user\AppData\Local\Temp\pip-install-iwbwixcb\typed-ast\
    Complete output (75 lines):
    running install
    running build
    [...]
    C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\VC\Tools\MSVC\14.22.27905\bin\HostX86\x86\link.exe /nologo /INCREMENTAL:NO /LTCG /DLL /MANIFEST:EMBED,ID=2 /MANIFESTUAC:NO /LIBPATH:C:\Users\user\AppData\Local\Programs\Python\Python38-32\libs /LIBPATH:C:\Users\user\AppData\Local\Programs\Python\Python38-32\PCbuild\win32 "/LIBPATH:C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\VC\Tools\MSVC\14.22.27905\lib\x86" "/LIBPATH:C:\Program Files (x86)\Windows Kits\10\lib\10.0.18362.0\ucrt\x86" "/LIBPATH:C:\Program Files (x86)\Windows Kits\10\lib\10.0.18362.0\um\x86" /EXPORT:PyInit__ast27 build\temp.win32-3.8\Release\ast27/Parser/acceler.obj build\temp.win32-3.8\Release\ast27/Parser/bitset.obj build\temp.win32-3.8\Release\ast27/Parser/grammar.obj build\temp.win32-3.8\Release\ast27/Parser/grammar1.obj build\temp.win32-3.8\Release\ast27/Parser/node.obj build\temp.win32-3.8\Release\ast27/Parser/parser.obj build\temp.win32-3.8\Release\ast27/Parser/parsetok.obj build\temp.win32-3.8\Release\ast27/Parser/tokenizer.obj build\temp.win32-3.8\Release\ast27/Python/asdl.obj build\temp.win32-3.8\Release\ast27/Python/ast.obj build\temp.win32-3.8\Release\ast27/Python/graminit.obj build\temp.win32-3.8\Release\ast27/Python/mystrtoul.obj build\temp.win32-3.8\Release\ast27/Python/Python-ast.obj build\temp.win32-3.8\Release\ast27/Custom/typed_ast.obj /OUT:build\lib.win32-3.8\typed_ast\_ast27.cp38-win32.pyd /IMPLIB:build\temp.win32-3.8\Release\ast27/Parser\_ast27.cp38-win32.lib

    build\temp.win32-3.8\Release\ast27\Parser\grammar.obj : fatal error LNK1000: Internal error during IMAGE::Pass1

      Version 14.22.27905.0

      ExceptionCode            = C0000005
      ExceptionFlags           = 00000000
      ExceptionAddress         = 639B77BE (639A0000) "C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\VC\Tools\MSVC\14.22.27905\bin\HostX86\x86\tbbmalloc.dll"
      NumberParameters         = 00000002
      ExceptionInformation[ 0] = 00000000
      ExceptionInformation[ 1] = A39D44F8

    CONTEXT:
      Eax    = 0FFFFFFE  Esp    = 003FE304
      Ebx    = 639C0E20  Ebp    = 02523B80
      Ecx    = 00000000  Esi    = 02553FA0
      Edx    = 02523BE0  Edi    = 02523B80
      Eip    = 639B77BE  EFlags = 00010A02
      SegCs  = 00000023  SegDs  = 0000002B
      SegSs  = 0000002B  SegEs  = 0000002B
      SegFs  = 00000053  SegGs  = 0000002B
      Dr0    = 00000000  Dr3    = 00000000
      Dr1    = 00000000  Dr6    = 00000000
      Dr2    = 00000000  Dr7    = 00000000
    error: command 'C:\\Program Files (x86)\\Microsoft Visual Studio\\2019\\BuildTools\\VC\\Tools\\MSVC\\14.22.27905\\bin\\HostX86\\x86\\link.exe' failed with exit status 1000
    ----------------------------------------
ERROR: Command errored out with exit status 1: 'C:\Users\user\AppData\Local\Programs\Python\Python38-32\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\user\\AppData\\Local\\Temp\\pip-install-iwbwixcb\\typed-ast\\setup.py'"'"'; __file__='"'"'C:\\Users\\user\\AppData\\Local\\Temp\\pip-install-iwbwixcb\\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\user\AppData\Local\Temp\pip-record-r3_rbm3b\install-record.txt' --single-version-externally-managed --compile --user --prefix= Check the logs for full command output.

I have attached the full output. Maybe this is similar to #102, since https://pypi.org/project/typed-ast/#files shows no wheels at all for Python 3.8?

@clbarnes
Copy link

Issue also seems to be present on linux (ubuntu 16.04):

pip install -q -r django/requirements-test.txt

  ERROR: Command errored out with exit status 1:

   command: /home/travis/virtualenv/python3.8-dev/bin/python -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-sm0kbo4m/typed-ast/setup.py'"'"'; __file__='"'"'/tmp/pip-install-sm0kbo4m/typed-ast/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' bdist_wheel -d /tmp/pip-wheel-rd5sdnis --python-tag cp38

       cwd: /tmp/pip-install-sm0kbo4m/typed-ast/

  Complete output (21 lines):

  running bdist_wheel

  running build

  running build_py

  creating build

  creating build/lib.linux-x86_64-3.8

  creating build/lib.linux-x86_64-3.8/typed_ast

  copying typed_ast/ast27.py -> build/lib.linux-x86_64-3.8/typed_ast

  copying typed_ast/conversions.py -> build/lib.linux-x86_64-3.8/typed_ast

  copying typed_ast/ast3.py -> build/lib.linux-x86_64-3.8/typed_ast

  copying typed_ast/__init__.py -> build/lib.linux-x86_64-3.8/typed_ast

  running build_ext

  building '_ast27' extension

  creating build/temp.linux-x86_64-3.8

  creating build/temp.linux-x86_64-3.8/ast27

  creating build/temp.linux-x86_64-3.8/ast27/Parser

  creating build/temp.linux-x86_64-3.8/ast27/Python

  creating build/temp.linux-x86_64-3.8/ast27/Custom

  gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -g -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security -fPIC -Iast27/Include -I/opt/python/3.8-dev/include/python3.8 -c ast27/Parser/acceler.c -o build/temp.linux-x86_64-3.8/ast27/Parser/acceler.o

  ast27/Parser/acceler.c:13:25: fatal error: pgenheaders.h: No such file or directory

  compilation terminated.

  error: command 'gcc' failed with exit status 1

  ----------------------------------------

  ERROR: Failed building wheel for typed-ast

    ERROR: Command errored out with exit status 1:

     command: /home/travis/virtualenv/python3.8-dev/bin/python -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-sm0kbo4m/typed-ast/setup.py'"'"'; __file__='"'"'/tmp/pip-install-sm0kbo4m/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 /tmp/pip-record-_q9twlrj/install-record.txt --single-version-externally-managed --compile --install-headers /home/travis/virtualenv/python3.8-dev/include/site/python3.8/typed-ast

         cwd: /tmp/pip-install-sm0kbo4m/typed-ast/

    Complete output (21 lines):

    running install

    running build

    running build_py

    creating build

    creating build/lib.linux-x86_64-3.8

    creating build/lib.linux-x86_64-3.8/typed_ast

    copying typed_ast/ast27.py -> build/lib.linux-x86_64-3.8/typed_ast

    copying typed_ast/conversions.py -> build/lib.linux-x86_64-3.8/typed_ast

    copying typed_ast/ast3.py -> build/lib.linux-x86_64-3.8/typed_ast

    copying typed_ast/__init__.py -> build/lib.linux-x86_64-3.8/typed_ast

    running build_ext

    building '_ast27' extension

    creating build/temp.linux-x86_64-3.8

    creating build/temp.linux-x86_64-3.8/ast27

    creating build/temp.linux-x86_64-3.8/ast27/Parser

    creating build/temp.linux-x86_64-3.8/ast27/Python

    creating build/temp.linux-x86_64-3.8/ast27/Custom

    gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -g -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security -fPIC -Iast27/Include -I/opt/python/3.8-dev/include/python3.8 -c ast27/Parser/acceler.c -o build/temp.linux-x86_64-3.8/ast27/Parser/acceler.o

    ast27/Parser/acceler.c:13:25: fatal error: pgenheaders.h: No such file or directory

    compilation terminated.

    error: command 'gcc' failed with exit status 1

    ----------------------------------------

ERROR: Command errored out with exit status 1: /home/travis/virtualenv/python3.8-dev/bin/python -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-sm0kbo4m/typed-ast/setup.py'"'"'; __file__='"'"'/tmp/pip-install-sm0kbo4m/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 /tmp/pip-record-_q9twlrj/install-record.txt --single-version-externally-managed --compile --install-headers /home/travis/virtualenv/python3.8-dev/include/site/python3.8/typed-ast Check the logs for full command output.

@msullivan
Copy link
Collaborator

OK ugh. I'll look into this.

Part of the issue here is that we just haven't built wheels yet, which is expected and is waiting on appveyor having 3.8.

I'm pretty confused about that linux failure though because we run 3.8-dev in CI so it definitely works??

@clbarnes
Copy link

Yes, I can pip install typed_ast on python 3.8 locally. It turns out we are using an older version of mypy (0.650), which depends on an old version of typed_ast (<1.2.0), which is what's causing the problem. Call that an issue on our end, then.

@msullivan
Copy link
Collaborator

I've released 3.8 wheels for typed_ast 1.4.0.
Any earlier versions unfortunately won't work on Python 3.8. If anybody desperately needs a 1.2.x or 1.3.x that works on 3.8 I would probably accept backports onto those branches but I really hope nobody does.

@zed-g
Copy link
Author

zed-g commented Oct 17, 2019

I've released 3.8 wheels for typed_ast 1.4.0.

Thanks a lot for the quick response! Everything works as expected now.

andy-maier added a commit to andy-maier/python-yagot that referenced this issue Mar 7, 2020
Details:

* Building the wheel for typed-ast fails with an error that was already
  reported to typed-ast as python/typed_ast#121
  but was decided not to be fixed because the error only showed up on
  Python 3.4 (or only with MSVC 10.0 ?).

  This fix pins the version of typed-ast to <1.4.0 on Python 3.4.

* In addition, typed-ast was missing completely so far from the requirements
  and constraints files, and was added with a minimum version of 1.3.0.

* For Python 3.8 and higher, defined typed-ast verion 1.4.0 as the minimum,
  see issue python/typed_ast#126

Signed-off-by: Andreas Maier <andreas.r.maier@gmx.de>
andy-maier added a commit to andy-maier/python-yagot that referenced this issue Mar 7, 2020
Details:

* Building the wheel for typed-ast fails with an error that was already
  reported to typed-ast as python/typed_ast#121
  but was decided not to be fixed because the error only showed up on
  Python 3.4 (or only with MSVC 10.0 ?).

  This fix pins the version of typed-ast to <1.4.0 on Python 3.4.

* In addition, typed-ast was missing completely so far from the requirements
  and constraints files, and was added with a minimum version of 1.3.0.

* For Python 3.8 and higher, defined typed-ast verion 1.4.0 as the minimum,
  see issue python/typed_ast#126

Signed-off-by: Andreas Maier <andreas.r.maier@gmx.de>
andy-maier added a commit to andy-maier/python-yagot that referenced this issue Mar 7, 2020
Details:

* Building the wheel for typed-ast fails with an error that was already
  reported to typed-ast as python/typed_ast#121
  but was decided not to be fixed because the error only showed up on
  Python 3.4 (or only with MSVC 10.0 ?).

  This fix pins the version of typed-ast to <1.4.0 on Python 3.4.

* In addition, typed-ast was missing completely so far from the requirements
  and constraints files, and was added with a minimum version of 1.3.0.

* For Python 3.8 and higher, defined typed-ast verion 1.4.0 as the minimum,
  see issue python/typed_ast#126

Signed-off-by: Andreas Maier <andreas.r.maier@gmx.de>
andy-maier added a commit to andy-maier/cookiecutter-python that referenced this issue Mar 7, 2020
Details:

* Building the wheel for typed-ast fails with an error that was already
  reported to typed-ast as python/typed_ast#121
  but was decided not to be fixed because the error only showed up on
  Python 3.4 (or only with MSVC 10.0 ?).

  This fix pins the version of typed-ast to <1.4.0 on Python 3.4.

* In addition, typed-ast was missing completely so far from the requirements
  and constraints files, and was added with a minimum version of 1.3.0.

* For Python 3.8 and higher, defined typed-ast verion 1.4.0 as the minimum,
  see issue python/typed_ast#126

Signed-off-by: Andreas Maier <andreas.r.maier@gmx.de>
andy-maier added a commit to andy-maier/cookiecutter-python that referenced this issue Mar 7, 2020
Details:

* Building the wheel for typed-ast fails with an error that was already
  reported to typed-ast as python/typed_ast#121
  but was decided not to be fixed because the error only showed up on
  Python 3.4 (or only with MSVC 10.0 ?).

  This fix pins the version of typed-ast to <1.4.0 on Python 3.4.

* In addition, typed-ast was missing completely so far from the requirements
  and constraints files, and was added with a minimum version of 1.3.0.

* For Python 3.8 and higher, defined typed-ast verion 1.4.0 as the minimum,
  see issue python/typed_ast#126

Signed-off-by: Andreas Maier <andreas.r.maier@gmx.de>
andy-maier added a commit to andy-maier/cookiecutter-python-package that referenced this issue Jan 27, 2021
Details:

* Building the wheel for typed-ast fails with an error that was already
  reported to typed-ast as python/typed_ast#121
  but was decided not to be fixed because the error only showed up on
  Python 3.4 (or only with MSVC 10.0 ?).

  This fix pins the version of typed-ast to <1.4.0 on Python 3.4.

* In addition, typed-ast was missing completely so far from the requirements
  and constraints files, and was added with a minimum version of 1.3.0.

* For Python 3.8 and higher, defined typed-ast verion 1.4.0 as the minimum,
  see issue python/typed_ast#126

Signed-off-by: Andreas Maier <andreas.r.maier@gmx.de>
brkline added a commit to brkline/FSND that referenced this issue Mar 18, 2021
When trying to install the requirements, it would not install typed-ast.
An issue was raised on GitHub so I upgraded to a newer version.
python/typed_ast#126
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants