ukerandi
asked on
error: Unable to find vcvarsall.bat
Hi Experts,
I get when I try to pip install a python library called probfit. My python is 3.7.
error: Unable to find vcvarsall.bat
I get when I try to pip install a python library called probfit. My python is 3.7.
error: Unable to find vcvarsall.bat
Provide your entire pip3 install output, as text not image capture.
Python and windows... an almost happy marriage..:
Please read this:
https://devblogs.microsoft.com/python/unable-to-find-vcvarsall-bat/
Please read this:
https://devblogs.microsoft.com/python/unable-to-find-vcvarsall-bat/
vcvarsall.bat is a windows batchfile (commandline script) to establish the environment for to compile and link Visual C++ projects at the commandline rather than using the Visual Studio IDE. since you tagged your question with LINUX but not WINDOWS, you probably got a wrong python setup.
if you want to use python on Windows, vcvarsall.bat could be found if you install visual studio and vc++ at your computer. there are free 'community' versions of visual studio. i would assume that all visual studio versions since VS 2010 would work.
Sara
if you want to use python on Windows, vcvarsall.bat could be found if you install visual studio and vc++ at your computer. there are free 'community' versions of visual studio. i would assume that all visual studio versions since VS 2010 would work.
Sara
ASKER
@Sara
Sorry it's mistake to tag Linux.It's in the Windows
Sorry it's mistake to tag Linux.It's in the Windows
I fixed the keywords. ( removed Linux, Added Windows OS).
ASKER
@noci Thank you very much
Try pip install probfit to grab a compiled version of probfit instead.
ASKER
@☠ MASQ ☠
Thank you very much your reply. Can you send me the link please
Thank you very much your reply. Can you send me the link please
I think this is included in noci's link but pip should compile the project if there's Windows support otherwise you'll need to compile it yourself
You run that command at the Python prompt.
I don't think there's a better link than noci's other than pointing you at the Devs page
https://pypi.org/project/probfit/
You run that command at the Python prompt.
I don't think there's a better link than noci's other than pointing you at the Devs page
https://pypi.org/project/probfit/
ASKER
@David Favor
ERROR: Command errored out with exit status 1: 'c:\users\marta\anaconda3\ python.exe ' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\Public\\Do cuments\\W ondershare \\CreatorT emp\\pip-i nstall-lut y5mcs\\imi nuit\\setu p.py'"'"'; __file__='"'"'C:\\Users\\P ublic\\Doc uments\\Wo ndershare\ \CreatorTe mp\\pip-in stall-luty 5mcs\\imin uit\\setup .py'"'"';f =getattr(t okenize, '"'"'open'"'"', open)(__file__);code=f.rea d().replac e('"'"'\r\ n'"'"', '"'"'\n'"'"');f.close();ex ec(compile (code, __file__, '"'"'exec'"'"'))' install --record 'C:\Users\Public\Documents \Wondersha re\Creator Temp\pip-r ecord-o1xt k479\insta ll-record. txt' --single-version-externall y-managed --compile Check the logs for full command output.
ERROR: Command errored out with exit status 1:
command: 'c:\users\marta\anaconda3\ python.exe ' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\Public\\Do cuments\\W ondershare \\CreatorT emp\\pip-i nstall-lut y5mcs\\imi nuit\\setu p.py'"'"'; __file__='"'"'C:\\Users\\P ublic\\Doc uments\\Wo ndershare\ \CreatorTe mp\\pip-in stall-luty 5mcs\\imin uit\\setup .py'"'"';f =getattr(t okenize, '"'"'open'"'"', open)(__file__);code=f.rea d().replac e('"'"'\r\ n'"'"', '"'"'\n'"'"');f.close();ex ec(compile (code, __file__, '"'"'exec'"'"'))' bdist_wheel -d 'C:\Users\Public\Documents \Wondersha re\Creator Temp\pip-w heel-nigag 5c0' --python-tag cp35
error: Unable to find vcvarsall.bat
ERROR: Command errored out with exit status 1: 'c:\users\marta\anaconda3\
ERROR: Command errored out with exit status 1:
command: 'c:\users\marta\anaconda3\
error: Unable to find vcvarsall.bat
What was the exact command you typed to begin with... maybe something like...
Or something similar to this.
Best to provide a starting point, so people can attempt recreating exactly what's occurring.
pip3 install probfit
Or something similar to this.
Best to provide a starting point, so people can attempt recreating exactly what's occurring.
Unable to find vcvarsall.bat
did you install visual studio?
if no, you would need to prevent the python setup to build the extension that needs a commandline build using visual c++ compiler and linker cl.exe.
if yes, you have to locate the vcvarsall.bat and if found add the path to the folder where it resides to the PATH environment variable.
to locate the .bat file, open a cmd.exe command window and then type
dir /s "%ProgramFiles(x86)%"\vcvarsall.bat
(at my system more than one file was found. i would use the last one at C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC)
to add it to the PATH environment variable go to 'system settings' 'system' 'advanced' 'environment variables'. here at system variables you will find 'Path' variable where you add the found vc path to the end of the currently defined paths separated by a semicolon ;
note, a new Path would only be available if you restart the command window or explorer.
to test whether the new folder was added to PATH open a command window and type PATH.
Sara
ASKER
ASKER
ASKER
@David Favor
The command I tried is 'pip install probfit'. I also tried 'pip3 install probfit'.
The command I tried is 'pip install probfit'. I also tried 'pip3 install probfit'.
ASKER
invalid switch
look at my command
dir /s "%ProgramFiles(x86)%"\vcvarsall.bat
it uses a backslash \ while your command uses (forward) slash /.
at the cmd level you can't exchange \ by /
Sara
copy the vcvarsall.bat into the folder where you type the install command. that way it was found by the installer in any case.
you also could run the vcvarsall.bat yourself. then it would establish the environment for commandline builds using vc++ cl.exe. i would assume that the installer wouldn't run vcvarsall.bat again if it finds all done already.
Sara
you also could run the vcvarsall.bat yourself. then it would establish the environment for commandline builds using vc++ cl.exe. i would assume that the installer wouldn't run vcvarsall.bat again if it finds all done already.
Sara
ASKER
@sarah,
I corrected the command and it shows the folders I introduced in the path list.
I don't understand what folder I should copy vcvarsall.bat into.
Also I don't know how to run vcvsarsall.bat myself. that's mean double click on the bat file and ran?
I corrected the command and it shows the folders I introduced in the path list.
I don't understand what folder I should copy vcvarsall.bat into.
Also I don't know how to run vcvsarsall.bat myself. that's mean double click on the bat file and ran?
did you run the installer from windows explorer? then, you could copy vcvarsall.bat (by copy and paste) into the same folder where the setup program is located.
if you run the installer from cmd window, then type simply
to run the batch file. the file was found by windows because its location is in the PATH.
if the installer still has problems to locate the batch file, you could copy the vcvarsall.bat by
the final dot . is a shortcut for the path to the current directory.
if the installer still has problems, post the error you got. you can get the contents of your dos-box by clicking onto the icon of the command window at top-left, choose Properties, and check the QuickEdit mode. if done, you can select text from dos-box with the mouse and put the selected contents into the clipboard by <Enter>. the contents can be pasted in the dos-box by right-click with mouse or into any windows textbox by CTRL+V.
Sara
if you run the installer from cmd window, then type simply
vcvarsall.bat
to run the batch file. the file was found by windows because its location is in the PATH.
if the installer still has problems to locate the batch file, you could copy the vcvarsall.bat by
copy "%ProgramFiles(x86)%\Microsoft Visual Studio\2017\BuildTools\VC\Auxiliary\Build\vcvarsall.bat" .
the final dot . is a shortcut for the path to the current directory.
if the installer still has problems, post the error you got. you can get the contents of your dos-box by clicking onto the icon of the command window at top-left, choose Properties, and check the QuickEdit mode. if done, you can select text from dos-box with the mouse and put the selected contents into the clipboard by <Enter>. the contents can be pasted in the dos-box by right-click with mouse or into any windows textbox by CTRL+V.
Sara
ASKER
@sara
I manage to run the program from the command prompt but even then it says it can't the file.
I manage to run the program from the command prompt but even then it says it can't the file.
ASKER
@sara
any idea
any idea
can you show me the whole error message? is there a path given which could not be found? did you run the batchfile from command line prior to installation?
can i download the package from somewhere? did you check the readme?
Sara
can i download the package from somewhere? did you check the readme?
Sara
This question needs an answer!
Become an EE member today
7 DAY FREE TRIALMembers can start a 7-Day Free trial then enjoy unlimited access to the platform.
View membership options
or
Learn why we charge membership fees
We get it - no one likes a content blocker. Take one extra minute and find out why we block content.