I installed the Python library Pythran on a Windows machine using 'pip install pythran', and got no error. But when trying to compile a function using 'pythran functionName.py' I get the following result:
pythran functionName.py
WARNING: Failed to find 'pythran-openblas' package. Please install it or change the compiler.blas setting. Defaulting to 'blas'
WARNING: Compilation error, trying hard to find its origin...
WARNING: Nop, I'm going to flood you with C++ errors!
CRITICAL: Cover me Jack. Jack? Jaaaaack!!!!
E: error: Unable to find vcvarsall.bat
First question: how can I install pythran-openblas
Second question: I have vcvarsall.bat on my machine in the folder C:\Users...\AppData\Local\Programs\Common\Microsoft\Visual C++ for Python\9.0, where is Pythran looking for vcvarsall?
Thanks!
For the vcvarsall.bat issue, you can have a look at "error: Unable to find vcvarsall.bat" when compiling Cython code choosing the first or second answer depending on the Pytho version you're using. basically, you need to install the right Visual Studio package to make that file available.
Concerning pythran-openblas, it should be available through pip: https://pypi.org/project/pythran-openblas
Related
I am currently using the latest version of Python and attempting to install cx_Oracle through the command pip install cx_Oracle.
On my first attempt, I encountered an error that stated:
Microsoft Visual C++ 14.0 or greater is required. Get it with "Microsoft C++ Build Tools".
To address this, I installed both Microsoft C++ Build Tools from this link and Visual C++ 17 from this link.
However, upon my second try, I encountered another error:
Temp\pip-install-ocqmu9mg\cx-oracle_a585471535c345cea9e48a083457ccd7\odpi\src\dpiImpl.h(34): fatal error C1083: Cannot open include file: 'stdlib.h': No such file or directory
I researched this issue by consulting this, this and this post, but none of them provided a solution for my problem.
Nice effort. Unfortunately, pre-compiled binaries for Python 3.11 are not currently available.
To utilize this version, you can either wait for their release or configure your system properly to build them from source.
Alternatively, you could consider downgrading to a previous version of Python, although this is not recommended.
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 am trying to install the module dtaidistance in Python to calculate the DTW distance matrix for a set of time series. But whenever I try to install the package using "pip install dtaidistance" a large error pops up and I don't know how to interpret it and what to do in order to make it function.
See the final few lines and the corresponding error message after running the install in the anaconda prompt in the screenshot below:
Error code screenshot:
The error says the cl.exe binary is not found. This probably means that you have not installed the Microsoft C compiler and linker (MSVC or Microsoft Visual Studio for Windows).
By the way, the current version of DTAIDistance should continue installing the Python implementation but the fast C-based versions will not be available.
In python 2.7.10,
Could not find a version that satisfies the requirement mysqldb(from version)
no matching distribution found for mysqldb
pip install MySQL-python also failed: Unable to find vcvarsall.bat and many other errors if I am patching solution for this one.
Building Python libraries on Windows can be challenging.
This message indicates that the Visual C++ compiler cannot be found:
Unable to find vcvarsall.bat
You could install Visual Studio Express and try again, or use another compiler as suggested in the referenced question. But you may find that this leads to further problems, e.g. now the MySQL headers can't be found.
Manually installing MySQL from source will likely fix that issue, but that might reveal its own dependency problems.
Instead of going through this rigmarole you might consider installing precompiled versions from Christoph Gohlke.
I am trying to install Cython on a computer running Windows 7. I am using MinGW for my C-compiler. I've taken the following steps:
Installed MinGW.
Added C:\MinGW\bin to Path. Made sure Path included no empty spaces.
Created the file distutils.cfg in the distutils directory. It reads:
[build]
compiler=mingw
[build_ext]
compiler=mingw
I start the command prompt, got to the proper directory and type "python setup.py install". I get the following output:
running install
running build
running build_py
running build_ext
building 'Cython.Plex.Scanners' extension
error: Unable to find vcvarsall.bat
As far as I've understood, this is an error regarding setting MinGW as the C-compiler, but I've aldready included it into Path. What more can I do? Where do I go from here?
Open CMD and type:
SET VS90COMNTOOLS=%VS100COMNTOOLS%
Change the numbers for the edition value of Visual Studio you are running :)
Possibly stolen from here: error: Unable to find vcvarsall.bat
EDIT:
you can download the necessary packages from here:
http://go.microsoft.com/?linkid=7729279
It also sets VS90COMMNTOOLS for you :)
Why wont You use prebuilded packages from
Here
?
I also tried compiling Cython and also failed. This way is far easier :)