From: vj <vjm...@gm...> - 2017-07-07 03:32:07
|
I installed successfully using "pip install QuantLib-Python" on my windows machine using Visual Studio 2017. I also want to run my application in Openshift web hosting services. When I tries the Pip Install in Openshift it fails. It comes up with the following error. Collecting QuantLib-Python Could not find a version that satisfies the requirement QuantLib-Python (from versions: ) No matching distribution found for QuantLib-Python. Openshift uses python version 3.3.2 which I am not able to upgrade. Any ideas about how I can fix this? Thanks. Vijay On Wed, Jul 5, 2017 at 9:55 AM, Luigi Ballabio <lui...@gm...> wrote: > You can run 'pip list' to see your installed packages. 'pip help' or 'pip > help list' give more details. > > Luigi > > > On Wed, Jul 5, 2017 at 3:38 PM Vjmoodle <vjm...@gm...> wrote: > >> Hello Luigi, >> I appreciate the quick responses which helps a newbie like me. >> I figured out the answer for my question. I am using VS (Visual Studio >> IDE) to develop a web application. >> I installed QuantLib with pip and I am able to access QuantLib from my >> web app using the VS python tools. >> Couple of questions regarding version number: >> I installed QuantLib using the command suggested by you >> pip install QuantLib-Python which installed the QuantLib. >> Will this be the current version of QuantLib or an older version? >> How do I find the QuantLib version I installed with pip? >> Thanks and regards, >> Vijay >> >> Sent from my iPad >> >> On Jul 5, 2017, at 9:19 AM, Luigi Ballabio <lui...@gm...> >> wrote: >> >> I'm afraid I'm not sure what you mean by "Visual Studio web project"... >> >> >> On Tue, Jul 4, 2017 at 11:39 PM vj <vjm...@gm...> wrote: >> >>> Hello Luigi, >>> I followed your recommendation, uninstalled Anaconda, all versions of >>> Python and reinstalled latest Python 3.6.1 and did the >>> pip install QuantLib-Python. >>> >>> It found it, did the install! >>> >>> I did some examples (from the following tutorial ) in the command line >>> window with success. >>> http://gouthamanbalaraman.com/blog/quantlib-basics.html >>> >>> Can you give me some guidance or links of articles about how to use >>> this QuantLib with a Visual Studio web project? >>> Thanks for the help. >>> Vijay >>> >>> >>> On Tue, Jul 4, 2017 at 9:51 AM, Luigi Ballabio <lui...@gm... >>> > wrote: >>> >>>> As an alternative, try executing >>>> >>>> pip install QuantLib-Python >>>> >>>> and see if pip finds anything. Depending on your architecture and >>>> Python version, you might find a precompiled version. >>>> >>>> Luigi >>>> >>>> >>>> On Tue, Jul 4, 2017 at 3:48 PM Charles Allderman <ch...@al...> >>>> wrote: >>>> >>>>> Maybe I was not clear, unless you are compiling Python from source >>>>> using VS2017 (which I know nothing about), you need to now compile QuantLib >>>>> with VS2015 (MSC v.1900). Only then can you compile Quantlib-SWIG. >>>>> Presumably you could point VS2017 to use the compiler, cl.exe (MSC v.1900) >>>>> but I don't know how to do this. >>>>> >>>>> Bottom line is that the Python executable, QuantLib and Boost all have >>>>> to be compiled using the same compiler. >>>>> >>>>> >>>>> On Tue, Jul 4, 2017 at 2:52 PM, Vjmoodle <vjm...@gm...> wrote: >>>>> >>>>>> Charles, >>>>>> Some background. >>>>>> I am new for QuantLib as well as compiling complex code with Python >>>>>> compilers, SWIG wrappers etc. >>>>>> My background is C#, JavaScript, node.js, databases, C in embedded >>>>>> programming and some C++ and very little Python. >>>>>> I use VS 2015 a lot and python occasionally. Both were installed some >>>>>> time back. For my new Quant Finance analysis project I thought QuantLib >>>>>> will be great. >>>>>> I installed Anaconda, VS 2017. I followed several different >>>>>> instructions on the web, mainly >>>>>> >>>>>> http://quantlib.org/install/windows-python.shtml. >>>>>> Can you please elaborate for a newbie like me about how to make sure >>>>>> the python binary version is compiled by VS 2017. >>>>>> Thanks. >>>>>> Vijay >>>>>> >>>>>> >>>>>> Sent from my iPad >>>>>> >>>>>> On Jul 4, 2017, at 2:31 AM, Charles Allderman <ch...@al...> >>>>>> wrote: >>>>>> >>>>>> Vijay >>>>>> >>>>>> I think that as the python binary version you are using is probably >>>>>> compiled using MSC v.1900. (visual studio 2015). This has to be the same >>>>>> compiler for your QuantLib installation on windows if using visual studio. >>>>>> >>>>>> Charles >>>>>> >>>>>> >>>>>> >>>>>>> ---------- Forwarded message ---------- >>>>>>> From: vj <vjm...@gm...> >>>>>>> To: qua...@li... >>>>>>> Cc: >>>>>>> Bcc: >>>>>>> Date: Mon, 3 Jul 2017 17:23:51 -0400 >>>>>>> Subject: [Quantlib-users] QuantLib Python installation on windows >>>>>>> machine >>>>>>> >>>>>>> I am trying to install QuantLib Python in my windows machine using >>>>>>> the instructions given in >>>>>>> http://quantlib.org/install/windows-python.shtml. >>>>>>> I did the following: >>>>>>> >>>>>>> I downloaded QuantLib-1.10, SWIG and installed boost. >>>>>>> >>>>>>> I built the QuantLib-1.10 in my windows 8 machine using Visual >>>>>>> Studio 2017 comunity edition. Succefully produced >>>>>>> QuantLib-vc141-x64-mt.lib. >>>>>>> >>>>>>> Then I did the following in the command window. >>>>>>> >>>>>>> cd C:\local\QuantLib-SWIG-1.9\Python >>>>>>> set QL_DIR=C:\local\QuantLib-1.10 >>>>>>> set INCLUDE=C:\local\boost_1_64_0 >>>>>>> >>>>>>> and then >>>>>>> python setup.py build >>>>>>> >>>>>>> It failed because it was looking for QuantLib-vc140-x64-mt.lib. I >>>>>>> changed the name QuantLib-vc141-x64-mt.lib to QuantLib-vc140-x64-mt.lib. >>>>>>> It accepted it and built it. >>>>>>> >>>>>>> Then I tried python setup.py test. >>>>>>> >>>>>>> It failed giving error messages given below. >>>>>>> >>>>>>> What am I doing wrong? >>>>>>> Can someone help me. >>>>>>> Thanks >>>>>>> Vijay >>>>>>> >>>>>>> File "build\lib.win-amd64-3.6\QuantLib\QuantLib.py", line 18, in >>>>>>> swig_import_h >>>>>>> elper >>>>>>> return importlib.import_module(mname) >>>>>>> File "C:\Users\vjkumar\Anaconda3\lib\importlib\__init__.py", line >>>>>>> 126, in impo >>>>>>> rt_module >>>>>>> return _bootstrap._gcd_import(name[level:], package, level) >>>>>>> File "<frozen importlib._bootstrap>", line 978, in _gcd_import >>>>>>> File "<frozen importlib._bootstrap>", line 961, in _find_and_load >>>>>>> File "<frozen importlib._bootstrap>", line 950, in >>>>>>> _find_and_load_unlocked >>>>>>> File "<frozen importlib._bootstrap>", line 648, in _load_unlocked >>>>>>> File "<frozen importlib._bootstrap>", line 560, in module_from_spec >>>>>>> File "<frozen importlib._bootstrap_external>", line 922, in >>>>>>> create_module >>>>>>> File "<frozen importlib._bootstrap>", line 205, in >>>>>>> _call_with_frames_removed >>>>>>> ImportError: DLL load failed: The specified module could not be >>>>>>> found. >>>>>>> >>>>>>> During handling of the above exception, another exception occurred: >>>>>>> >>>>>>> Traceback (most recent call last): >>>>>>> File "setup.py", line 252, in <module> >>>>>>> 'build_ext': my_build_ext >>>>>>> File "C:\Users\vjkumar\Anaconda3\lib\distutils\core.py", line >>>>>>> 148, in setup >>>>>>> dist.run_commands() >>>>>>> File "C:\Users\vjkumar\Anaconda3\lib\distutils\dist.py", line >>>>>>> 955, in run_comm >>>>>>> ands >>>>>>> self.run_command(cmd) >>>>>>> File "C:\Users\vjkumar\Anaconda3\lib\distutils\dist.py", line >>>>>>> 974, in run_comm >>>>>>> and >>>>>>> cmd_obj.run() >>>>>>> File "setup.py", line 58, in run >>>>>>> module = __import__('QuantLibTestSuite', globals(), locals(), >>>>>>> ['']) >>>>>>> File "test\QuantLibTestSuite.py", line 22, in <module> >>>>>>> from date import DateTest >>>>>>> File "test\date.py", line 18, in <module> >>>>>>> import QuantLib >>>>>>> File "build\lib.win-amd64-3.6\QuantLib\__init__.py", line 21, in >>>>>>> <module> >>>>>>> from .QuantLib import * >>>>>>> File "build\lib.win-amd64-3.6\QuantLib\QuantLib.py", line 21, in >>>>>>> <module> >>>>>>> _QuantLib = swig_import_helper() >>>>>>> File "build\lib.win-amd64-3.6\QuantLib\QuantLib.py", line 20, in >>>>>>> swig_import_h >>>>>>> elper >>>>>>> return importlib.import_module('_QuantLib') >>>>>>> File "C:\Users\vjkumar\Anaconda3\lib\importlib\__init__.py", line >>>>>>> 126, in impo >>>>>>> rt_module >>>>>>> return _bootstrap._gcd_import(name[level:], package, level) >>>>>>> ModuleNotFoundError: No module named '_QuantLib' >>>>>>> >>>>>>> >>>>>>> ---------- Forwarded message ---------- >>>>>>> From: Andrew Leach <ima...@gm...> >>>>>>> To: qua...@li... >>>>>>> Cc: >>>>>>> Bcc: >>>>>>> Date: Tue, 4 Jul 2017 06:14:57 +0200 >>>>>>> Subject: [Quantlib-users] Linking Quantlib to my code problem - >>>>>>> LNK2001 unresolved external symbol __imp___invalid_parameter >>>>>>> Hi, >>>>>>> >>>>>>> I'm relatively new to debugging C++ code, espcially with external >>>>>>> libraries so my appologies if this is trvial. >>>>>>> >>>>>>> I'm trying to link my code to QuantLib. >>>>>>> >>>>>>> The boost (1.64) and QuantLiv (1.10) on Visual Studio 2017 Community >>>>>>> on Windows 10 went fine, no errors and built both the Debug and Release >>>>>>> versions of QuantLib. >>>>>>> >>>>>>> However, when I'm linking my program I'm getting the follwoing >>>>>>> errors: >>>>>>> >>>>>>> Severity Code Description Project File Line Suppression State >>>>>>> Error LNK1120 5 unresolved externals MTF_Garch d:\Users\Bob\Documents\Visual >>>>>>> Studio 2015\Projects\MTF_Garch\Release\MTF_Garch.dll 1 >>>>>>> Warning LNK4075 ignoring '/EDITANDCONTINUE' due to '/OPT:ICF' >>>>>>> specification MTF_Garch d:\Users\Bob\Documents\Visual Studio >>>>>>> 2015\Projects\MTF_Garch\MTF_Garch\QuantLib-vc141-mt-gd.lib(date.obj) >>>>>>> 1 >>>>>>> Error LNK2001 unresolved external symbol __imp___CrtDbgReportW >>>>>>> MTF_Garch d:\Users\Bob\Documents\Visual Studio >>>>>>> 2015\Projects\MTF_Garch\MTF_Garch\QuantLib-vc141-mt-gd. >>>>>>> lib(linesearchbasedmethod.obj) 1 >>>>>>> Error LNK2001 unresolved external symbol __imp___CrtDbgReportW >>>>>>> MTF_Garch d:\Users\Bob\Documents\Visual Studio >>>>>>> 2015\Projects\MTF_Garch\MTF_Garch\QuantLib-vc141-mt-gd. >>>>>>> lib(conjugategradient.obj) 1 >>>>>>> Error LNK2001 unresolved external symbol __imp___CrtDbgReportW >>>>>>> MTF_Garch d:\Users\Bob\Documents\Visual Studio >>>>>>> 2015\Projects\MTF_Garch\MTF_Garch\QuantLib-vc141-mt-gd. >>>>>>> lib(armijo.obj) 1 >>>>>>> Error LNK2001 unresolved external symbol __imp___CrtDbgReportW >>>>>>> MTF_Garch d:\Users\Bob\Documents\Visual Studio >>>>>>> 2015\Projects\MTF_Garch\MTF_Garch\QuantLib-vc141-mt-gd. >>>>>>> lib(linesearch.obj) 1 >>>>>>> Error LNK2001 unresolved external symbol __imp___CrtDbgReportW >>>>>>> MTF_Garch d:\Users\Bob\Documents\Visual Studio >>>>>>> 2015\Projects\MTF_Garch\MTF_Garch\QuantLib-vc141-mt-gd. >>>>>>> lib(endcriteria.obj) 1 >>>>>>> Error LNK2001 unresolved external symbol __imp___CrtDbgReportW >>>>>>> MTF_Garch d:\Users\Bob\Documents\Visual Studio >>>>>>> 2015\Projects\MTF_Garch\MTF_Garch\QuantLib-vc141-mt-gd. >>>>>>> lib(constraint.obj) 1 >>>>>>> Error LNK2001 unresolved external symbol __imp___CrtDbgReportW >>>>>>> MTF_Garch d:\Users\Bob\Documents\Visual Studio >>>>>>> 2015\Projects\MTF_Garch\MTF_Garch\QuantLib-vc141-mt-gd. >>>>>>> lib(leastsquare.obj) 1 >>>>>>> Error LNK2001 unresolved external symbol __imp___CrtDbgReportW >>>>>>> MTF_Garch d:\Users\Bob\Documents\Visual Studio >>>>>>> 2015\Projects\MTF_Garch\MTF_Garch\QuantLib-vc141-mt-gd. >>>>>>> lib(simplex.obj) 1 >>>>>>> Error LNK2001 unresolved external symbol __imp___CrtDbgReportW >>>>>>> MTF_Garch d:\Users\Bob\Documents\Visual Studio >>>>>>> 2015\Projects\MTF_Garch\MTF_Garch\MTF_Garch.obj 1 >>>>>>> Error LNK2001 unresolved external symbol __imp___CrtDbgReportW >>>>>>> MTF_Garch d:\Users\Bob\Documents\Visual Studio >>>>>>> 2015\Projects\MTF_Garch\MTF_Garch\QuantLib-vc141-mt-gd.lib(date.obj) >>>>>>> 1 >>>>>>> Error LNK2001 unresolved external symbol __imp___CrtDbgReportW >>>>>>> MTF_Garch d:\Users\Bob\Documents\Visual Studio >>>>>>> 2015\Projects\MTF_Garch\MTF_Garch\QuantLib-vc141-mt-gd. >>>>>>> lib(errors.obj) 1 >>>>>>> Error LNK2001 unresolved external symbol __imp___CrtDbgReportW >>>>>>> MTF_Garch d:\Users\Bob\Documents\Visual Studio >>>>>>> 2015\Projects\MTF_Garch\MTF_Garch\QuantLib-vc141-mt-gd. >>>>>>> lib(garch.obj) 1 >>>>>>> Error LNK2001 unresolved external symbol __imp___invalid_parameter >>>>>>> MTF_Garch d:\Users\Bob\Documents\Visual Studio >>>>>>> 2015\Projects\MTF_Garch\MTF_Garch\QuantLib-vc141-mt-gd. >>>>>>> lib(conjugategradient.obj) 1 >>>>>>> Error LNK2001 unresolved external symbol __imp___invalid_parameter >>>>>>> MTF_Garch d:\Users\Bob\Documents\Visual Studio >>>>>>> 2015\Projects\MTF_Garch\MTF_Garch\QuantLib-vc141-mt-gd. >>>>>>> lib(armijo.obj) 1 >>>>>>> Error LNK2001 unresolved external symbol __imp___invalid_parameter >>>>>>> MTF_Garch d:\Users\Bob\Documents\Visual Studio >>>>>>> 2015\Projects\MTF_Garch\MTF_Garch\QuantLib-vc141-mt-gd. >>>>>>> lib(linesearch.obj) 1 >>>>>>> Error LNK2001 unresolved external symbol __imp___invalid_parameter >>>>>>> MTF_Garch d:\Users\Bob\Documents\Visual Studio >>>>>>> 2015\Projects\MTF_Garch\MTF_Garch\QuantLib-vc141-mt-gd. >>>>>>> lib(constraint.obj) 1 >>>>>>> Error LNK2001 unresolved external symbol __imp___invalid_parameter >>>>>>> MTF_Garch d:\Users\Bob\Documents\Visual Studio >>>>>>> 2015\Projects\MTF_Garch\MTF_Garch\QuantLib-vc141-mt-gd. >>>>>>> lib(leastsquare.obj) 1 >>>>>>> Error LNK2001 unresolved external symbol __imp___invalid_parameter >>>>>>> MTF_Garch d:\Users\Bob\Documents\Visual Studio >>>>>>> 2015\Projects\MTF_Garch\MTF_Garch\QuantLib-vc141-mt-gd. >>>>>>> lib(simplex.obj) 1 >>>>>>> Error LNK2001 unresolved external symbol __imp___invalid_parameter >>>>>>> MTF_Garch d:\Users\Bob\Documents\Visual Studio >>>>>>> 2015\Projects\MTF_Garch\MTF_Garch\QuantLib-vc141-mt-gd. >>>>>>> lib(linesearchbasedmethod.obj) 1 >>>>>>> Error LNK2001 unresolved external symbol __imp___invalid_parameter >>>>>>> MTF_Garch d:\Users\Bob\Documents\Visual Studio >>>>>>> 2015\Projects\MTF_Garch\MTF_Garch\QuantLib-vc141-mt-gd.lib(date.obj) >>>>>>> 1 >>>>>>> Error LNK2001 unresolved external symbol __imp___invalid_parameter >>>>>>> MTF_Garch d:\Users\Bob\Documents\Visual Studio >>>>>>> 2015\Projects\MTF_Garch\MTF_Garch\QuantLib-vc141-mt-gd. >>>>>>> lib(errors.obj) 1 >>>>>>> Error LNK2001 unresolved external symbol __imp___invalid_parameter >>>>>>> MTF_Garch d:\Users\Bob\Documents\Visual Studio >>>>>>> 2015\Projects\MTF_Garch\MTF_Garch\QuantLib-vc141-mt-gd. >>>>>>> lib(garch.obj) 1 >>>>>>> Error LNK2001 unresolved external symbol __imp___invalid_parameter >>>>>>> MTF_Garch d:\Users\Bob\Documents\Visual Studio >>>>>>> 2015\Projects\MTF_Garch\MTF_Garch\QuantLib-vc141-mt-gd. >>>>>>> lib(endcriteria.obj) 1 >>>>>>> Error LNK2001 unresolved external symbol __imp___calloc_dbg >>>>>>> MTF_Garch d:\Users\Bob\Documents\Visual Studio >>>>>>> 2015\Projects\MTF_Garch\MTF_Garch\QuantLib-vc141-mt-gd.lib(date.obj) >>>>>>> 1 >>>>>>> Error LNK2001 unresolved external symbol __imp___free_dbg MTF_Garch d:\Users\Bob\Documents\Visual >>>>>>> Studio 2015\Projects\MTF_Garch\MTF_Garch\msvcprtd.lib(locale0_ >>>>>>> implib.obj) 1 >>>>>>> Error LNK2001 unresolved external symbol __imp___malloc_dbg >>>>>>> MTF_Garch d:\Users\Bob\Documents\Visual Studio >>>>>>> 2015\Projects\MTF_Garch\MTF_Garch\msvcprtd.lib(locale0_implib.obj) 1 >>>>>>> >>>>>>> >>>>>>> NB. The directory structure is the old VS105 directory structure but >>>>>>> the project has been correctly migrated to 2017. >>>>>>> >>>>>>> Everything that I do to fix this issue doesn't seem to work. >>>>>>> >>>>>>> I'm including headers >>>>>>> >>>>>>> #include <ql/quantlib.hpp> >>>>>>> #include <ql/models/volatility/garch.hpp> >>>>>>> >>>>>>> in my code. >>>>>>> >>>>>>> Any suggestions on how to fix this please? >>>>>>> >>>>>>> TIA. >>>>>>> >>>>>>> >>>>>>> ------------------------------------------------------------ >>>>>>> ------------------ >>>>>>> Check out the vibrant tech community on one of the world's most >>>>>>> engaging tech sites, Slashdot.org! http://sdm.link/slashdot >>>>>>> _______________________________________________ >>>>>>> QuantLib-users mailing list >>>>>>> Qua...@li... >>>>>>> https://lists.sourceforge.net/lists/listinfo/quantlib-users >>>>>>> >>>>>>> >>>>>> ------------------------------------------------------------ >>>>>> ------------------ >>>>>> Check out the vibrant tech community on one of the world's most >>>>>> engaging tech sites, Slashdot.org! http://sdm.link/slashdot >>>>>> >>>>>> _______________________________________________ >>>>>> QuantLib-users mailing list >>>>>> Qua...@li... >>>>>> https://lists.sourceforge.net/lists/listinfo/quantlib-users >>>>>> >>>>>> >>>>> ------------------------------------------------------------ >>>>> ------------------ >>>>> Check out the vibrant tech community on one of the world's most >>>>> engaging tech sites, Slashdot.org! http://sdm.link/slashdot______ >>>>> _________________________________________ >>>>> QuantLib-users mailing list >>>>> Qua...@li... >>>>> https://lists.sourceforge.net/lists/listinfo/quantlib-users >>>>> >>>> >>> |