For implementation into my program, I have run pip install pycuda on both the cli and on pycharm, each time efforting the same error:
C:\Users\jayde\AppData\Local\Temp\pip-install-yixibeoo\pycuda_b4fb0e3aeab248dc80b43653a83c84ba\src\cpp\cuda.hpp(14): fatal error C1083: Cannot open include file: 'cuda.h': No such file or directory
error: command 'C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.34.31933\bin\HostX86\x64\cl.exe' failed with exit code 2
I am not sure why this is occuring since, although different, njit also utilizes cuda to which I have installed before as a compiler. And as is stated in the error, this is not arising from pip itself but rather another subproccess. Why might this be occuring?
Initially I just ran activate.bat pip install pycuda==2022.2.2 which I would not assume would make any difference so I suspect it is something more subcutaneous. So would it be best to reinstall VS studio?
Related
I've read all of the other questions on this error and frustratingly enough, none give a solution that works.
If I run pip install sentencepiece in the cmd line, it gives me the following output.
src/sentencepiece/sentencepiece_wrap.cxx(2809): fatal error C1083: Cannot open include file: 'sentencepiece_processor.h': No such file or directory
error: command 'C:\\Program Files (x86)\\Microsoft Visual Studio\\2017\\BuildTools\\VC\\Tools\\MSVC\\14.16.27023\\bin\\HostX86\\x64\\cl.exe' failed with exit code 2
[end of output]
I'm running python 3.10.1 and pip 22.0.3 .
*I have the following Microsoft Visual C++ programs on my windows machine,which I've just done a fresh install of as it was complaining of not having a particular C++ program.
MS VC++
I've even added the .exe file to my PATH variables but still I get the same error.
Am I missing a particular Microsoft program on my pc?
I haven't seen this problem in Windows, but for Linux, I would normally reinstall Python after installing the dependencies (such as the MSVC thing). In that case this is especially helpful because I'm often rebuilding (compiling and other related steps) Python/Pip.
Could also just be an error specific to the module and Python version combo you're trying.
From a discussion in the comments:
I have the pyenv-win version manager, so I was able to create venvs and test this for you. With Python 3.10.2, it fails; with Python 3.8.10, it's successful. So, yes, reinstalling does seem to be worthy of your time.
With python3.10
On Windows: First, install vcpkg and install sentencepiece:x64-windows-static
copy the header and lib files from vcpkg/installed/x64-windows-static/include and lib to
C:/Program Files/python310/build/root/include and lib
This should work as the setup.py install expects the library in a ..\build\root\lib directory.
As the C:\Program Files\python310\lib is in the /LIBPATH, the resulting ..\build\root\lib will point to the sentencepiece.lib
If still encounting errors, then set the INCLUDE and LIB environment variables so that the cl.exe , which is called from pip install sentencetransformers finds them.
People having windows+python 3.10 env, here are exact steps to install it via vcpkg.
Other instructions are covered in zweistein's answer.
git clone https://github.com/Microsoft/vcpkg.git
cd vcpkg
./bootstrap-vcpkg.sh
./vcpkg integrate install
./vcpkg install sentencepiece:x64-windows-static
I'm trying to install pyodbc for python 3.9.2 (32-bit), however I keep getting the error:
C:\Users\ICAPP02\AppData\Local\Temp\pip-install-0c78okb8\pyodbc_d782ffa5512448c49f83e214e7ec4434\src\pyodbc.h(19): fatal error C1083: Cannot open include file: 'windows.h': No such file or directory
error: command 'C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.28.29910\bin\HostX86\x86\cl.exe' failed with exit code 2
I understand I am missing the windows.h C++ header files, but I genuinely cant find them, no longer know where to look, know how many I am missing, or know how they look like.
Also when I do locate them, do I place them in the folder that is referenced in the error?: C:\Program Files (x86)\Microsoft VisualStudio\2019\Community\VC\Tools\MSVC\14.28.29910\bin\HostX86\x86\cl.exe
I added a photo of the Visual Studio package I downloaded, perhaps I downloaded the wrong package...
For some reason the latest version of pyodbc built a Python 3.9 wheel for 64-bit but not for 32-bit. However, you can get the 32-bit wheel here:
https://www.lfd.uci.edu/~gohlke/pythonlibs/#pyodbc
You can also just install the windows sdk, for your particular windows version, to resolve this issue
https://developer.microsoft.com/en-us/windows/downloads/windows-sdk/
Currently trying to install PyAudio on my Surface Pro 7, and am getting this error code when I try to use the prompt pip install PyAudio to install it:
ERROR: Command errored out with exit status 1:
src/_portaudiomodule.c: note: see previous definition of 'MS_WIN64'
src/_portaudiomodule.c(29): fatal error C1083: Cannot open include file: 'portaudio.h': No such file or directory
error: command 'C:\\Program Files (x86)\\Microsoft Visual Studio\\2019\\BuildTools\\VC\\Tools\\MSVC\\14.28.29333\\bin\\HostX86\\x64\\cl.exe' failed with exit code 2
Can someone help explain why this won't work, please? Thanks!
Download a wheel file from https://www.lfd.uci.edu/~gohlke/pythonlibs/ and install via pip install wheelfile.whl. Check your python version before downloading.
This issue means that the PyAudio library has a script with an include statement for the portaudio header file. Include statements in C and similar languages are like Import statements in Python. Because the file doesn't exist, the library can't run.
If PyAudio is installed via pip, PortAudio has to be downloaded separately. Here is the official website with instructions to download.
An alternative would be to use Anaconda to install packages for python. Anaconda will automatically install portaudio, or provide a reason why it can't, in which case, you will have to follow the steps on the website linked earlier.
Also, see this SO Question.
I am attempting to install the pysqlite module for Python 2.7 on my Windows 10 computer. I issued the following command:
pip install pysqlite
The installation ran as usual until it hit an error:
c:\users\xaresys\appdata\local\temp\pip-build-xleoab\pysqlite\src\connection.h(33) : fatal error C1083: Cannot open include file: 'sqlite3.h': No such file or directory
error: command 'C:\Users\xaresys\AppData\Local\Programs\Common\Microsoft\Visual C++ for Python\9.0\VC\Bin\cl.exe' failed with exit status 2
I also tried to install a similar module, pysqlcipher, which hit the same error. Do I need to install anything before installing this? Thanks.
Looks like you are missing Visual C++ binaries which are required to install some packages. Follow instructions here: https://github.com/develersrl/gccwinbinaries
When I try to install psycopg2, using PIP in a virtual environment, on Windows 8 I get the following error:
c:\python27\include\pyconfig.h(231) : fatal error C1083: Cannot open include file: 'basetsd.h': No such file or directory
error: command 'C:\\Program Files (x86)\\Microsoft Visual Studio 9.0\\VC\\BIN\\amd64\\cl.exe' failed with exit status 2
I had previously had this error:
error: Unable to find vcvarsall.bat
So I followed the various answers in this question:
and managed to get rid of
error: Unable to find vcvarsall.bat
but have this new one to contend with
any ideas?
thanks
According to the psycopg website, you're supposed to install it using the Windows port:
http://www.stickpeople.com/projects/python/win-psycopg/
I'm guessing you'll need a version of Visual Studio installed for pip to be able to compile the headers correctly.