Login  Register

Re: 答复: Having trouble building QuantLib-SWIG python

Posted by Didrik Pinte-5 on Mar 27, 2015; 11:47am
URL: http://quantlib.414.s1.nabble.com/Having-trouble-building-QuantLib-SWIG-python-tp15851p16415.html



On 27 March 2015 at 00:09, ohmeninea <[hidden email]> wrote:
I have this same issue--But I have VS2008 installed, along with the Visual
C++ for Python, so I typically don't have an issue when running setup.py
build, except with this project...

My VS90COMNTOOLS is C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC

Error:

c:\dev\QuantLib-SWIG\Python>python setup.py build
running build
running build_py
file QuantLib\QuantLib.py (for module QuantLib.QuantLib) not found
file QuantLib\QuantLib.py (for module QuantLib.QuantLib) not found
running build_ext
building 'QuantLib._QuantLib' extension
Traceback (most recent call last):
  File "setup.py", line 240, in <module>
    'build_ext': my_build_ext
  File "C:\Python27\lib\distutils\core.py", line 151, in setup
    dist.run_commands()
  File "C:\Python27\lib\distutils\dist.py", line 953, in run_commands
    self.run_command(cmd)
  File "C:\Python27\lib\distutils\dist.py", line 972, in run_command
    cmd_obj.run()
  File "C:\Python27\lib\distutils\command\build.py", line 127, in run
    self.run_command(cmd_name)
  File "C:\Python27\lib\distutils\cmd.py", line 326, in run_command
    self.distribution.run_command(command)
  File "C:\Python27\lib\distutils\dist.py", line 972, in run_command
    cmd_obj.run()
  File "C:\Python27\lib\distutils\command\build_ext.py", line 337, in run
    self.build_extensions()
  File "C:\Python27\lib\distutils\command\build_ext.py", line 446, in
build_extensions
    self.build_extension(ext)
  File "C:\Python27\lib\distutils\command\build_ext.py", line 496, in
build_extension
    depends=ext.depends)
  File "C:\Python27\lib\distutils\msvc9compiler.py", line 473, in compile
    self.initialize()
  File "C:\Python27\lib\distutils\msvc9compiler.py", line 383, in initialize
    vc_env = query_vcvarsall(VERSION, plat_spec)
  File "C:\Python27\lib\distutils\msvc9compiler.py", line 299, in
query_vcvarsall
    raise ValueError(str(list(result.keys())))
ValueError: [u'path', u'include']

This means the VS environment variables haven't been initialized properly. You should kick off the build from the VS2008 command line. 

-- Didrik

------------------------------------------------------------------------------
Dive into the World of Parallel Programming The Go Parallel Website, sponsored
by Intel and developed in partnership with Slashdot Media, is your hub for all
things parallel software development, from weekly thought leadership blogs to
news, videos, case studies, tutorials and more. Take a look and join the
conversation now. http://goparallel.sourceforge.net/
_______________________________________________
QuantLib-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/quantlib-users