0

I am struggling with installing the package triangle and hence glumpy for Python3.10 on Windows10. I managed to install a bunch of packages without any problem.

However, when it comes to triangle I do get the following error message. Somehow there seems to be a problem with VS compiling the core.c file. But when I search for this file or the containing built folder I find nothing. Has anyone an idea what I should do?

P.S. pip, setuptools and wheel are up to date.

   Collecting triangle
      Using cached triangle-20200424.tar.gz (1.6 MB)
      Preparing metadata (setup.py): started
      Preparing metadata (setup.py): finished with status 'done'
    Requirement already satisfied: numpy in c:\users\manuk\appdata\local\programs\python\python310\lib\site-packages (from triangle) (1.22.1)
    Building wheels for collected packages: triangle
      Building wheel for triangle (setup.py): started

  Building wheel for triangle (setup.py): finished with status 'error'
  Running setup.py clean for triangle
Failed to build triangle
Installing collected packages: triangle
    Running setup.py install for triangle: started
    Running setup.py install for triangle: finished with status 'error'

 > ERROR: Command errored out with exit status 1:
   command: 'C:\Users\manuk\AppData\Local\Programs\Python\Python310\python.exe' -u -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\manuk\\AppData\\Local\\Temp\\pip-install-8rxnwtam\\triangle_64956d8d766d438e9dfef28d2857d32b\\setup.py'"'"'; __file__='"'"'C:\\Users\\manuk\\AppData\\Local\\Temp\\pip-install-8rxnwtam\\triangle_64956d8d766d438e9dfef28d2857d32b\\setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(__file__) if os.path.exists(__file__) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' bdist_wheel -d 'C:\Users\manuk\AppData\Local\Temp\pip-wheel-6heum19q'
       cwd: C:\Users\manuk\AppData\Local\Temp\pip-install-8rxnwtam\triangle_64956d8d766d438e9dfef28d2857d32b\
  Complete output (124 lines):
  running bdist_wheel
  running build
  running build_py
  creating build
  creating build\lib.win-amd64-3.10
  creating build\lib.win-amd64-3.10\triangle
  copying triangle\core1_run.py -> build\lib.win-amd64-3.10\triangle
  copying triangle\data.py -> build\lib.win-amd64-3.10\triangle
  copying triangle\plot.py -> build\lib.win-amd64-3.10\triangle
.
.
.
  copying triangle\data\la.poly -> build\lib.win-amd64-3.10\triangle\data
  copying triangle\data\square_circle_hole.poly -> build\lib.win-amd64-3.10\triangle\data
  copying triangle\data\bbox.1.area -> build\lib.win-amd64-3.10\triangle\data
  copying triangle\data\diamond_02_00009.1.v.edge -> build\lib.win-amd64-3.10\triangle\data
  copying triangle\data\dots.1.v.edge -> build\lib.win-amd64-3.10\triangle\data
  warning: build_py: byte-compiling is disabled, skipping.

  >running build_ext
  creating build\temp.win-amd64-3.10
  creating build\temp.win-amd64-3.10\Release
  creating build\temp.win-amd64-3.10\Release\c
  creating build\temp.win-amd64-3.10\Release\triangle
  "C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.29.30133\bin\HostX86\x64\cl.exe" /c /nologo /O2 /W3 /GL /DNDEBUG /MD -DVOID=void -DREAL=double -DNO_TIMER=1 -DTRILIBRARY=1 -DANSI_DECLARATORS=1 -Ic -IC:\Users\manuk\AppData\Local\Programs\Python\Python310\include -IC:\Users\manuk\AppData\Local\Programs\Python\Python310\Include "-IC:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.29.30133\include" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.20348.0\ucrt" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.20348.0\shared" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.20348.0\um" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.20348.0\winrt" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.20348.0\cppwinrt" /Tcc/triangle.c /Fobuild\temp.win-amd64-3.10\Release\c/triangle.obj
  triangle.c
  c/triangle.c(3685): warning C4311: "Typumwandlung": Zeigerverk\x81rzung von "triangle *" zu "unsigned long"
   c/triangle.c(3831): warning C4311: "Typumwandlung": Zeigerverk\x81rzung von "vertex" zu "unsigned long"
  c/triangle.c(3838): warning C4311: "Typumwandlung": Zeigerverk\x81rzung von "vertex" zu "unsigned long"
  c/triangle.c(6966): warning C4244: "=": Konvertierung von "double" in "int", m”glicher Datenverlust
  c/triangle.c(12465): warning C4996: 'strcpy': This function or variable may be unsafe. Consider using strcpy_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details.
  "C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.29.30133\bin\HostX86\x64\cl.exe" /c /nologo /O2 /W3 /GL /DNDEBUG /MD -DVOID=void -DREAL=double -DNO_TIMER=1 -DTRILIBRARY=1 -DANSI_DECLARATORS=1 -Ic -IC:\Users\manuk\AppData\Local\Programs\Python\Python310\include -IC:\Users\manuk\AppData\Local\Programs\Python\Python310\Include "-IC:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.29.30133\include" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.20348.0\ucrt" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.20348.0\shared" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.20348.0\um" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.20348.0\winrt" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.20348.0\cppwinrt" /Tctriangle/core.c /Fobuild\temp.win-amd64-3.10\Release\triangle/core.obj
  core.c
  triangle/core.c(19390): error C2105: "++" muss ein L-Wert sein
  triangle/core.c(19392): error C2105: "--" muss ein L-Wert sein
  triangle/core.c(19701): error C2105: "++" muss ein L-Wert sein
  triangle/core.c(19703): error C2105: "--" muss ein L-Wert sein
  triangle/core.c(19951): error C2105: "++" muss ein L-Wert sein
  triangle/core.c(19953): error C2105: "--" muss ein L-Wert sein
  triangle/core.c(22901): warning C4996: '_PyUnicode_get_wstr_length': deprecated in 3.3
  triangle/core.c(22917): warning C4996: '_PyUnicode_get_wstr_length': deprecated in 3.3
  triangle/core.c(23497): warning C4996: 'PyUnicode_FromUnicode': deprecated in 3.3
  error: command 'C:\\Program Files (x86)\\Microsoft Visual Studio\\2019\\Community\\VC\\Tools\\MSVC\\14.29.30133\\bin\\HostX86\\x64\\cl.exe' failed with exit code 2
  ----------------------------------------
martineau
  • 119,623
  • 25
  • 170
  • 301
  • You can download the wheels for [`triangle`](https://www.lfd.uci.edu/~gohlke/pythonlibs/#triangle) and [`glumpy`](https://www.lfd.uci.edu/~gohlke/pythonlibs/#glumpy) from Christoph Gohlke's website. – MattDMo Jan 24 '22 at 19:08
  • I downloaded them and tried to install them, but I got: ERROR: triangle-20200424-pp38-pypy38_pp73-win_amd64.whl is not a supported wheel on this platform. – manu kipf Jan 24 '22 at 19:28
  • You have to download the `cp310` wheels for your platform - either `cp310‑win_amd64.whl` or `cp310‑win32.whl`. Pypy is a different distribution of Python, you're using CPython. – MattDMo Jan 24 '22 at 19:36
  • Thank you, i could install both triangle and glumpy via the console. but using PyCharm i still get an unresolved reference. – manu kipf Jan 24 '22 at 20:25
  • Okay, I finally made it. I don't know how, but I noticed that I had two '''site-packages''' folders, one with the downloaded packages and one without them. I copied them and now it works. The heat is on! Thank you so much, u made my day! – manu kipf Jan 24 '22 at 21:07

0 Answers0