stl_tools icon indicating copy to clipboard operation
stl_tools copied to clipboard

Install error on Win10

Open jimfred opened this issue 3 years ago • 4 comments

I'm getting an install error on Win10 using either pip install stl_tools or python setup.py build install. The error looks similar either way, pointing to cwrapped.c.

Here's the console log for pip:

C:\Users\jimfr>pip install stl_tools
Collecting stl_tools
  Downloading stl_tools-0.3.0.tar.gz (105 kB)
     ---------------------------------------- 105.8/105.8 KB 3.1 MB/s eta 0:00:00
  Preparing metadata (setup.py) ... done
Requirement already satisfied: numpy in c:\program files\python310\lib\site-packages (from stl_tools) (1.22.2)
Requirement already satisfied: scipy in c:\program files\python310\lib\site-packages (from stl_tools) (1.8.0)
Collecting matplotlib
  Downloading matplotlib-3.5.1-cp310-cp310-win_amd64.whl (7.2 MB)
     ---------------------------------------- 7.2/7.2 MB 6.6 MB/s eta 0:00:00
Collecting kiwisolver>=1.0.1
  Downloading kiwisolver-1.3.2-cp310-cp310-win_amd64.whl (52 kB)
     ---------------------------------------- 52.1/52.1 KB 2.8 MB/s eta 0:00:00
Collecting pyparsing>=2.2.1
  Using cached pyparsing-3.0.7-py3-none-any.whl (98 kB)
Collecting python-dateutil>=2.7
  Using cached python_dateutil-2.8.2-py2.py3-none-any.whl (247 kB)
Collecting packaging>=20.0
  Using cached packaging-21.3-py3-none-any.whl (40 kB)
Requirement already satisfied: pillow>=6.2.0 in c:\program files\python310\lib\site-packages (from matplotlib->stl_tools) (9.0.1)
Collecting cycler>=0.10
  Downloading cycler-0.11.0-py3-none-any.whl (6.4 kB)
Collecting fonttools>=4.22.0
  Downloading fonttools-4.29.1-py3-none-any.whl (895 kB)
     ---------------------------------------- 895.5/895.5 KB 7.1 MB/s eta 0:00:00
Collecting six>=1.5
  Using cached six-1.16.0-py2.py3-none-any.whl (11 kB)
Using legacy 'setup.py install' for stl_tools, since package 'wheel' is not installed.
Installing collected packages: six, pyparsing, kiwisolver, fonttools, cycler, python-dateutil, packaging, matplotlib, stl_tools
  Running setup.py install for stl_tools ... error
  error: subprocess-exited-with-error

  × Running setup.py install for stl_tools did not run successfully.
  │ exit code: 1
  ╰─> [169 lines of output]
      running install
      running build
      running build_py
      creating build
      creating build\lib.win-amd64-3.10
      creating build\lib.win-amd64-3.10\stl_tools
      copying stl_tools\image2stl.py -> build\lib.win-amd64-3.10\stl_tools
      copying stl_tools\numpy2stl.py -> build\lib.win-amd64-3.10\stl_tools
      copying stl_tools\text2png.py -> build\lib.win-amd64-3.10\stl_tools
      copying stl_tools\__init__.py -> build\lib.win-amd64-3.10\stl_tools
      running build_ext
      building 'stl_tools.cwrapped' extension
      creating build\temp.win-amd64-3.10
      creating build\temp.win-amd64-3.10\Release
      creating build\temp.win-amd64-3.10\Release\stl_tools
      C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\VC\Tools\MSVC\14.29.30133\bin\HostX86\x64\cl.exe /c /nologo /Ox /W3 /GL /DNDEBUG /MD -IC:\Program Files\Python310\lib\site-packages\numpy\core\include -IC:\Program Files\Python310\include -IC:\Program Files\Python310\Include -IC:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\VC\Tools\MSVC\14.29.30133\include -IC:\Program Files (x86)\Windows Kits\10\include\10.0.19041.0\ucrt -IC:\Program Files (x86)\Windows Kits\10\include\10.0.19041.0\shared -IC:\Program Files (x86)\Windows Kits\10\include\10.0.19041.0\um -IC:\Program Files (x86)\Windows Kits\10\include\10.0.19041.0\winrt -IC:\Program Files (x86)\Windows Kits\10\include\10.0.19041.0\cppwinrt /Tcstl_tools/cwrapped.c /Fobuild\temp.win-amd64-3.10\Release\stl_tools/cwrapped.obj
      cwrapped.c
      C:\Program Files\Python310\lib\site-packages\numpy\core\include\numpy\npy_1_7_deprecated_api.h(14) : Warning Msg: Using deprecated NumPy API, disable it with #define NPY_NO_DEPRECATED_API NPY_1_7_API_VERSION
      stl_tools/cwrapped.c(2137): warning C4244: '=': conversion from 'Py_ssize_t' to 'int', possible loss of data
      stl_tools/cwrapped.c(2146): warning C4244: '=': conversion from 'Py_ssize_t' to 'int', possible loss of data
      stl_tools/cwrapped.c(2389): warning C4244: '+=': conversion from 'Py_ssize_t' to 'int', possible loss of data
      stl_tools/cwrapped.c(2390): warning C4244: '+=': conversion from 'Py_ssize_t' to 'int', possible loss of data
      stl_tools/cwrapped.c(2395): warning C4244: '+=': conversion from 'Py_ssize_t' to 'int', possible loss of data
      stl_tools/cwrapped.c(2396): warning C4244: '+=': conversion from 'Py_ssize_t' to 'long', possible loss of data
      stl_tools/cwrapped.c(2401): warning C4244: '+=': conversion from 'Py_ssize_t' to 'long', possible loss of data
      stl_tools/cwrapped.c(2402): warning C4244: '+=': conversion from 'Py_ssize_t' to 'int', possible loss of data
      stl_tools/cwrapped.c(2423): warning C4244: '+=': conversion from 'Py_ssize_t' to 'int', possible loss of data
      stl_tools/cwrapped.c(2436): warning C4244: '+=': conversion from 'Py_ssize_t' to 'int', possible loss of data
      stl_tools/cwrapped.c(2449): warning C4244: '+=': conversion from 'Py_ssize_t' to 'int', possible loss of data
      stl_tools/cwrapped.c(2450): warning C4244: '+=': conversion from 'Py_ssize_t' to 'long', possible loss of data
      stl_tools/cwrapped.c(2453): warning C4244: '+=': conversion from 'Py_ssize_t' to 'int', possible loss of data
      stl_tools/cwrapped.c(2466): warning C4244: '+=': conversion from 'Py_ssize_t' to 'int', possible loss of data
      stl_tools/cwrapped.c(2479): warning C4244: '+=': conversion from 'Py_ssize_t' to 'int', possible loss of data
      stl_tools/cwrapped.c(2492): warning C4244: '+=': conversion from 'Py_ssize_t' to 'int', possible loss of data
      stl_tools/cwrapped.c(2493): warning C4244: '+=': conversion from 'Py_ssize_t' to 'int', possible loss of data
      stl_tools/cwrapped.c(2496): warning C4244: '+=': conversion from 'Py_ssize_t' to 'int', possible loss of data
      stl_tools/cwrapped.c(2509): warning C4244: '+=': conversion from 'Py_ssize_t' to 'int', possible loss of data
      stl_tools/cwrapped.c(2522): warning C4244: '+=': conversion from 'Py_ssize_t' to 'int', possible loss of data
      stl_tools/cwrapped.c(2535): warning C4244: '+=': conversion from 'Py_ssize_t' to 'long', possible loss of data
      stl_tools/cwrapped.c(2536): warning C4244: '+=': conversion from 'Py_ssize_t' to 'long', possible loss of data
      stl_tools/cwrapped.c(2539): warning C4244: '+=': conversion from 'Py_ssize_t' to 'int', possible loss of data
      stl_tools/cwrapped.c(2552): warning C4244: '+=': conversion from 'Py_ssize_t' to 'int', possible loss of data
      stl_tools/cwrapped.c(2553): warning C4244: '+=': conversion from 'Py_ssize_t' to 'long', possible loss of data
      stl_tools/cwrapped.c(2565): warning C4244: '+=': conversion from 'Py_ssize_t' to 'int', possible loss of data
      stl_tools/cwrapped.c(2566): warning C4244: '+=': conversion from 'Py_ssize_t' to 'int', possible loss of data
      stl_tools/cwrapped.c(2578): warning C4244: '+=': conversion from 'Py_ssize_t' to 'long', possible loss of data
      stl_tools/cwrapped.c(2579): warning C4244: '+=': conversion from 'Py_ssize_t' to 'int', possible loss of data
      stl_tools/cwrapped.c(2603): warning C4244: '+=': conversion from 'Py_ssize_t' to 'long', possible loss of data
      stl_tools/cwrapped.c(2604): warning C4244: '+=': conversion from 'Py_ssize_t' to 'long', possible loss of data
      stl_tools/cwrapped.c(2609): warning C4244: '+=': conversion from 'Py_ssize_t' to 'int', possible loss of data
      stl_tools/cwrapped.c(2610): warning C4244: '+=': conversion from 'Py_ssize_t' to 'int', possible loss of data
      stl_tools/cwrapped.c(2615): warning C4244: '+=': conversion from 'Py_ssize_t' to 'long', possible loss of data
      stl_tools/cwrapped.c(2616): warning C4244: '+=': conversion from 'Py_ssize_t' to 'int', possible loss of data
      stl_tools/cwrapped.c(2637): warning C4244: '+=': conversion from 'Py_ssize_t' to 'int', possible loss of data
      stl_tools/cwrapped.c(2650): warning C4244: '+=': conversion from 'Py_ssize_t' to 'int', possible loss of data
      stl_tools/cwrapped.c(2663): warning C4244: '+=': conversion from 'Py_ssize_t' to 'int', possible loss of data
      stl_tools/cwrapped.c(2664): warning C4244: '+=': conversion from 'Py_ssize_t' to 'int', possible loss of data
      stl_tools/cwrapped.c(2667): warning C4244: '+=': conversion from 'Py_ssize_t' to 'int', possible loss of data
      stl_tools/cwrapped.c(2680): warning C4244: '+=': conversion from 'Py_ssize_t' to 'int', possible loss of data
      stl_tools/cwrapped.c(2693): warning C4244: '+=': conversion from 'Py_ssize_t' to 'int', possible loss of data
      stl_tools/cwrapped.c(2706): warning C4244: '+=': conversion from 'Py_ssize_t' to 'long', possible loss of data
      stl_tools/cwrapped.c(2707): warning C4244: '+=': conversion from 'Py_ssize_t' to 'int', possible loss of data
      stl_tools/cwrapped.c(2710): warning C4244: '+=': conversion from 'Py_ssize_t' to 'int', possible loss of data
      stl_tools/cwrapped.c(2723): warning C4244: '+=': conversion from 'Py_ssize_t' to 'int', possible loss of data
      stl_tools/cwrapped.c(2736): warning C4244: '+=': conversion from 'Py_ssize_t' to 'int', possible loss of data
      stl_tools/cwrapped.c(2749): warning C4244: '+=': conversion from 'Py_ssize_t' to 'long', possible loss of data
      stl_tools/cwrapped.c(2750): warning C4244: '+=': conversion from 'Py_ssize_t' to 'long', possible loss of data
      stl_tools/cwrapped.c(2753): warning C4244: '+=': conversion from 'Py_ssize_t' to 'int', possible loss of data
      stl_tools/cwrapped.c(2766): warning C4244: '+=': conversion from 'Py_ssize_t' to 'int', possible loss of data
      stl_tools/cwrapped.c(2767): warning C4244: '+=': conversion from 'Py_ssize_t' to 'int', possible loss of data
      stl_tools/cwrapped.c(2779): warning C4244: '+=': conversion from 'Py_ssize_t' to 'long', possible loss of data
      stl_tools/cwrapped.c(2780): warning C4244: '+=': conversion from 'Py_ssize_t' to 'long', possible loss of data
      stl_tools/cwrapped.c(2792): warning C4244: '+=': conversion from 'Py_ssize_t' to 'long', possible loss of data
      stl_tools/cwrapped.c(2793): warning C4244: '+=': conversion from 'Py_ssize_t' to 'int', possible loss of data
      stl_tools/cwrapped.c(3147): warning C4244: '+=': conversion from 'Py_ssize_t' to 'int', possible loss of data
      stl_tools/cwrapped.c(3148): warning C4244: '+=': conversion from 'Py_ssize_t' to 'int', possible loss of data
      stl_tools/cwrapped.c(3161): warning C4244: '+=': conversion from 'Py_ssize_t' to 'int', possible loss of data
      stl_tools/cwrapped.c(3162): warning C4244: '+=': conversion from 'Py_ssize_t' to 'int', possible loss of data
      stl_tools/cwrapped.c(3176): warning C4244: '+=': conversion from 'Py_ssize_t' to 'int', possible loss of data
      stl_tools/cwrapped.c(3177): warning C4244: '+=': conversion from 'Py_ssize_t' to 'int', possible loss of data
      stl_tools/cwrapped.c(3190): warning C4244: '+=': conversion from 'Py_ssize_t' to 'int', possible loss of data
      stl_tools/cwrapped.c(3191): warning C4244: '+=': conversion from 'Py_ssize_t' to 'int', possible loss of data
      stl_tools/cwrapped.c(3381): warning C4244: '+=': conversion from 'Py_ssize_t' to 'int', possible loss of data
      stl_tools/cwrapped.c(3395): warning C4244: '+=': conversion from 'Py_ssize_t' to 'int', possible loss of data
      stl_tools/cwrapped.c(3410): warning C4244: '+=': conversion from 'Py_ssize_t' to 'int', possible loss of data
      stl_tools/cwrapped.c(3424): warning C4244: '+=': conversion from 'Py_ssize_t' to 'int', possible loss of data
      stl_tools/cwrapped.c(3440): warning C4244: '+=': conversion from 'Py_ssize_t' to 'int', possible loss of data
      stl_tools/cwrapped.c(3454): warning C4244: '+=': conversion from 'Py_ssize_t' to 'int', possible loss of data
      stl_tools/cwrapped.c(3469): warning C4244: '+=': conversion from 'Py_ssize_t' to 'int', possible loss of data
      stl_tools/cwrapped.c(3483): warning C4244: '+=': conversion from 'Py_ssize_t' to 'int', possible loss of data
      stl_tools/cwrapped.c(3499): warning C4244: '+=': conversion from 'Py_ssize_t' to 'int', possible loss of data
      stl_tools/cwrapped.c(3513): warning C4244: '+=': conversion from 'Py_ssize_t' to 'int', possible loss of data
      stl_tools/cwrapped.c(3528): warning C4244: '+=': conversion from 'Py_ssize_t' to 'int', possible loss of data
      stl_tools/cwrapped.c(3542): warning C4244: '+=': conversion from 'Py_ssize_t' to 'int', possible loss of data
      stl_tools/cwrapped.c(3637): warning C4244: '+=': conversion from 'Py_ssize_t' to 'int', possible loss of data
      stl_tools/cwrapped.c(3641): warning C4244: '+=': conversion from 'Py_ssize_t' to 'int', possible loss of data
      stl_tools/cwrapped.c(3645): warning C4244: '+=': conversion from 'Py_ssize_t' to 'int', possible loss of data
      stl_tools/cwrapped.c(3646): warning C4244: '+=': conversion from 'Py_ssize_t' to 'int', possible loss of data
      stl_tools/cwrapped.c(3659): warning C4244: '+=': conversion from 'Py_ssize_t' to 'int', possible loss of data
      stl_tools/cwrapped.c(3675): warning C4244: '+=': conversion from 'Py_ssize_t' to 'int', possible loss of data
      stl_tools/cwrapped.c(3679): warning C4244: '+=': conversion from 'Py_ssize_t' to 'int', possible loss of data
      stl_tools/cwrapped.c(3683): warning C4244: '+=': conversion from 'Py_ssize_t' to 'int', possible loss of data
      stl_tools/cwrapped.c(3684): warning C4244: '+=': conversion from 'Py_ssize_t' to 'int', possible loss of data
      stl_tools/cwrapped.c(3697): warning C4244: '+=': conversion from 'Py_ssize_t' to 'int', possible loss of data
      stl_tools/cwrapped.c(3713): warning C4244: '+=': conversion from 'Py_ssize_t' to 'int', possible loss of data
      stl_tools/cwrapped.c(3717): warning C4244: '+=': conversion from 'Py_ssize_t' to 'int', possible loss of data
      stl_tools/cwrapped.c(3721): warning C4244: '+=': conversion from 'Py_ssize_t' to 'int', possible loss of data
      stl_tools/cwrapped.c(3722): warning C4244: '+=': conversion from 'Py_ssize_t' to 'int', possible loss of data
      stl_tools/cwrapped.c(3735): warning C4244: '+=': conversion from 'Py_ssize_t' to 'int', possible loss of data
      stl_tools/cwrapped.c(3751): warning C4244: '+=': conversion from 'Py_ssize_t' to 'int', possible loss of data
      stl_tools/cwrapped.c(3755): warning C4244: '+=': conversion from 'Py_ssize_t' to 'int', possible loss of data
      stl_tools/cwrapped.c(3768): warning C4244: '+=': conversion from 'Py_ssize_t' to 'int', possible loss of data
      stl_tools/cwrapped.c(3772): warning C4244: '+=': conversion from 'Py_ssize_t' to 'int', possible loss of data
      stl_tools/cwrapped.c(3785): warning C4244: '+=': conversion from 'Py_ssize_t' to 'int', possible loss of data
      stl_tools/cwrapped.c(3798): warning C4244: '+=': conversion from 'Py_ssize_t' to 'int', possible loss of data
      stl_tools/cwrapped.c(3802): warning C4244: '+=': conversion from 'Py_ssize_t' to 'int', possible loss of data
      stl_tools/cwrapped.c(3815): warning C4244: '+=': conversion from 'Py_ssize_t' to 'int', possible loss of data
      stl_tools/cwrapped.c(3819): warning C4244: '+=': conversion from 'Py_ssize_t' to 'int', possible loss of data
      stl_tools/cwrapped.c(3832): warning C4244: '+=': conversion from 'Py_ssize_t' to 'int', possible loss of data
      stl_tools/cwrapped.c(3845): warning C4244: '+=': conversion from 'Py_ssize_t' to 'int', possible loss of data
      stl_tools/cwrapped.c(3849): warning C4244: '+=': conversion from 'Py_ssize_t' to 'int', possible loss of data
      stl_tools/cwrapped.c(3862): warning C4244: '+=': conversion from 'Py_ssize_t' to 'int', possible loss of data
      stl_tools/cwrapped.c(3866): warning C4244: '+=': conversion from 'Py_ssize_t' to 'int', possible loss of data
      stl_tools/cwrapped.c(3879): warning C4244: '+=': conversion from 'Py_ssize_t' to 'int', possible loss of data
      stl_tools/cwrapped.c(5298): warning C4244: 'function': conversion from '__int64' to 'long', possible loss of data
      stl_tools/cwrapped.c(6170): warning C4244: '=': conversion from 'Py_ssize_t' to 'int', possible loss of data
      stl_tools/cwrapped.c(8178): warning C4244: 'function': conversion from 'Py_ssize_t' to 'int', possible loss of data
      stl_tools/cwrapped.c(16121): error C2105: '++' needs l-value
      stl_tools/cwrapped.c(16124): error C2105: '--' needs l-value
      stl_tools/cwrapped.c(16358): error C2105: '++' needs l-value
      stl_tools/cwrapped.c(16361): error C2105: '--' needs l-value
      stl_tools/cwrapped.c(16643): error C2105: '++' needs l-value
      stl_tools/cwrapped.c(16646): error C2105: '--' needs l-value
      stl_tools/cwrapped.c(17754): warning C4996: '_PyUnicode_get_wstr_length': deprecated in 3.3
      stl_tools/cwrapped.c(17770): warning C4996: '_PyUnicode_get_wstr_length': deprecated in 3.3
      stl_tools/cwrapped.c(18763): warning C4996: 'PyEval_CallObjectWithKeywords': deprecated in 3.9
      stl_tools/cwrapped.c(18951): warning C4996: 'PyUnicode_FromUnicode': deprecated in 3.3
      stl_tools/cwrapped.c(18992): error C2039: 'exc_type': is not a member of '_ts'
      C:\Program Files\Python310\include\cpython/pystate.h(60): note: see declaration of '_ts'
      stl_tools/cwrapped.c(18993): error C2039: 'exc_value': is not a member of '_ts'
      C:\Program Files\Python310\include\cpython/pystate.h(60): note: see declaration of '_ts'
      stl_tools/cwrapped.c(18994): error C2039: 'exc_traceback': is not a member of '_ts'
      C:\Program Files\Python310\include\cpython/pystate.h(60): note: see declaration of '_ts'
      stl_tools/cwrapped.c(18995): error C2039: 'exc_type': is not a member of '_ts'
      C:\Program Files\Python310\include\cpython/pystate.h(60): note: see declaration of '_ts'
      stl_tools/cwrapped.c(18996): error C2039: 'exc_value': is not a member of '_ts'
      C:\Program Files\Python310\include\cpython/pystate.h(60): note: see declaration of '_ts'
      stl_tools/cwrapped.c(18997): error C2039: 'exc_traceback': is not a member of '_ts'
      C:\Program Files\Python310\include\cpython/pystate.h(60): note: see declaration of '_ts'
      stl_tools/cwrapped.c(19080): error C2039: 'exc_type': is not a member of '_ts'
      C:\Program Files\Python310\include\cpython/pystate.h(60): note: see declaration of '_ts'
      stl_tools/cwrapped.c(19081): error C2039: 'exc_value': is not a member of '_ts'
      C:\Program Files\Python310\include\cpython/pystate.h(60): note: see declaration of '_ts'
      stl_tools/cwrapped.c(19082): error C2039: 'exc_traceback': is not a member of '_ts'
      C:\Program Files\Python310\include\cpython/pystate.h(60): note: see declaration of '_ts'
      stl_tools/cwrapped.c(19094): error C2039: 'exc_type': is not a member of '_ts'
      C:\Program Files\Python310\include\cpython/pystate.h(60): note: see declaration of '_ts'
      stl_tools/cwrapped.c(19095): error C2039: 'exc_value': is not a member of '_ts'
      C:\Program Files\Python310\include\cpython/pystate.h(60): note: see declaration of '_ts'
      stl_tools/cwrapped.c(19096): error C2039: 'exc_traceback': is not a member of '_ts'
      C:\Program Files\Python310\include\cpython/pystate.h(60): note: see declaration of '_ts'
      stl_tools/cwrapped.c(19097): error C2039: 'exc_type': is not a member of '_ts'
      C:\Program Files\Python310\include\cpython/pystate.h(60): note: see declaration of '_ts'
      stl_tools/cwrapped.c(19098): error C2039: 'exc_value': is not a member of '_ts'
      C:\Program Files\Python310\include\cpython/pystate.h(60): note: see declaration of '_ts'
      stl_tools/cwrapped.c(19099): error C2039: 'exc_traceback': is not a member of '_ts'
      C:\Program Files\Python310\include\cpython/pystate.h(60): note: see declaration of '_ts'
      stl_tools/cwrapped.c(19837): warning C4244: 'function': conversion from 'const Py_ssize_t' to 'long', possible loss of data
      error: command 'C:\\Program Files (x86)\\Microsoft Visual Studio\\2019\\BuildTools\\VC\\Tools\\MSVC\\14.29.30133\\bin\\HostX86\\x64\\cl.exe' failed with exit code 2
      [end of output]

  note: This error originates from a subprocess, and is likely not a problem with pip.
error: legacy-install-failure

× Encountered error while trying to install package.
╰─> stl_tools

note: This is an issue with the package mentioned above, not pip.
hint: See above for output from the failure.


jimfred avatar Feb 21 '22 23:02 jimfred

me,too.

15399240803 avatar Jul 23 '22 05:07 15399240803

me, too. Is there anyone can help me ?

KyleLee1999 avatar Sep 20 '22 03:09 KyleLee1999

I have the same issue on Ubuntu 20.04. Could this be due to a too high Python version? Mine is 3.10

alexander-hagg avatar Nov 27 '22 12:11 alexander-hagg

me too. This package seems broken.

tangketan avatar May 10 '23 08:05 tangketan