On 03/24/2017 11:31 AM, Nash, George wrote:
> Prathamesh Ranade,
> Scons is not finding the Visual Studio community version.  I personally don?t 
> have the same setup so there are just things to try I don?t know if they will 
> work. They range in the order of what I think is the easy to hardest.
> 
> 
> 1)      Check that you are using the latest version of scons. Each new 
> version of visual studio uses new paths and must be added into SCons. 
> Typically SCons is updated a few weeks after a new version of visual studio 
> is released.
> 
> 2)      This is a hack that should not be check upstream:
> 
> a.      Try adding the following to the sconstruct make sure you launch scons 
> from a window that can see the cl command.
> env.Environment ()
> env.Append ( ENV = { 'PATH' : os.environ['PATH'] } )
> 
> 3)      Try installing an older version of visual studio that scons can find. 
> (I think the oldest supported is VS-2015)
> 
> 4)      The last and hardest option. Try and figure out why scons is not 
> finding the cl tool open up the msvc.py file an 
> (<python>/Lib/site-packages/scons-<version>/SCons/Tool/msvc.py) This would be 
> difficult and I don?t really recommend unless you want to become a scons 
> expert.
> Good luck,
> George Nash


I've done the following, and an
(a) constructed a python virtual environment using 2.7 (my default
python is 3.6 on this machine, but that won't work for scons)
(b) launch the visual studio-aware version of a command shell ("VS2015
x86 x64 Cross Tools Command Prompt")
(c) activate the virtualenv by going into the directory, then into the
Scripts subdirectory and running "activate"
(d) pip install scons

now we have a command shell that knows where all the Microsoft tools
are, knows the right version of Python, and has scons in it.

"run build" is happy with this setup

Reply via email to