I am new relatively new to Python and working with Anaconda and I attempting to install NLPre using the following commands within the Anaconda command prompt:
pip install nlpre
The install hangs when installing build dependencies for spacy 2.1.0 and I get the following long output:
Collecting spacy==2.1.0
Using cached spacy-2.1.0.tar.gz (27.7 MB)
Installing build dependencies ... error
error: subprocess-exited-with-error
Collecting setuptools
Using cached setuptools-65.0.2-py3-none-any.whl (1.2 MB)
Collecting wheel>0.32.0.<0.33.0
Using cached wheel-0.37.1-py2.py3-none-any.whl (35 kB)
Collecting Cython
Using cached Cython-0.29.32-py2.py3-none-any.whl (986 kB)
Collecting cymem<2.1.0,>=2.0.2
Using cached cymem-2.0.6-cp39-cp39-win_amd64.whl (36 kB)
Collecting preshed<2.1.0,>=2.0.1
Using cached preshed-2.0.1.tar.gz (113 kB)
Preparing metadata (setup.py): started
Preparing metadata (setup.py): finished with status 'done'
Collecting murmurhash<1.1.0,>=0.28.0
Using cached murmurhash-1.0.8-cp39-cp39-win_amd64.whl (18 kB)
Collecting thinc==7.0.0.dev6
Using cached thinc-7.0.0.dev6.tar.gz (1.9 MB)
Preparing metadata (setup.py): started
Preparing metadata (setup.py): finished with status 'done'
Collecting blis<0.3.0,>=0.2.1
Using cached blis-0.2.4.tar.gz (1.5 MB)
Preparing metadata (setup.py): started
Preparing metadata (setup.py): finished with status 'done'
Collecting thinc_gpu_ops<0.1.0,>=0.0.1
Using cached thinc_gpu_ops-0.0.4-py3-none-any.whl
Collecting numpy>=1.7.0
Using cached numpy-1.23.2-cp39-cp39-win_amd64.whl (14.7 MB)
Collecting wrapt<1.11.0,>=1.10.0
Using cached wrapt-1.10.11-py3-none-any.whl
Collecting plac<1.0.0,>=0.9.6
Using cached plac-0.9.6-py2.py3-none-any.whl (20 kB)
Collecting tqdm<5.0.0,>=4.10.0
Using cached tqdm-4.64.0-py2.py3-none-any.whl (78 kB)
Collecting six<2.0.0,>=1.10.0
Using cached six-1.16.0-py2.py3-none-any.whl (11 kB)
Collecting wasabi<1.1.0,>=0.0.9
Using cached wasabi-0.10.1-py3-none-any.whl (26 kB)
Collecting srsly<1.1.0,>=0.0.5
Using cached srsly-1.0.5-cp39-cp39-win_amd64.whl (177 kB)
Collecting colorama
Using cached colorama-0.4.5-py2.py3-none-any.whl (16 kB)
Building wheels for collected packages: thinc, preshed, blis
Building wheel for thinc (setup.py): started
Building wheel for thinc (setup.py): finished with status 'error'
error: subprocess-exited-with-error
python setup.py bdist_wheel did not run successfully.
exit code: 1
[176 lines of output]
running bdist_wheel
running build
running build_py
creating build
creating build\lib.win-amd64-3.9
creating build\lib.win-amd64-3.9\thinc
#I deleted some repetitive copy steps to save characters
copying thinc\extra\search.cpp -> build\lib.win-amd64-3.9\thinc\extra
running build_ext
building 'thinc.linalg' extension
creating build\temp.win-amd64-3.9
creating build\temp.win-amd64-3.9\Release
creating build\temp.win-amd64-3.9\Release\thinc
"C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.33.31629\bin\HostX86\x64\cl.exe" /c /nologo /O2 /W3 /GL /DNDEBUG /MD -IC:\Users\hudsonad\Anaconda3\include -IC:\Users\hudsonad\AppData\Local\Temp\1\pip-install-xwlhseua\thinc_528ca1a5c727434bb1c9be6a9cf85be1\include -IC:\Users\hudsonad\Anaconda3\include -IC:\Users\hudsonad\Anaconda3\Include "-IC:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.33.31629\include" "-IC:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.33.31629\ATLMFC\include" "-IC:\Program Files\Microsoft Visual Studio\2022\Community\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 /Tpthinc/linalg.cpp /Fobuild\temp.win-amd64-3.9\Release\thinc/linalg.obj /Ox /EHsc
linalg.cpp
thinc/linalg.cpp(201): warning C4804: '/': unsafe use of type 'bool' in operation
thinc/linalg.cpp(1910): warning C4244: '=': conversion from 'double' to '__pyx_t_5thinc_8typedefs_weight_t', possible loss of data
thinc/linalg.cpp(2350): warning C4244: '=': conversion from 'double' to '__pyx_t_5thinc_8typedefs_weight_t', possible loss of data
thinc/linalg.cpp(2397): warning C4244: '=': conversion from 'double' to '__pyx_t_5thinc_8typedefs_weight_t', possible loss of data
thinc/linalg.cpp(2564): warning C4244: '=': conversion from 'double' to '__pyx_t_5thinc_8typedefs_weight_t', possible loss of data
thinc/linalg.cpp(3232): warning C4244: 'argument': conversion from 'double' to '__pyx_t_5thinc_8typedefs_weight_t', possible loss of data
thinc/linalg.cpp(3872): error C2039: 'tp_print': is not a member of '_typeobject'
C:\Users\hudsonad\Anaconda3\include\cpython/object.h(193): note: see declaration of '_typeobject'
thinc/linalg.cpp(3897): error C2039: 'tp_print': is not a member of '_typeobject'
C:\Users\hudsonad\Anaconda3\include\cpython/object.h(193): note: see declaration of '_typeobject'
thinc/linalg.cpp(3916): error C2039: 'tp_print': is not a member of '_typeobject'
C:\Users\hudsonad\Anaconda3\include\cpython/object.h(193): note: see declaration of '_typeobject'
thinc/linalg.cpp(3927): error C2039: 'tp_print': is not a member of '_typeobject'
C:\Users\hudsonad\Anaconda3\include\cpython/object.h(193): note: see declaration of '_typeobject'
error: command 'C:\\Program Files\\Microsoft Visual Studio\\2022\\Community\\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 thinc
Running setup.py clean for thinc
Building wheel for preshed (setup.py): started
Building wheel for preshed (setup.py): finished with status 'error'
error: subprocess-exited-with-error
python setup.py bdist_wheel did not run successfully.
exit code: 1
[42 lines of output]
C:\Users\hudsonad\Anaconda3\lib\site-packages\setuptools\installer.py:27: SetuptoolsDeprecationWarning: setuptools.installer is deprecated. Requirements should be satisfied by a PEP 517 installer.
warnings.warn(
running bdist_wheel
running build
running build_py
creating build
creating build\lib.win-amd64-3.9
creating build\lib.win-amd64-3.9\preshed
copying preshed\about.py -> build\lib.win-amd64-3.9\preshed
copying preshed\__init__.py -> build\lib.win-amd64-3.9\preshed
creating build\lib.win-amd64-3.9\preshed\tests
copying preshed\tests\test_counter.py -> build\lib.win-amd64-3.9\preshed\tests
copying preshed\tests\test_hashing.py -> build\lib.win-amd64-3.9\preshed\tests
copying preshed\tests\test_pop.py -> build\lib.win-amd64-3.9\preshed\tests
copying preshed\tests\__init__.py -> build\lib.win-amd64-3.9\preshed\tests
copying preshed\counter.pyx -> build\lib.win-amd64-3.9\preshed
copying preshed\maps.pyx -> build\lib.win-amd64-3.9\preshed
copying preshed\counter.pxd -> build\lib.win-amd64-3.9\preshed
copying preshed\maps.pxd -> build\lib.win-amd64-3.9\preshed
copying preshed\__init__.pxd -> build\lib.win-amd64-3.9\preshed
running build_ext
building 'preshed.maps' extension
creating build\temp.win-amd64-3.9
creating build\temp.win-amd64-3.9\Release
creating build\temp.win-amd64-3.9\Release\preshed
"C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.33.31629\bin\HostX86\x64\cl.exe" /c /nologo /O2 /W3 /GL /DNDEBUG /MD -IC:\Users\hudsonad\Anaconda3\include -IC:\Users\hudsonad\Anaconda3\include -IC:\Users\hudsonad\Anaconda3\Include "-IC:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.33.31629\include" "-IC:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.33.31629\ATLMFC\include" "-IC:\Program Files\Microsoft Visual Studio\2022\Community\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 /Tppreshed/maps.cpp /Fobuild\temp.win-amd64-3.9\Release\preshed/maps.obj /Ox /EHsc
maps.cpp
preshed/maps.cpp(5728): error C2039: 'tp_print': is not a member of '_typeobject'
C:\Users\hudsonad\Anaconda3\include\cpython/object.h(193): note: see declaration of '_typeobject'
preshed/maps.cpp(5740): error C2039: 'tp_print': is not a member of '_typeobject'
C:\Users\hudsonad\Anaconda3\include\cpython/object.h(193): note: see declaration of '_typeobject'
preshed/maps.cpp(5749): error C2039: 'tp_print': is not a member of '_typeobject'
C:\Users\hudsonad\Anaconda3\include\cpython/object.h(193): note: see declaration of '_typeobject'
preshed/maps.cpp(5755): error C2039: 'tp_print': is not a member of '_typeobject'
C:\Users\hudsonad\Anaconda3\include\cpython/object.h(193): note: see declaration of '_typeobject'
preshed/maps.cpp(5761): error C2039: 'tp_print': is not a member of '_typeobject'
C:\Users\hudsonad\Anaconda3\include\cpython/object.h(193): note: see declaration of '_typeobject'
preshed/maps.cpp(5767): error C2039: 'tp_print': is not a member of '_typeobject'
C:\Users\hudsonad\Anaconda3\include\cpython/object.h(193): note: see declaration of '_typeobject'
preshed/maps.cpp(6129): warning C4996: '_PyUnicode_get_wstr_length': deprecated in 3.3
preshed/maps.cpp(6145): warning C4996: '_PyUnicode_get_wstr_length': deprecated in 3.3
error: command 'C:\\Program Files\\Microsoft Visual Studio\\2022\\Community\\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 preshed
Running setup.py clean for preshed
Building wheel for blis (setup.py): started
Building wheel for blis (setup.py): finished with status 'error'
error: subprocess-exited-with-error
python setup.py bdist_wheel did not run successfully.
exit code: 1
[33 lines of output]
BLIS_COMPILER? None
running bdist_wheel
running build
running build_py
creating build
creating build\lib.win-amd64-3.9
creating build\lib.win-amd64-3.9\blis
copying blis\about.py -> build\lib.win-amd64-3.9\blis
copying blis\benchmark.py -> build\lib.win-amd64-3.9\blis
copying blis\__init__.py -> build\lib.win-amd64-3.9\blis
creating build\lib.win-amd64-3.9\blis\tests
copying blis\tests\common.py -> build\lib.win-amd64-3.9\blis\tests
copying blis\tests\test_dotv.py -> build\lib.win-amd64-3.9\blis\tests
copying blis\tests\test_gemm.py -> build\lib.win-amd64-3.9\blis\tests
copying blis\tests\__init__.py -> build\lib.win-amd64-3.9\blis\tests
copying blis\cy.pyx -> build\lib.win-amd64-3.9\blis
copying blis\py.pyx -> build\lib.win-amd64-3.9\blis
copying blis\cy.pxd -> build\lib.win-amd64-3.9\blis
copying blis\__init__.pxd -> build\lib.win-amd64-3.9\blis
running build_ext
C:\Users\hudsonad\AppData\Local\Temp\1\pip-install-xwlhseua\blis_f6044dd4d07f48548964902c86472263\bin\cythonize.py:58: DeprecationWarning: distutils Version classes are deprecated. Use packaging.version instead.
if LooseVersion(cython_version) < LooseVersion('0.19'):
C:\Users\hudsonad\Anaconda3\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\hudsonad\AppData\Local\Temp\1\pip-install-xwlhseua\blis_f6044dd4d07f48548964902c86472263\blis\cy.pxd
tree = Parsing.p_module(s, pxd, full_module_name)
C:\Users\hudsonad\Anaconda3\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\hudsonad\AppData\Local\Temp\1\pip-install-xwlhseua\blis_f6044dd4d07f48548964902c86472263\blis\py.pyx
tree = Parsing.p_module(s, pxd, full_module_name)
Processing blis\cy.pyx
Processing blis\py.pyx
error: [WinError 2] The system cannot find the file specified
msvc
py_compiler msvc
{'LS_COLORS': 'rs=0:di=01;34:ln=01;36:mh=00:pi=40;33:so=01;35:do=01;35:bd=40;33;01:cd=40;33;01:or=40;31;01:mi=00:su=37;41:sg=30;43:ca=30;41:tw=30;42:ow=34;42:st=37;44:ex=01;32:*.tar=01;31:*.tgz=01;31:*.arc=01;31:*.arj=01;31:*.taz=01;31:*.lha=01;31:*.lz4=01;31:*.lzh=01;31:*.lzma=01;31:*.tlz=01;31:*.txz=01;31:*.tzo=01;31:*.t7z=01;31:*.zip=01;31:*.z=01;31:*.Z=01;31:*.dz=01;31:*.gz=01;31:*.lrz=01;31:*.lz=01;31:*.lzo=01;31:*.xz=01;31:*.zst=01;31:*.tzst=01;31:*.bz2=01;31:*.bz=01;31:*.tbz=01;31:*.tbz2=01;31:*.tz=01;31:*.deb=01;31:*.rpm=01;31:*.jar=01;31:*.war=01;31:*.ear=01;31:*.sar=01;31:*.rar=01;31:*.alz=01;31:*.ace=01;31:*.zoo=01;31:*.cpio=01;31:*.7z=01;31:*.rz=01;31:*.cab=01;31:*.wim=01;31:*.swm=01;31:*.dwm=01;31:*.esd=01;31:*.jpg=01;35:*.jpeg=01;35:*.mjpg=01;35:*.mjpeg=01;35:*.gif=01;35:*.bmp=01;35:*.pbm=01;35:*.pgm=01;35:*.ppm=01;35:*.tga=01;35:*.xbm=01;35:*.xpm=01;35:*.tif=01;35:*.tiff=01;35:*.png=01;35:*.svg=01;35:*.svgz=01;35:*.mng=01;35:*.pcx=01;35:*.mov=01;35:*.mpg=01;35:*.mpeg=01;35:*.m2v=01;35:*.mkv=01;35:*.webm=01;35:*.ogm=01;35:*.mp4=01;35:*.m4v=01;35:*.mp4v=01;35:*.vob=01;35:*.qt=01;35:*.nuv=01;35:*.wmv=01;35:*.asf=01;35:*.rm=01;35:*.rmvb=01;35:*.flc=01;35:*.avi=01;35:*.fli=01;35:*.flv=01;35:*.gl=01;35:*.dl=01;35:*.xcf=01;35:*.xwd=01;35:*.yuv=01;35:*.cgm=01;35:*.emf=01;35:*.ogv=01;35:*.ogx=01;35:*.aac=00;36:*.au=00;36:*.flac=00;36:*.m4a=00;36:*.mid=00;36:*.midi=00;36:*.mka=00;36:*.mp3=00;36:*.mpc=00;36:*.ogg=00;36:*.ra=00;36:*.wav=00;36:*.oga=00;36:*.opus=00;36:*.spx=00;36:*.xspf=00;36:', 'HOSTTYPE': 'x86_64', 'LESSCLOSE': '/usr/bin/lesspipe %s %s', 'LANG': 'C.UTF-8', 'OLDPWD': '/home/matt/repos/flame-blis', 'VIRTUAL_ENV': '/home/matt/repos/cython-blis/env3.6', 'USER': 'matt', 'PWD': '/home/matt/repos/cython-blis', 'HOME': '/home/matt', 'NAME': 'LAPTOP-OMKOB3VM', 'XDG_DATA_DIRS': '/usr/local/share:/usr/share:/var/lib/snapd/desktop', 'SHELL': '/bin/bash', 'TERM': 'xterm-256color', 'SHLVL': '1', 'LOGNAME': 'matt', 'PATH': '/home/matt/repos/cython-blis/env3.6/bin:/tmp/google-cloud-sdk/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/mnt/c/Users/matt/Documents/cmder/vendor/conemu-maximus5/ConEmu/Scripts:/mnt/c/Users/matt/Documents/cmder/vendor/conemu-maximus5:/mnt/c/Users/matt/Documents/cmder/vendor/conemu-maximus5/ConEmu:/mnt/c/Python37/Scripts:/mnt/c/Python37:/mnt/c/Program Files (x86)/Intel/Intel(R) Management Engine Components/iCLS:/mnt/c/Program Files/Intel/Intel(R) Management Engine Components/iCLS:/mnt/c/Windows/System32:/mnt/c/Windows:/mnt/c/Windows/System32/wbem:/mnt/c/Windows/System32/WindowsPowerShell/v1.0:/mnt/c/Program Files (x86)/Intel/Intel(R) Management Engine Components/DAL:/mnt/c/Program Files/Intel/Intel(R) Management Engine Components/DAL:/mnt/c/Program Files (x86)/Intel/Intel(R) Management Engine Components/IPT:/mnt/c/Program Files/Intel/Intel(R) Management Engine Components/IPT:/mnt/c/Program Files/Intel/WiFi/bin:/mnt/c/Program Files/Common Files/Intel/WirelessCommon:/mnt/c/Program Files (x86)/NVIDIA Corporation/PhysX/Common:/mnt/c/ProgramData/chocolatey/bin:/mnt/c/Program Files/Git/cmd:/mnt/c/Program Files/LLVM/bin:/mnt/c/Windows/System32:/mnt/c/Windows:/mnt/c/Windows/System32/wbem:/mnt/c/Windows/System32/WindowsPowerShell/v1.0:/mnt/c/Windows/System32/OpenSSH:/mnt/c/Program Files/nodejs:/mnt/c/Users/matt/AppData/Local/Microsoft/WindowsApps:/mnt/c/Users/matt/AppData/Local/Programs/Microsoft VS Code/bin:/mnt/c/Users/matt/AppData/Roaming/npm:/snap/bin:/mnt/c/Program Files/Oracle/VirtualBox', 'PS1': '(env3.6) \\[\\e]0;\\u#\\h: \\w\\a\\]${debian_chroot:+($debian_chroot)}\\[\\033[01;32m\\]\\u#\\h\\[\\033[00m\\]:\\[\\033[01;34m\\]\\w\\[\\033[00m\\]\\$ ', 'VAGRANT_HOME': '/home/matt/.vagrant.d/', 'LESSOPEN': '| /usr/bin/lesspipe %s', '_': '/home/matt/repos/cython-blis/env3.6/bin/python'}
clang -c C:\Users\hudsonad\AppData\Local\Temp\1\pip-install-xwlhseua\blis_f6044dd4d07f48548964902c86472263\blis\_src\config\bulldozer\bli_cntx_init_bulldozer.c -o C:\Users\hudsonad\AppData\Local\Temp\1\tmp_u4panl6\bli_cntx_init_bulldozer.o -O2 -funroll-all-loops -std=c99 -D_POSIX_C_SOURCE=200112L -DBLIS_VERSION_STRING="0.5.0-6" -DBLIS_IS_BUILDING_LIBRARY -Iinclude\windows-x86_64 -I.\frame\3\ -I.\frame\ind\ukernels\ -I.\frame\1m\ -I.\frame\1f\ -I.\frame\1\ -I.\frame\include -IC:\Users\hudsonad\AppData\Local\Temp\1\pip-install-xwlhseua\blis_f6044dd4d07f48548964902c86472263\blis\_src\include\windows-x86_64
[end of output]
note: This error originates from a subprocess, and is likely not a problem with pip.
ERROR: Failed building wheel for blis
Running setup.py clean for blis
Failed to build thinc preshed blis
Installing collected packages: wrapt, wasabi, srsly, plac, cymem, wheel, six, setuptools, preshed, numpy, murmurhash, Cython, colorama, tqdm, thinc_gpu_ops, blis, thinc
Running setup.py install for preshed: started
Running setup.py install for preshed: finished with status 'error'
error: subprocess-exited-with-error
Running setup.py install for preshed did not run successfully.
exit code: 1
[13 lines of output]
C:\Users\hudsonad\Anaconda3\lib\site-packages\setuptools\installer.py:27: SetuptoolsDeprecationWarning: setuptools.installer is deprecated. Requirements should be satisfied by a PEP 517 installer.
warnings.warn(
running install
C:\Users\hudsonad\Anaconda3\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
running build_ext
building 'preshed.maps' extension
"C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.33.31629\bin\HostX86\x64\cl.exe" /c /nologo /O2 /W3 /GL /DNDEBUG /MD -IC:\Users\hudsonad\Anaconda3\include -IC:\Users\hudsonad\Anaconda3\include -IC:\Users\hudsonad\Anaconda3\Include "-IC:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.33.31629\include" "-IC:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.33.31629\ATLMFC\include" "-IC:\Program Files\Microsoft Visual Studio\2022\Community\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 /Tppreshed/maps.cpp /Fobuild\temp.win-amd64-3.9\Release\preshed/maps.obj /Ox /EHsc
maps.cpp
c1xx: fatal error C1083: Cannot open source file: 'preshed/maps.cpp': No such file or directory
error: command 'C:\\Program Files\\Microsoft Visual Studio\\2022\\Community\\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: legacy-install-failure
Encountered error while trying to install package.
preshed
note: This is an issue with the package mentioned above, not pip.
hint: See above for output from the failure.
[end of output]
note: This error originates from a subprocess, and is likely not a problem with pip.
error: subprocess-exited-with-error
I have installed MS Visual C++ build tools and I still get this error. I haven't been able to find anything about how to resolve it. Any help would be appreciated!
This is a problem with the .cpp files provided in the package .tar.gz release not being compatible with some versions of python that are newer than the package. When this package was released the most recent version of python was 3.7.
The easiest solution is to use an older version of python, in particular one where you can install everything from compiled wheels with pip rather than having to compile anything, like python 3.7.
If you really want to use python 3.9, then you can try installing directly from the github archive for each repo / version tag, which will use a newer version of cython to generate files that are compatible with python 3.9:
pip install -r cython "cymem>=2.0.2,<2.1.0"
pip install https://github.com/explosion/preshed/archive/v2.0.1.zip
You may have to repeat this for all the other requirements that have the same error: 1) install the requirements for this release (find requirements.txt in the repo at this tag), 2) pip install from the repo for this tag, either from a local clone or from this kind of archive URL.
A good starting point is to checkt the compatible python versions. If you check the pypi page, you will see python 3.6 listed as the only one, so simply use the power of conda to create an environment and install there:
conda create -n newEnv python=3.6
conda activate newEnv
pip install nlpre
Related
While doing pip install SPAMS, I encountered the following error:
(base) C:\Users\Foram>pip install spams
Collecting spams
Using cached spams-2.6.5.4.tar.gz (2.0 MB)
Installing build dependencies ... done
Getting requirements to build wheel ... done
Preparing metadata (pyproject.toml) ... done
Requirement already satisfied: Pillow>=6.0 in c:\users\foram\anaconda3\lib\site-packages (from spams) (8.0.1)
Requirement already satisfied: scipy>=1.0 in c:\users\foram\appdata\roaming\python\python38\site-packages (from spams) (1.4.1)
Requirement already satisfied: numpy>=1.12 in c:\users\foram\anaconda3\lib\site-packages (from spams) (1.21.2)
Building wheels for collected packages: spams
Building wheel for spams (pyproject.toml) ... error
error: subprocess-exited-with-error
× Building wheel for spams (pyproject.toml) did not run successfully.
│ exit code: 1
╰─> [29 lines of output]
running bdist_wheel
running build
running build_py
creating build
creating build\lib.win-amd64-cpython-38
creating build\lib.win-amd64-cpython-38\spams_wrap
copying spams_wrap\spams_wrap.py -> build\lib.win-amd64-cpython-38\spams_wrap
copying spams_wrap\__init__.py -> build\lib.win-amd64-cpython-38\spams_wrap
creating build\lib.win-amd64-cpython-38\spams
copying spams\spams.py -> build\lib.win-amd64-cpython-38\spams
copying spams\__init__.py -> build\lib.win-amd64-cpython-38\spams
creating build\lib.win-amd64-cpython-38\spams\tests
copying spams\tests\run.py -> build\lib.win-amd64-cpython-38\spams\tests
copying spams\tests\test_decomp.py -> build\lib.win-amd64-cpython-38\spams\tests
copying spams\tests\test_dictLearn.py -> build\lib.win-amd64-cpython-38\spams\tests
copying spams\tests\test_linalg.py -> build\lib.win-amd64-cpython-38\spams\tests
copying spams\tests\test_prox.py -> build\lib.win-amd64-cpython-38\spams\tests
copying spams\tests\test_spams.py -> build\lib.win-amd64-cpython-38\spams\tests
copying spams\tests\test_utils.py -> build\lib.win-amd64-cpython-38\spams\tests
copying spams\tests\__init__.py -> build\lib.win-amd64-cpython-38\spams\tests
creating build\lib.win-amd64-cpython-38\spams\data
copying spams\data\boat.png -> build\lib.win-amd64-cpython-38\spams\data
copying spams\data\lena.png -> build\lib.win-amd64-cpython-38\spams\data
copying spams\version -> build\lib.win-amd64-cpython-38\spams
running build_ext
cl : Command line error D8021 : invalid numeric argument '/Wunused-variable'
C:\Users\Foram\AppData\Local\Temp\pip-build-env-t_3qg0ji\overlay\Lib\site-packages\setuptools\_distutils\_msvccompiler.py:539: UserWarning: Fallback spawn triggered. Please update distutils monkeypatch.
warnings.warn("Fallback spawn triggered. Please update distutils monkeypatch.")
error: Command "C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.21.27702\bin\HostX86\x64\cl.exe /c /nologo /O2 /W3 /GL /DNDEBUG /MD -Ispams_wrap -Ispams_wrap\linalg -Ispams_wrap\prox -Ispams_wrap\decomp -Ispams_wrap\dictLearn -IC:\Users\Foram\AppData\Local\Temp\pip-build-env-t_3qg0ji\overlay\Lib\site-packages\numpy\core\include -Ic:\users\foram\anaconda3\include -Ic:\users\foram\anaconda3\include -Ic:\users\foram\anaconda3\include -Ic:\users\foram\anaconda3\Include -IC:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.21.27702\ATLMFC\include -IC:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.21.27702\include -IC:\Program Files (x86)\Windows Kits\10\include\10.0.17763.0\ucrt -IC:\Program Files (x86)\Windows Kits\10\include\10.0.17763.0\shared -IC:\Program Files (x86)\Windows Kits\10\include\10.0.17763.0\um -IC:\Program Files (x86)\Windows Kits\10\include\10.0.17763.0\winrt -IC:\Program Files (x86)\Windows Kits\10\include\10.0.17763.0\cppwinrt /EHsc /Tpspams_wrap/spams_wrap.cpp /Fobuild\temp.win-amd64-cpython-38\Release\spams_wrap\spams_wrap.obj -DNDEBUG -DUSE_BLAS_LIB -std=c++11 -fPIC -Wunused-variable -Wno-uninitialized -m64" failed with exit status 2
[end of output]
note: This error originates from a subprocess, and is likely not a problem with pip.
ERROR: Failed building wheel for spams
Failed to build spams
ERROR: Could not build wheels for spams, which is required to install pyproject.toml-based projects
I tried searching solutions for the following:
Command line error D8021 : invalid numeric argument '/Wunused-variable'
Fallback spawn triggered. Please update distutils monkeypatch.
Could not build wheels for spams, which is required to install pyproject.toml-based projects
However, I could not find any clear solution. It would be great, if I could get some help.
Specs for my system is
Windows-10 64 bit
Python 3.8.5
I'm trying to install the Yt-Dlp module for Python 3.11 but for some reason I get this error
Building wheels for collected packages: brotli
Building wheel for brotli (setup.py) ... error
error: subprocess-exited-with-error
× python setup.py bdist_wheel did not run successfully.
│ exit code: 1
╰─> [20 lines of output]
C:\Users\igor\AppData\Local\Programs\Python\Python311\Lib\site-packages\setuptools\dist.py:771: UserWarning: Usage of dash-separated 'build-base' will not be supported in future versions. Please use the underscore name 'build_base' instead
warnings.warn(
running bdist_wheel
running build
running build_py
creating bin
creating bin\lib.win-amd64-cpython-311
copying python\brotli.py -> bin\lib.win-amd64-cpython-311
running build_ext
building '_brotli' extension
creating bin\temp.win-amd64-cpython-311
creating bin\temp.win-amd64-cpython-311\Release
creating bin\temp.win-amd64-cpython-311\Release\c
creating bin\temp.win-amd64-cpython-311\Release\c\common
creating bin\temp.win-amd64-cpython-311\Release\c\dec
creating bin\temp.win-amd64-cpython-311\Release\c\enc
"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 -Ic/include -IC:\Users\igor\AppData\Local\Programs\Python\Python311\include -IC:\Users\igor\AppData\Local\Programs\Python\Python311\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" /Tcc/common/constants.c /Fobin\temp.win-amd64-cpython-311\Release\c/common/constants.obj
constants.c
C:\Users\igor\AppData\Local\Temp\pip-install-cplthpdp\brotli_bec0f5da12d0434ea2253cdadf0efb64\c\common\./platform.h(26): fatal error C1083: NÆo ‚ poss¡vel abrir arquivo incluir: 'string.h': 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 brotli
Running setup.py clean for brotli
Failed to build brotli
Installing collected packages: brotli, websockets, yt-dlp
Running setup.py install for brotli ... error
error: subprocess-exited-with-error
× Running setup.py install for brotli did not run successfully.
│ exit code: 1
╰─> [22 lines of output]
C:\Users\igor\AppData\Local\Programs\Python\Python311\Lib\site-packages\setuptools\dist.py:771: UserWarning: Usage of dash-separated 'build-base' will not be supported in future versions. Please use the underscore name 'build_base' instead
warnings.warn(
running install
C:\Users\igor\AppData\Local\Programs\Python\Python311\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 bin
creating bin\lib.win-amd64-cpython-311
copying python\brotli.py -> bin\lib.win-amd64-cpython-311
running build_ext
building '_brotli' extension
creating bin\temp.win-amd64-cpython-311
creating bin\temp.win-amd64-cpython-311\Release
creating bin\temp.win-amd64-cpython-311\Release\c
creating bin\temp.win-amd64-cpython-311\Release\c\common
creating bin\temp.win-amd64-cpython-311\Release\c\dec
creating bin\temp.win-amd64-cpython-311\Release\c\enc
"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 -Ic/include -IC:\Users\igor\AppData\Local\Programs\Python\Python311\include -IC:\Users\igor\AppData\Local\Programs\Python\Python311\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" /Tcc/common/constants.c /Fobin\temp.win-amd64-cpython-311\Release\c/common/constants.obj
constants.c
C:\Users\igor\AppData\Local\Temp\pip-install-cplthpdp\brotli_bec0f5da12d0434ea2253cdadf0efb64\c\common\./platform.h(26): fatal error C1083: NÆo ‚ poss¡vel abrir arquivo incluir: 'string.h': 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
I have already tried uninstalling and reinstalling the C++ Build Tools, resetting the PC, installing the Brotli package by itself but it still gives me this error, and not only I have no idea why, I cannot even comprehend error message. Can anyone help me?
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
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/
so I have checked every post that relates to this issue and I still can't seem to make this work. I am trying to install tulipy using pip on a Windows machine. I've installed numerous other pip based programs with no issues. I tried reinstalling VS Build Tools, but that doesn't seem to help either. I need tulipy for a project I'm working on, so I can't use any alternatives.
C:\Users\bette>pip install tulipy --user
Collecting tulipy
Using cached tulipy-0.4.0.tar.gz (110 kB)
Installing build dependencies ... done
Getting requirements to build wheel ... done
Preparing wheel metadata ... done
Requirement already satisfied: numpy in c:\users\bette\appdata\roaming\python\python39\site-packages (from tulipy) (1.19.5)
Building wheels for collected packages: tulipy
Building wheel for tulipy (PEP 517) ... error
ERROR: Command errored out with exit status 1:
command: 'c:\python39\python.exe' 'C:\Users\bette\AppData\Roaming\Python\Python39\site-packages\pip\_vendor\pep517\_in_process.py' build_wheel 'C:\Users\bette\AppData\Local\Temp\tmpuwzd3c74'
cwd: C:\Users\bette\AppData\Local\Temp\pip-install-gkcz217u\tulipy_8179e3516bd64c689a0168ed407c13fc
Complete output (27 lines):
running bdist_wheel
running build
running build_py
creating build
creating build\lib.win-amd64-3.9
creating build\lib.win-amd64-3.9\tulipy
copying tulipy\__init__.py -> build\lib.win-amd64-3.9\tulipy
running build_ext
skipping 'tulipy/lib\__init__.c' Cython extension (up-to-date)
building 'tulipy.lib' extension
creating build\temp.win-amd64-3.9
creating build\temp.win-amd64-3.9\Release
creating build\temp.win-amd64-3.9\Release\libindicators
creating build\temp.win-amd64-3.9\Release\tulipy
creating build\temp.win-amd64-3.9\Release\tulipy\lib
D:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\BIN\x86_amd64\cl.exe /c /nologo /Ox /W3 /GL /DNDEBUG /MD -Ilibindicators -Itulipy/lib -IC:\Users\bette\AppData\Local\Temp\pip-build-env-nl5462ni\overlay\Lib\site-packages\numpy\core\include -Ic:\python39\include -Ic:\python39\include -ID:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\INCLUDE -ID:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\ATLMFC\INCLUDE -ID:\Windows Kits\10\include\10.0.17763.0\ucrt -ID:\Windows Kits\10\include\10.0.17763.0\shared -ID:\Windows Kits\10\include\10.0.17763.0\um -ID:\Windows Kits\10\include\10.0.17763.0\winrt /Tclibindicators/tiamalgamation.c /Fobuild\temp.win-amd64-3.9\Release\libindicators/tiamalgamation.obj
tiamalgamation.c
D:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\BIN\x86_amd64\cl.exe /c /nologo /Ox /W3 /GL /DNDEBUG /MD -Ilibindicators -Itulipy/lib -IC:\Users\bette\AppData\Local\Temp\pip-build-env-nl5462ni\overlay\Lib\site-packages\numpy\core\include -Ic:\python39\include -Ic:\python39\include -ID:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\INCLUDE -ID:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\ATLMFC\INCLUDE -ID:\Windows Kits\10\include\10.0.17763.0\ucrt -ID:\Windows Kits\10\include\10.0.17763.0\shared -ID:\Windows Kits\10\include\10.0.17763.0\um -ID:\Windows Kits\10\include\10.0.17763.0\winrt /Tctulipy/lib\__init__.c /Fobuild\temp.win-amd64-3.9\Release\tulipy/lib\__init__.obj
__init__.c
c:\users\bette\appdata\local\temp\pip-build-env-nl5462ni\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
tulipy/lib\__init__.c(8102): error C2039: 'tp_print': is not a member of '_typeobject'
c:\python39\include\cpython/object.h(193): note: see declaration of '_typeobject'
tulipy/lib\__init__.c(10033): warning C4996: '_PyUnicode_get_wstr_length': deprecated in 3.3
c:\python39\include\cpython/unicodeobject.h(446): note: see declaration of '_PyUnicode_get_wstr_length'
tulipy/lib\__init__.c(10049): warning C4996: '_PyUnicode_get_wstr_length': deprecated in 3.3
c:\python39\include\cpython/unicodeobject.h(446): note: see declaration of '_PyUnicode_get_wstr_length'
error: command 'D:\\Program Files (x86)\\Microsoft Visual Studio 14.0\\VC\\BIN\\x86_amd64\\cl.exe' failed with exit code 2
----------------------------------------
ERROR: Failed building wheel for tulipy
Failed to build tulipy
ERROR: Could not build wheels for tulipy which use PEP 517 and cannot be installed directly
This might be old, but if anyone is looking how to install tulipy.
It's in https://pypi.org/project/newtulipy/.
pip install newtulipy
Try this:
pip install pip==18.1
if that doesn't work try this:
pip install --upgrade pip setuptools wheel
If that doesn't work try updating Microsoft visual studio to a current version
if that doesn't work...
I found the solution. I was using Python 3.9 and that was incompatible with tulipy. When I installed Python 3.7.6 it worked like a charm.
The latest supported version is up to python3.7, if your python version is higher, it is not supported.
You can download whl file of tulipy form here.
Then use pip install tulipy-0.4.0-cp37-cp37m-win_amd64.whl to install.