zoni/mkdocs-diagrams

Can not install mkdocs-diagrams on Python 3.12.3

Closed this issue · 1 comments

Context

I just installed the newest version Python 3.12.3 and re-downloaded every other mkdocs extension with pip3 on Windows (Acer Nitro 5), but suddenly it reported this weird bug? (when I use Python [3.9.x] it still with pip install it is still fine)

Error

PS C:\Users\Admin\source\repos\es.ac.vn> pip3 install mkdocs-diagrams
Collecting mkdocs-diagrams
  Using cached mkdocs_diagrams-1.0.0-py3-none-any.whl.metadata (3.7 kB)
Requirement already satisfied: mkdocs in c:\users\admin\appdata\local\programs\python\python312\lib\site-packages (from mkdocs-diagrams) (1.5.3)
Collecting diagrams (from mkdocs-diagrams)
  Using cached diagrams-0.23.4-py3-none-any.whl.metadata (7.0 kB)
Collecting graphviz<0.21.0,>=0.13.2 (from diagrams->mkdocs-diagrams)
  Using cached graphviz-0.20.3-py3-none-any.whl.metadata (12 kB)
Requirement already satisfied: jinja2<4.0,>=2.10 in c:\users\admin\appdata\local\programs\python\python312\lib\site-packages (from diagrams->mkdocs-diagrams) (3.1.3)
Collecting typed-ast<2.0.0,>=1.5.4 (from diagrams->mkdocs-diagrams)
  Using cached typed_ast-1.5.5.tar.gz (252 kB)
  Installing build dependencies ... done
  Getting requirements to build wheel ... done
  Installing backend dependencies ... done
  Preparing metadata (pyproject.toml) ... done
Requirement already satisfied: click>=7.0 in c:\users\admin\appdata\local\programs\python\python312\lib\site-packages (from mkdocs->mkdocs-diagrams) (8.1.7)
Requirement already satisfied: colorama>=0.4 in c:\users\admin\appdata\local\programs\python\python312\lib\site-packages (from mkdocs->mkdocs-diagrams) (0.4.6)
Requirement already satisfied: ghp-import>=1.0 in c:\users\admin\appdata\local\programs\python\python312\lib\site-packages (from mkdocs->mkdocs-diagrams) (2.1.0)
Requirement already satisfied: markdown>=3.2.1 in c:\users\admin\appdata\local\programs\python\python312\lib\site-packages (from mkdocs->mkdocs-diagrams) (3.6)
Requirement already satisfied: markupsafe>=2.0.1 in c:\users\admin\appdata\local\programs\python\python312\lib\site-packages (from mkdocs->mkdocs-diagrams) (2.1.5)
Requirement already satisfied: mergedeep>=1.3.4 in c:\users\admin\appdata\local\programs\python\python312\lib\site-packages (from mkdocs->mkdocs-diagrams) (1.3.4)
Requirement already satisfied: packaging>=20.5 in c:\users\admin\appdata\local\programs\python\python312\lib\site-packages (from mkdocs->mkdocs-diagrams) (24.0)
Requirement already satisfied: pathspec>=0.11.1 in c:\users\admin\appdata\local\programs\python\python312\lib\site-packages (from mkdocs->mkdocs-diagrams) (0.12.1)
Requirement already satisfied: platformdirs>=2.2.0 in c:\users\admin\appdata\local\programs\python\python312\lib\site-packages (from mkdocs->mkdocs-diagrams) (4.2.0)
Requirement already satisfied: pyyaml-env-tag>=0.1 in c:\users\admin\appdata\local\programs\python\python312\lib\site-packages (from mkdocs->mkdocs-diagrams) (0.1)
Requirement already satisfied: pyyaml>=5.1 in c:\users\admin\appdata\local\programs\python\python312\lib\site-packages (from mkdocs->mkdocs-diagrams) (6.0.1)
Requirement already satisfied: watchdog>=2.0 in c:\users\admin\appdata\local\programs\python\python312\lib\site-packages (from mkdocs->mkdocs-diagrams) (4.0.0)
Requirement already satisfied: python-dateutil>=2.8.1 in c:\users\admin\appdata\local\programs\python\python312\lib\site-packages (from ghp-import>=1.0->mkdocs->mkdocs-diagrams) (2.9.0.post0)
Requirement already satisfied: six>=1.5 in c:\users\admin\appdata\local\programs\python\python312\lib\site-packages (from python-dateutil>=2.8.1->ghp-import>=1.0->mkdocs->mkdocs-diagrams) (1.16.0)
Using cached mkdocs_diagrams-1.0.0-py3-none-any.whl (5.5 kB)
Using cached diagrams-0.23.4-py3-none-any.whl (24.6 MB)
Using cached graphviz-0.20.3-py3-none-any.whl (47 kB)
Building wheels for collected packages: typed-ast
  Building wheel for typed-ast (pyproject.toml) ... error
  error: subprocess-exited-with-error

  × Building wheel for typed-ast (pyproject.toml) did not run successfully.
  │ exit code: 1
  ╰─> [175 lines of output]
      running bdist_wheel
      running build
      running build_py
      creating build
      creating build\lib.win32-cpython-312
      creating build\lib.win32-cpython-312\typed_ast
      copying typed_ast\ast27.py -> build\lib.win32-cpython-312\typed_ast
      copying typed_ast\ast3.py -> build\lib.win32-cpython-312\typed_ast
      copying typed_ast\conversions.py -> build\lib.win32-cpython-312\typed_ast
      copying typed_ast\__init__.py -> build\lib.win32-cpython-312\typed_ast
      creating build\lib.win32-cpython-312\typed_ast\tests
      copying ast3\tests\test_basics.py -> build\lib.win32-cpython-312\typed_ast\tests
      running build_ext
      building '_ast27' extension
      creating build\temp.win32-cpython-312
      creating build\temp.win32-cpython-312\Release
      creating build\temp.win32-cpython-312\Release\ast27
      creating build\temp.win32-cpython-312\Release\ast27\Custom
      creating build\temp.win32-cpython-312\Release\ast27\Parser
      creating build\temp.win32-cpython-312\Release\ast27\Python
      "C:\Program Files\Microsoft Visual Studio\2022\Professional\VC\Tools\MSVC\14.37.32822\bin\HostX86\x86\cl.exe" /c /nologo /O2 /W3 /GL /DNDEBUG /MD -Iast27/Include -IC:\Users\Admin\AppData\Local\Programs\Python\Python312\include -IC:\Users\Admin\AppData\Local\Programs\Python\Python312\Include "-IC:\Program Files\Microsoft Visual Studio\2022\Professional\VC\Tools\MSVC\14.37.32822\include" "-IC:\Program Files\Microsoft Visual Studio\2022\Professional\VC\Tools\MSVC\14.37.32822\ATLMFC\include" "-IC:\Program Files\Microsoft Visual Studio\2022\Professional\VC\Auxiliary\VS\include" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.22621.0\ucrt" "-IC:\Program Files (x86)\Windows Kits\10\\include\10.0.22621.0\\um" "-IC:\Program Files (x86)\Windows Kits\10\\include\10.0.22621.0\\shared" "-IC:\Program Files (x86)\Windows Kits\10\\include\10.0.22621.0\\winrt" "-IC:\Program Files (x86)\Windows Kits\10\\include\10.0.22621.0\\cppwinrt" "-IC:\Program Files\Microsoft Visual Studio\2022\Professional\VC\Tools\MSVC\14.37.32822\include" "-IC:\Program Files\Microsoft Visual Studio\2022\Professional\VC\Tools\MSVC\14.37.32822\ATLMFC\include" "-IC:\Program Files\Microsoft Visual Studio\2022\Professional\VC\Auxiliary\VS\include" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.22621.0\ucrt" "-IC:\Program Files (x86)\Windows Kits\10\\include\10.0.22621.0\\um" "-IC:\Program Files (x86)\Windows Kits\10\\include\10.0.22621.0\\shared" "-IC:\Program Files (x86)\Windows Kits\10\\include\10.0.22621.0\\winrt" "-IC:\Program Files (x86)\Windows Kits\10\\include\10.0.22621.0\\cppwinrt" /Tcast27/Custom/typed_ast.c /Fobuild\temp.win32-cpython-312\Release\ast27/Custom/typed_ast.obj
      typed_ast.c

      typed_ast.obj : error LNK2001: unresolved external symbol __imp__PyExc_IndentationError
      typed_ast.obj : error LNK2001: unresolved external symbol __imp__PyErr_SetObject
      typed_ast.obj : error LNK2001: unresolved external symbol __imp__PyErr_Occurred
      typed_ast.obj : error LNK2001: unresolved external symbol __imp__PyUnicode_DecodeUTF8
      typed_ast.obj : error LNK2001: unresolved external symbol __imp__PyUnicode_AsUTF8AndSize
      typed_ast.obj : error LNK2001: unresolved external symbol __imp__PyErr_SetNone
      typed_ast.obj : error LNK2001: unresolved external symbol __imp__Py_BuildValue
      typed_ast.obj : error LNK2001: unresolved external symbol __imp__PyExc_TabError
      typed_ast.obj : error LNK2001: unresolved external symbol __imp___PyArena_Free
      typed_ast.obj : error LNK2001: unresolved external symbol __imp__PyExc_KeyboardInterrupt
      typed_ast.obj : error LNK2001: unresolved external symbol __imp__PyUnicode_FSDecoder
      typed_ast.obj : error LNK2001: unresolved external symbol __imp___Py_NoneStruct
      typed_ast.obj : error LNK2001: unresolved external symbol __imp__PyErr_SetString
      typed_ast.obj : error LNK2001: unresolved external symbol __imp__PyExc_ValueError
      typed_ast.obj : error LNK2001: unresolved external symbol __imp__PyErr_Format
      typed_ast.obj : error LNK2001: unresolved external symbol __imp__PyType_IsSubtype
      typed_ast.obj : error LNK2001: unresolved external symbol __imp___Py_Dealloc
      typed_ast.obj : error LNK2001: unresolved external symbol __imp__PyObject_Free
      typed_ast.obj : error LNK2001: unresolved external symbol __imp___PyArena_New
      typed_ast.obj : error LNK2001: unresolved external symbol __imp__PyErr_Fetch
      typed_ast.obj : error LNK2001: unresolved external symbol __imp__PyUnicode_AsUTF8
      typed_ast.obj : error LNK2001: unresolved external symbol __imp__PyObject_GetBuffer
      typed_ast.obj : error LNK2001: unresolved external symbol __imp__PyExc_SyntaxError
      typed_ast.obj : error LNK2001: unresolved external symbol __imp__PyErr_NoMemory
      typed_ast.obj : error LNK2001: unresolved external symbol __imp__PyBytes_FromStringAndSize
      typed_ast.obj : error LNK2001: unresolved external symbol __imp__PyExc_TypeError
      typed_ast.obj : error LNK2001: unresolved external symbol __imp__PyObject_Str
      typed_ast.obj : error LNK2001: unresolved external symbol __imp___PyByteArray_empty_string
      typed_ast.obj : error LNK2001: unresolved external symbol __imp__PyBuffer_Release
      typed_ast.obj : error LNK2001: unresolved external symbol __imp__PyByteArray_Type
      typed_ast.obj : error LNK2001: unresolved external symbol __imp__PyArg_ParseTuple
      acceler.obj : error LNK2001: unresolved external symbol __imp__PyObject_Malloc
      bitset.obj : error LNK2001: unresolved external symbol __imp___Py_FatalErrorFunc
      grammar.obj : error LNK2001: unresolved external symbol __imp__Py_DebugFlag
      grammar.obj : error LNK2001: unresolved external symbol __imp__PyObject_Realloc
      grammar1.obj : error LNK2001: unresolved external symbol __imp__PyOS_snprintf
      parser.obj : error LNK2001: unresolved external symbol __imp__PyMem_Free
      parser.obj : error LNK2001: unresolved external symbol __imp__PyMem_Malloc
      parsetok.obj : error LNK2001: unresolved external symbol __imp__Py_VerboseFlag
      parsetok.obj : error LNK2001: unresolved external symbol __imp__PyUnicode_FromString
      tokenizer.obj : error LNK2001: unresolved external symbol __imp__PyUnicode_AsEncodedString
      tokenizer.obj : error LNK2001: unresolved external symbol __imp__PyImport_ImportModuleNoBlock
      tokenizer.obj : error LNK2001: unresolved external symbol __imp__PyExc_DeprecationWarning
      tokenizer.obj : error LNK2001: unresolved external symbol __imp__PyBytes_AsString
      tokenizer.obj : error LNK2001: unresolved external symbol __imp__PyErr_SetFromErrnoWithFilename
      tokenizer.obj : error LNK2001: unresolved external symbol __imp___Py_ctype_table
      tokenizer.obj : error LNK2001: unresolved external symbol __imp__PyOS_Readline
      tokenizer.obj : error LNK2001: unresolved external symbol __imp___Py_FalseStruct
      tokenizer.obj : error LNK2001: unresolved external symbol __imp__PyErr_WarnExplicit
      tokenizer.obj : error LNK2001: unresolved external symbol __imp___PyObject_GetAttrId
      tokenizer.obj : error LNK2001: unresolved external symbol __imp__PyErr_Clear
      tokenizer.obj : error LNK2001: unresolved external symbol __imp__PyBytes_Type
      tokenizer.obj : error LNK2001: unresolved external symbol __imp__PyUnicode_Decode
      tokenizer.obj : error LNK2001: unresolved external symbol __imp__PyBytes_Size
      tokenizer.obj : error LNK2001: unresolved external symbol __imp__PyExc_OSError
      tokenizer.obj : error LNK2001: unresolved external symbol __imp__PyObject_CallObject
      tokenizer.obj : error LNK2001: unresolved external symbol __imp__PyMem_Realloc
      tokenizer.obj : error LNK2001: unresolved external symbol __imp__PyUnicode_AsUTF8String
      tokenizer.obj : error LNK2001: unresolved external symbol __imp__Py_UniversalNewlineFgets
      tokenizer.obj : error LNK2001: unresolved external symbol __imp___PyObject_CallMethodId
      tokenizer.obj : error LNK2001: unresolved external symbol __imp__PyObject_Size
      tokenizer.obj : error LNK2001: unresolved external symbol __imp__PySys_WriteStderr
      Python-ast.obj : error LNK2001: unresolved external symbol __imp__PySequence_Size
      Python-ast.obj : error LNK2001: unresolved external symbol __imp__PyObject_SetAttr
      Python-ast.obj : error LNK2001: unresolved external symbol __imp__PyBool_FromLong
      Python-ast.obj : error LNK2001: unresolved external symbol __imp__PyModule_AddIntConstant
      Python-ast.obj : error LNK2001: unresolved external symbol __imp__PyType_GenericNew
      Python-ast.obj : error LNK2001: unresolved external symbol __imp__PySequence_GetItem
      Python-ast.obj : error LNK2001: unresolved external symbol __imp__PyObject_GenericGetAttr
      Python-ast.obj : error LNK2001: unresolved external symbol __imp__PyObject_SetAttrString
      Python-ast.obj : error LNK2001: unresolved external symbol __imp__PyLong_FromLong
      Python-ast.obj : error LNK2001: unresolved external symbol __imp__PyTuple_New
      Python-ast.obj : error LNK2001: unresolved external symbol __imp__PyDict_SetItemString
      Python-ast.obj : error LNK2001: unresolved external symbol __imp__PyExc_AttributeError
      Python-ast.obj : error LNK2001: unresolved external symbol __imp__PyObject_CallFunction
      Python-ast.obj : error LNK2001: unresolved external symbol __imp__PyDict_Next
      Python-ast.obj : error LNK2001: unresolved external symbol __imp__PyBool_Type
      Python-ast.obj : error LNK2001: unresolved external symbol __imp__PyModule_GetDict
      Python-ast.obj : error LNK2001: unresolved external symbol __imp__PyErr_ExceptionMatches
      Python-ast.obj : error LNK2001: unresolved external symbol __imp__PyLong_AsLong
      Python-ast.obj : error LNK2001: unresolved external symbol __imp__PyList_New
      Python-ast.obj : error LNK2001: unresolved external symbol __imp__PyModule_Create2
      Python-ast.obj : error LNK2001: unresolved external symbol __imp__PyType_Ready
      Python-ast.obj : error LNK2001: unresolved external symbol __imp__PyObject_GetAttrString
      Python-ast.obj : error LNK2001: unresolved external symbol __imp__PyObject_GenericSetAttr
      Python-ast.obj : error LNK2001: unresolved external symbol __imp___PyArena_Malloc
      Python-ast.obj : error LNK2001: unresolved external symbol __imp__PyUnicode_Type
      Python-ast.obj : error LNK2001: unresolved external symbol __imp__PyObject_IsInstance
      Python-ast.obj : error LNK2001: unresolved external symbol __imp__PyType_GenericAlloc
      Python-ast.obj : error LNK2001: unresolved external symbol __imp___PyArena_AddPyObject
      Python-ast.obj : error LNK2001: unresolved external symbol __imp__PyObject_HasAttrString
      Python-ast.obj : error LNK2001: unresolved external symbol __imp___Py_TrueStruct
      Python-ast.obj : error LNK2001: unresolved external symbol __imp__PyExc_SystemError
      Python-ast.obj : error LNK2001: unresolved external symbol __imp__PyObject_Repr
      Python-ast.obj : error LNK2001: unresolved external symbol __imp__PyType_Type
      ast.obj : error LNK2001: unresolved external symbol __imp__PyUnicode_InternFromString
      ast.obj : error LNK2001: unresolved external symbol __imp___PyErr_BadInternalCall
      ast.obj : error LNK2001: unresolved external symbol __imp__PyUnicode_Concat
      ast.obj : error LNK2001: unresolved external symbol __imp__PyBytes_DecodeEscape
      ast.obj : error LNK2001: unresolved external symbol __imp__PyLong_FromString
      ast.obj : error LNK2001: unresolved external symbol __imp__PyFloat_FromDouble
      ast.obj : error LNK2001: unresolved external symbol __imp__PyUnicode_InternInPlace
      ast.obj : error LNK2001: unresolved external symbol __imp__PyOS_string_to_double
      ast.obj : error LNK2001: unresolved external symbol __imp__PyErr_Restore
      ast.obj : error LNK2001: unresolved external symbol __imp__PyExc_OverflowError
      ast.obj : error LNK2001: unresolved external symbol __imp__PyTuple_GetItem
      ast.obj : error LNK2001: unresolved external symbol __imp__PyExc_UnicodeError
      ast.obj : error LNK2001: unresolved external symbol __imp__PyExc_SyntaxWarning
      ast.obj : error LNK2001: unresolved external symbol __imp__PyBytes_ConcatAndDel
      ast.obj : error LNK2001: unresolved external symbol __imp__PyUnicode_DecodeRawUnicodeEscape
      ast.obj : error LNK2001: unresolved external symbol __imp__PyUnicode_FromEncodedObject
      ast.obj : error LNK2001: unresolved external symbol __imp__PyTuple_Pack
      ast.obj : error LNK2001: unresolved external symbol __imp__PyUnicode_DecodeUnicodeEscape
      ast.obj : error LNK2001: unresolved external symbol __imp__PyErr_ProgramText
      ast.obj : error LNK2001: unresolved external symbol __imp__PyComplex_FromCComplex
      build\lib.win32-cpython-312\typed_ast\_ast27.cp312-win_amd64.pyd : fatal error LNK1120: 115 unresolved externals
      error: command 'C:\\Program Files\\Microsoft Visual Studio\\2022\\Professional\\VC\\Tools\\MSVC\\14.37.32822\\bin\\HostX86\\x86\\link.exe' failed with exit code 1120
      [end of output]

  note: This error originates from a subprocess, and is likely not a problem with pip.
  ERROR: Failed building wheel for typed-ast
Failed to build typed-ast
ERROR: Could not build wheels for typed-ast, which is required to install pyproject.toml-based projects

Steps to reproduce

1. Permanent delete python folders containing Python 3.9.x on Windows
2. Download Python 3.12.x with every possible feature from installers
3. Download all mkdocs extensions using pip3 install
4. Run `python -m mkdocs serve`

Fixed using virtual environment to install them