Hello I was trying to install the neopixel plus library but i got this error, I tried to understand it but I doesn't totally understand, seams a file is missing and the name of the file seems to have an encoding error. Sorry for my english (I'm trying my best)
I have done research for a similar problem but i didn't find any,I still continue my research. Have a good day
PS C:\Users\couco> pip install neopixel-plus
Collecting neopixel-plus
Using cached neopixel_plus-1.7-py3-none-any.whl (15 kB)
Collecting rpi-ws281x
Using cached rpi_ws281x-4.3.4.tar.gz (64 kB)
Preparing metadata (setup.py) ... done
Collecting adafruit-circuitpython-neopixel
Using cached adafruit_circuitpython_neopixel-6.3.1-py3-none-any.whl
Collecting colr
Using cached Colr-0.9.1-py3-none-any.whl
Collecting adafruit-circuitpython-pixelbuf
Using cached adafruit_circuitpython_pixelbuf-1.1.4-py3-none-any.whl
Collecting Adafruit-Blinka
Using cached Adafruit_Blinka-8.0.1-py3-none-any.whl
Collecting Adafruit-PlatformDetect>=3.13.0
Using cached Adafruit_PlatformDetect-3.24.1-py3-none-any.whl
Collecting adafruit-circuitpython-typing
Using cached adafruit_circuitpython_typing-1.7.1-py3-none-any.whl
Collecting Adafruit-PureIO>=1.1.7
Using cached Adafruit_PureIO-1.1.9-py3-none-any.whl
Collecting pyftdi>=0.40.0
Using cached pyftdi-0.54.0-py3-none-any.whl (144 kB)
Collecting pyusb!=1.2.0,>=1.0.0
Using cached pyusb-1.2.1-py3-none-any.whl (58 kB)
Collecting pyserial>=3.0
Using cached pyserial-3.5-py2.py3-none-any.whl (90 kB)
Collecting adafruit-circuitpython-busdevice
Using cached adafruit_circuitpython_busdevice-5.1.9-py3-none-any.whl
Building wheels for collected packages: rpi-ws281x
Building wheel for rpi-ws281x (setup.py) ... error
error: subprocess-exited-with-error
× python setup.py bdist_wheel did not run successfully.
│ exit code: 1
╰─> [18 lines of output]
running bdist_wheel
running build
running build_py
Compiling ws281x library...
creating build
creating build\lib.win-amd64-3.9
creating build\lib.win-amd64-3.9\rpi_ws281x
copying rpi_ws281x\rpi_ws281x.py -> build\lib.win-amd64-3.9\rpi_ws281x
copying rpi_ws281x\__init__.py -> build\lib.win-amd64-3.9\rpi_ws281x
running build_ext
building '_rpi_ws281x' extension
creating build\temp.win-amd64-3.9
creating build\temp.win-amd64-3.9\Release
creating build\temp.win-amd64-3.9\Release\lib
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 -I. -IC:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.9_3.9.3568.0_x64__qbz5n2kfra8p0\include -IC:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.9_3.9.3568.0_x64__qbz5n2kfra8p0\include -IC:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\VC\Tools\MSVC\14.29.30133\include -IC:\Program Files (x86)\Windows Kits\NETFXSDK\4.8\include\um -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 /Tclib/dma.c /Fobuild\temp.win-amd64-3.9\Release\lib/dma.obj
dma.c
lib/dma.c(35): fatal error C1083: Impossible d'ouvrir le fichier includeÿ: 'unistd.h'ÿ: No such file or directory
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: Failed building wheel for rpi-ws281x
Running setup.py clean for rpi-ws281x
Failed to build rpi-ws281x
Installing collected packages: rpi-ws281x, pyserial, colr, pyusb, Adafruit-PureIO, Adafruit-PlatformDetect, pyftdi, adafruit-circuitpython-busdevice, adafruit-circuitpython-typing, Adafruit-Blinka, adafruit-circuitpython-pixelbuf, adafruit-circuitpython-neopixel, neopixel-plus
Running setup.py install for rpi-ws281x ... error
error: subprocess-exited-with-error
× Running setup.py install for rpi-ws281x did not run successfully.
│ exit code: 1
╰─> [18 lines of output]
running install
running build
running build_py
Compiling ws281x library...
creating build
creating build\lib.win-amd64-3.9
creating build\lib.win-amd64-3.9\rpi_ws281x
copying rpi_ws281x\rpi_ws281x.py -> build\lib.win-amd64-3.9\rpi_ws281x
copying rpi_ws281x\__init__.py -> build\lib.win-amd64-3.9\rpi_ws281x
running build_ext
building '_rpi_ws281x' extension
creating build\temp.win-amd64-3.9
creating build\temp.win-amd64-3.9\Release
creating build\temp.win-amd64-3.9\Release\lib
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 -I. -IC:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.9_3.9.3568.0_x64__qbz5n2kfra8p0\include -IC:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.9_3.9.3568.0_x64__qbz5n2kfra8p0\include -IC:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\VC\Tools\MSVC\14.29.30133\include -IC:\Program Files (x86)\Windows Kits\NETFXSDK\4.8\include\um -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 /Tclib/dma.c /Fobuild\temp.win-amd64-3.9\Release\lib/dma.obj
dma.c
lib/dma.c(35): fatal error C1083: Impossible d'ouvrir le fichier includeÿ: 'unistd.h'ÿ: No such file or directory
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.
╰─> rpi-ws281x
note: This is an issue with the package mentioned above, not pip.
hint: See above for output from the failure.
Thanks
Related
I've been trying to install pysqlite via pip, but I get this error using the console command: pip install pysqlite3:
Collecting pysqlite3
Using cached pysqlite3-0.5.0.tar.gz (40 kB)
Preparing metadata (setup.py) ... done
Building wheels for collected packages: pysqlite3
Building wheel for pysqlite3 (setup.py) ... error
error: subprocess-exited-with-error
× python setup.py bdist_wheel did not run successfully.
│ exit code: 1
╰─> [18 lines of output]
running bdist_wheel
running build
running build_py
creating build
creating build\lib.win-amd64-cpython-311
creating build\lib.win-amd64-cpython-311\pysqlite3
copying pysqlite3\dbapi2.py -> build\lib.win-amd64-cpython-311\pysqlite3
copying pysqlite3\__init__.py -> build\lib.win-amd64-cpython-311\pysqlite3
running build_ext
Builds a C extension linking against libsqlite3 library
building 'pysqlite3._sqlite3' extension
creating build\temp.win-amd64-cpython-311
creating build\temp.win-amd64-cpython-311\Release
creating build\temp.win-amd64-cpython-311\Release\src
"C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\VC\Tools\MSVC\14.29.30133\bin\HostX86\x64\cl.exe" /c /nologo /O2 /W3 /GL /DNDEBUG /MD -DMODULE_NAME=\"pysqlite3.dbapi2\" -I/usr/include "-IC:\Users\USUARIO\Documents\VSCode Projects\env\include" -IC:\Users\USUARIO\AppData\Local\Programs\Python\Python311\include -IC:\Users\USUARIO\AppData\Local\Programs\Python\Python311\Include "-IC:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\VC\Tools\MSVC\14.29.30133\include" "-IC:\Program Files (x86)\Windows Kits\NETFXSDK\4.8\include\um" "-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" /Tcsrc\blob.c /Fobuild\temp.win-amd64-cpython-311\Release\src\blob.obj
blob.c
C:\Users\USUARIO\AppData\Local\Temp\pip-install-repsnu9p\pysqlite3_2227e0dab76349b680a8874662134523\src\blob.h(4): fatal error C1083: No se puede abrir el archivo incluir: 'sqlite3.h': No such file or directory
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: Failed building wheel for pysqlite3
Running setup.py clean for pysqlite3
Failed to build pysqlite3
Installing collected packages: pysqlite3
Running setup.py install for pysqlite3 ... error
error: subprocess-exited-with-error
× Running setup.py install for pysqlite3 did not run successfully.
│ exit code: 1
╰─> [20 lines of output]
running install
C:\Users\USUARIO\Documents\VSCode Projects\env\Lib\site-packages\setuptools\command\install.py:34: SetuptoolsDeprecationWarning: setup.py install is deprecated. Use build and pip and other standards-based tools.
warnings.warn(
running build
running build_py
creating build
creating build\lib.win-amd64-cpython-311
creating build\lib.win-amd64-cpython-311\pysqlite3
copying pysqlite3\dbapi2.py -> build\lib.win-amd64-cpython-311\pysqlite3
copying pysqlite3\__init__.py -> build\lib.win-amd64-cpython-311\pysqlite3
running build_ext
Builds a C extension linking against libsqlite3 library
building 'pysqlite3._sqlite3' extension
creating build\temp.win-amd64-cpython-311
creating build\temp.win-amd64-cpython-311\Release
creating build\temp.win-amd64-cpython-311\Release\src
"C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\VC\Tools\MSVC\14.29.30133\bin\HostX86\x64\cl.exe" /c /nologo /O2 /W3 /GL /DNDEBUG /MD -DMODULE_NAME=\"pysqlite3.dbapi2\" -I/usr/include "-IC:\Users\USUARIO\Documents\VSCode Projects\env\include" -IC:\Users\USUARIO\AppData\Local\Programs\Python\Python311\include -IC:\Users\USUARIO\AppData\Local\Programs\Python\Python311\Include "-IC:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\VC\Tools\MSVC\14.29.30133\include" "-IC:\Program Files (x86)\Windows Kits\NETFXSDK\4.8\include\um" "-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" /Tcsrc\blob.c /Fobuild\temp.win-amd64-cpython-311\Release\src\blob.obj
blob.c
C:\Users\USUARIO\AppData\Local\Temp\pip-install-repsnu9p\pysqlite3_2227e0dab76349b680a8874662134523\src\blob.h(4): fatal error C1083: No se puede abrir el archivo incluir: 'sqlite3.h': No such file or directory
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.
╰─> pysqlite3
note: This is an issue with the package mentioned above, not pip.
hint: See above for output from the failure.
I need to implement pysqlite3 in python, but there seem to be various bugs which I don't understand. I also tried to install everything in a virtual environment (virtualenv) because I thought it might be an incompatibility of one of the packages I already have (like Flask, numpy, ect), but I keep getting the same error.
I also tried to install some specific version of pysqlite3 using pip install pysqlite3=={version}, but none of this has worked, the error remains the same.
I have tried updating pip, wheel and setuptools, but the error persists. Does anyone know how to fix it and be able to install pysqlite3?
I get this error when I try to install hunspell. I have tried all the suggestions on stackoverflow including:
pip install cyhunspell
Installing Viusal Studio Build tools withh MSVC v143 and Windows 11 sdk.
downloaded hunspell from ezwinports and added bin to path.
and many other suggestion online but nothing seems to work.
I have windows 10 and I am using Python 3.10.9, pip 22.3.1
C:\Users\abhim>pip install hunspell
Collecting hunspell
Using cached hunspell-0.5.5.tar.gz (34 kB)
Preparing metadata (setup.py) ... done
Building wheels for collected packages: hunspell
Building wheel for hunspell (setup.py) ... error
error: subprocess-exited-with-error
× python setup.py bdist_wheel did not run successfully.
│ exit code: 1
╰─> [12 lines of output]
running bdist_wheel
running build
running build_ext
building 'hunspell' extension
creating build
creating build\temp.win-amd64-cpython-310
creating build\temp.win-amd64-cpython-310\Release
"C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\VC\Tools\MSVC\14.34.31933\bin\HostX86\x64\cl.exe" /c /nologo /O2 /W3 /GL /DNDEBUG /MD -DHUNSPELL_STATIC -IV:/hunspell-1.3.3/src/hunspell -IC:\Users\abhim\AppData\Local\Programs\Python\Python310\include -IC:\Users\abhim\AppData\Local\Programs\Python\Python310\Include "-IC:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\VC\Tools\MSVC\14.34.31933\include" "-IC:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\VC\Auxiliary\VS\include" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.22000.0\ucrt" "-IC:\Program Files (x86)\Windows Kits\10\\include\10.0.22000.0\\um" "-IC:\Program Files (x86)\Windows Kits\10\\include\10.0.22000.0\\shared" "-IC:\Program Files (x86)\Windows Kits\10\\include\10.0.22000.0\\winrt" "-IC:\Program Files (x86)\Windows Kits\10\\include\10.0.22000.0\\cppwinrt" "-IC:\Program Files (x86)\Windows Kits\NETFXSDK\4.8\include\um" /EHsc /Tphunspell.cpp /Fobuild\temp.win-amd64-cpython-310\Release\hunspell.obj /MT
cl : Command line warning D9025 : overriding '/MD' with '/MT'
hunspell.cpp
hunspell.cpp(20): fatal error C1083: Cannot open include file: 'hunspell.hxx': No such file or directory
error: command 'C:\\Program Files (x86)\\Microsoft Visual Studio\\2022\\BuildTools\\VC\\Tools\\MSVC\\14.34.31933\\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: Failed building wheel for hunspell
Running setup.py clean for hunspell
Failed to build hunspell
Installing collected packages: hunspell
Running setup.py install for hunspell ... error
error: subprocess-exited-with-error
× Running setup.py install for hunspell did not run successfully.
│ exit code: 1
╰─> [14 lines of output]
running install
C:\Users\abhim\AppData\Local\Programs\Python\Python310\lib\site-packages\setuptools\command\install.py:34: SetuptoolsDeprecationWarning: setup.py install is deprecated. Use build and pip and other standards-based tools.
warnings.warn(
running build
running build_ext
building 'hunspell' extension
creating build
creating build\temp.win-amd64-cpython-310
creating build\temp.win-amd64-cpython-310\Release
"C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\VC\Tools\MSVC\14.34.31933\bin\HostX86\x64\cl.exe" /c /nologo /O2 /W3 /GL /DNDEBUG /MD -DHUNSPELL_STATIC -IV:/hunspell-1.3.3/src/hunspell -IC:\Users\abhim\AppData\Local\Programs\Python\Python310\include -IC:\Users\abhim\AppData\Local\Programs\Python\Python310\Include "-IC:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\VC\Tools\MSVC\14.34.31933\include" "-IC:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\VC\Auxiliary\VS\include" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.22000.0\ucrt" "-IC:\Program Files (x86)\Windows Kits\10\\include\10.0.22000.0\\um" "-IC:\Program Files (x86)\Windows Kits\10\\include\10.0.22000.0\\shared" "-IC:\Program Files (x86)\Windows Kits\10\\include\10.0.22000.0\\winrt" "-IC:\Program Files (x86)\Windows Kits\10\\include\10.0.22000.0\\cppwinrt" "-IC:\Program Files (x86)\Windows Kits\NETFXSDK\4.8\include\um" /EHsc /Tphunspell.cpp /Fobuild\temp.win-amd64-cpython-310\Release\hunspell.obj /MT
cl : Command line warning D9025 : overriding '/MD' with '/MT'
hunspell.cpp
hunspell.cpp(20): fatal error C1083: Cannot open include file: 'hunspell.hxx': No such file or directory
error: command 'C:\\Program Files (x86)\\Microsoft Visual Studio\\2022\\BuildTools\\VC\\Tools\\MSVC\\14.34.31933\\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.
╰─> hunspell
note: This is an issue with the package mentioned above, not pip.
hint: See above for output from the failure.
I am trying to install pygrib on windows. i already installed VS build tools for c++
I am getting this error
`Building wheels for collected packages: pygrib
Building wheel for pygrib (pyproject.toml) ... error
error: subprocess-exited-with-error
× Building wheel for pygrib (pyproject.toml) did not run successfully.
│ exit code: 1
╰─> [22 lines of output]
eccodes not found, build may fail...
running bdist_wheel
running build
running build_py
creating build
creating build\lib.win-amd64-cpython-38
creating build\lib.win-amd64-cpython-38\pygrib
copying src\pygrib\__init__.py -> build\lib.win-amd64-cpython-38\pygrib
running build_ext
cythoning src/pygrib/_pygrib.pyx to src/pygrib\_pygrib.c
building 'pygrib._pygrib' extension
creating build\temp.win-amd64-cpython-38
creating build\temp.win-amd64-cpython-38\Release
creating build\temp.win-amd64-cpython-38\Release\src
creating build\temp.win-amd64-cpython-38\Release\src\pygrib
"C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\VC\Tools\MSVC\14.33.31629\bin\HostX86\x64\cl.exe" /c /nologo /O2 /W3 /GL /DNDEBUG /MD -Ic:\users\zahee\appdata\local\programs\python\python38\include -Ic:\users\zahee\appdata\local\programs\python\python38\Include -IC:\Users\zahee\AppData\Local\Temp\pip-build-env-a8xx5o11\overlay\Lib\site-packages\numpy\core\include "-IC:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\VC\Tools\MSVC\14.33.31629\include" "-IC:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\VC\Auxiliary\VS\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\\um" "-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\\winrt" "-IC:\Program Files (x86)\Windows Kits\10\\include\10.0.19041.0\\cppwinrt" "-IC:\Program Files (x86)\Windows Kits\NETFXSDK\4.8\include\um" /Tcsrc/pygrib\_pygrib.c /Fobuild\temp.win-amd64-cpython-38\Release\src/pygrib\_pygrib.obj
_pygrib.c
C:\Users\zahee\AppData\Local\Temp\pip-build-env-a8xx5o11\overlay\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
src/pygrib\_pygrib.c(756): fatal error C1083: Cannot open include file: 'grib_api.h': No such file or directory
C:\Users\zahee\AppData\Local\Temp\pip-build-env-a8xx5o11\overlay\Lib\site-packages\Cython\Compiler\Main.py:369: FutureWarning: Cython directive 'language_level' not set, using 2 for now (Py2). This will change in a later release! File: C:\Users\zahee\AppData\Local\Temp\pip-install-9rng5s0e\pygrib_20eaa5920fdd4d09ae6fbbe6d3015227\src\pygrib\_pygrib.pyx
tree = Parsing.p_module(s, pxd, full_module_name)
error: command 'C:\\Program Files (x86)\\Microsoft Visual Studio\\2022\\BuildTools\\VC\\Tools\\MSVC\\14.33.31629\\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: Failed building wheel for pygrib
Failed to build pygrib
ERROR: Could not build wheels for pygrib, which is required to install pyproject.toml-based projects`
` fatal error C1083: Cannot open include file: 'grib_api.h': No such file or directory
`
also tried clone pygrib repo https://jswhit.github.io/pygrib/installing.html but `grib_api.h` not exists in the path.
can anyone help with this issue. I am trying to make an executable using windows.
the code running perfect on macos and linux.
thank you
I have been trying to install the python package annoy but it always gives an error, I have tried different methods but they don't work.
I have even tried to install the module manually but it does not work either
My Code:
pip install annoy
Error:
Collecting annoy
Using cached annoy-1.17.0.tar.gz (646 kB)
Preparing metadata (setup.py): started
Preparing metadata (setup.py): finished with status 'done'
Building wheels for collected packages: annoy
Building wheel for annoy (setup.py): started
Building wheel for annoy (setup.py): finished with status 'error'
Running setup.py clean for annoy
Failed to build annoy
Installing collected packages: annoy
Running setup.py install for annoy: started
Running setup.py install for annoy: finished with status 'error'
error: subprocess-exited-with-error
python setup.py bdist_wheel did not run successfully.
exit code: 1
[18 lines of output]
running bdist_wheel
running build
running build_py
creating build
creating build\lib.win-amd64-3.10
creating build\lib.win-amd64-3.10\annoy
copying annoy\__init__.py -> build\lib.win-amd64-3.10\annoy
warning: build_py: byte-compiling is disabled, skipping.
running build_ext
building 'annoy.annoylib' extension
creating build\temp.win-amd64-3.10
creating build\temp.win-amd64-3.10\Release
creating build\temp.win-amd64-3.10\Release\src
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:\Users\Tainu\AppData\Local\Programs\Python\Python310\include -IC:\Users\Tainu\AppData\Local\Programs\Python\Python310\Include -IC:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\VC\Tools\MSVC\14.29.30133\include -IC:\Program Files (x86)\Windows Kits\NETFXSDK\4.8\include\um /EHsc /Tpsrc/annoymodule.cc /Fobuild\temp.win-amd64-3.10\Release\src/annoymodule.obj -D_CRT_SECURE_NO_WARNINGS -DANNOYLIB_MULTITHREADED_BUILD
annoymodule.cc
C:\Users\Tainu\AppData\Local\Temp\pip-install-3by5ea7a\annoy_d20fa133de45438cb5f39d6b5b50b96b\src\annoylib.h(19): fatal error C1083: Cannot open include file: 'stdio.h': No such file or directory
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: Failed building wheel for annoy
error: subprocess-exited-with-error
Running setup.py install for annoy did not run successfully.
exit code: 1
[18 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\annoy
copying annoy\__init__.py -> build\lib.win-amd64-3.10\annoy
warning: build_py: byte-compiling is disabled, skipping.
running build_ext
building 'annoy.annoylib' extension
creating build\temp.win-amd64-3.10
creating build\temp.win-amd64-3.10\Release
creating build\temp.win-amd64-3.10\Release\src
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:\Users\Tainu\AppData\Local\Programs\Python\Python310\include -IC:\Users\Tainu\AppData\Local\Programs\Python\Python310\Include -IC:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\VC\Tools\MSVC\14.29.30133\include -IC:\Program Files (x86)\Windows Kits\NETFXSDK\4.8\include\um /EHsc /Tpsrc/annoymodule.cc /Fobuild\temp.win-amd64-3.10\Release\src/annoymodule.obj -D_CRT_SECURE_NO_WARNINGS -DANNOYLIB_MULTITHREADED_BUILD
annoymodule.cc
C:\Users\Tainu\AppData\Local\Temp\pip-install-3by5ea7a\annoy_d20fa133de45438cb5f39d6b5b50b96b\src\annoylib.h(19): fatal error C1083: Cannot open include file: 'stdio.h': No such file or directory
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.
annoy
note: This is an issue with the package mentioned above, not pip.
hint: See above for output from the failure.
My python version is 3.10, Windows 11 64-bit
I am using Pycharm
any help would be welcome
Below command worked in my case.
pipwin install annoy
Try installing with conda.
A lot of libraries that require C/C++ code to be compiled as part of their build and installation can be finicky on windows machines.
https://anaconda.org/conda-forge/python-annoy
This article might help too
https://www.programmersought.com/article/95834605670/
I don't have much knowledge for technical details of installing packages, etc, so this might be a stupid question. I simply first downloaded GLPK and added it to the path, and then tried to install pyglpk through pip install glpk, which gives the following error messages:
Collecting glpk
Using cached https://files.pythonhosted.org/packages/74/e0/8676d8d5404a8f9aee298985d21aae67b776476b01583ff1a3e0030e2f51/glpk-0.4.5.tar.gz
Installing build dependencies ... done
Getting requirements to build wheel ... done
Preparing wheel metadata ... done
Building wheels for collected packages: glpk
Building wheel for glpk (PEP 517) ... error
ERROR: Complete output from command 'C:\Users\User\Anaconda3\python.exe' 'C:\Users\User\Anaconda3\lib\site-packages\pip\_vendor\pep517\_in_process.py' build_wheel 'C:\Users\User\AppData\Local\Temp\tmpzvxrzwqg':
ERROR: running bdist_wheel
running build
running build_ext
building 'glpk' extension
creating build
creating build\temp.win-amd64-3.7
creating build\temp.win-amd64-3.7\Release
creating build\temp.win-amd64-3.7\Release\src
C:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools\VC\Tools\MSVC\14.15.26726\bin\HostX86\x64\cl.exe /c /nologo /Ox /W3 /GL /DNDEBUG /MD -DVERSION_NUMBER="0.4.5" -IC:\Users\User\Anaconda3\include -IC:\Users\User\Anaconda3\include "-IC:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools\VC\Tools\MSVC\14.15.26726\include" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.17134.0\ucrt" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.17134.0\shared" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.17134.0\um" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.17134.0\winrt" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.17134.0\cppwinrt" /Tcsrc\glpk.c /Fobuild\temp.win-amd64-3.7\Release\src\glpk.obj
glpk.c
c:\users\user\appdata\local\temp\pip-install-m71t9t2y\glpk\src\lp.h(24): fatal error C1083: Cannot open include file: 'glpk.h': No such file or directory
error: command 'C:\\Program Files (x86)\\Microsoft Visual Studio\\2017\\BuildTools\\VC\\Tools\\MSVC\\14.15.26726\\bin\\HostX86\\x64\\cl.exe' failed with exit status 2
----------------------------------------
ERROR: Failed building wheel for glpk
Running setup.py clean for glpk
Failed to build glpk
ERROR: Could not build wheels for glpk which use PEP 517 and cannot be installed directly
I tried to search for different installation tutorials or questions online, but most of them are for Linux/MacOS, but not for Windows. What can I do about this?
I found a solution to run glpk in python without using PIP. I get the same issue and couldn't solve it with PIP.
First thing is download GLPK solver:
https://sourceforge.net/projects/winglpk/
GLPK is based in C. You must check where is a file called glpsol.exe
And add that directory to the path.
look remarked txt in this image
After that you can run your pyomo model and select GLPK as your solver.
It is looking for glpk.h in the folder C:\Users\User\Anaconda3\include. You can make the installation succeed by copying glpk.h from the GLPK installation into that folder. You will also need to copy glpk.lib into C:\Users\User\Anaconda3\libs.