python - How to install RPi.GPIO to windows -
i have looked , of tutorials rasbian based. on windows can develop python script on windows later put on raspberry pi.
i have downloaded module , have tried python setup.py install in command prompt administrator , receive following error.
error: unable find vcvarsall.bat i looked , solutions suggested haven't helped. solution appreciated!
first should file vcvarsall.bat in system.
if not exits recommend install microsoft visual c++ compiler python 2.7. create vcvarsall.bat in "c:\program files (x86)\common files\microsoft\visual c++ python\9.0" if install users.
the problem function find_vcvarsall(version) in c:/python27/lib/distutils/msvc9compiler.py module 1 looking vcvarsall.bat.
if follow function calls see looking in registry directory of vcvarsall.bat file , won't never find because function looking in other directories different above mentioned installation placed it, , in case registry didn't exits.
the easiest way solve problem remove body (or place in first line) of function find_vcvarsall(version) in msvc9compiler.py file absolute path vcvarsall.bat. example:
def find_vcvarsall(version): return r"c:\program files (x86)\common files\microsoft\visual c++ python\9.0\vcvarsall.bat" if have vcvarsall.bat file should check if have key productdir in registry:
(hkey_users, hkey_current_users, hkey_local_machine or hkey_classes_root)\software\wow6432node\microsoft\visualstudio\version\setup\vc
if don't have key do:
def find_vcvarsall(version): return <path>\vcvarsall.bat to understand exact behavior check msvc9compiler.py module starting in find_vcvarsall(version) function.
this worked me. more visit post pip install gives error: unable find vcvarsall.bat
Comments
Post a Comment