-
Notifications
You must be signed in to change notification settings - Fork 191
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Issues during install #78
Comments
@JohnSmizz you will have to switch your configuration on the python side to build using MSVC and not gcc. The easiest way to do it might be to execute your |
Thanks! I ran the command
out of the 2013 MS VC Express 64Bit prompt and annoyingly get the following error, suggesting that I need to recompile something, just not sure what?
I have, since my last post, created numerous ENV vars all referencing MS VS 12 (SET VC90COMNTOOLS = ...), so thought I must be getting close to having all necessary applications on board by now. I am a little bit stumped now.... Any idea what may be causing this? |
Welcome to the fun of building extension on Windows ;-) Looking at it, I wonder if it is not an issue with the extra_linker_args in the setup.py. I see |
Good spot! I removed it and the build ran for a bit longer, just ended with a new error... Current/ New Error that kills the build process
Other errors that print but don't seem to be too effectual:
|
@JohnSmizz I guess you haven't patched QuantLib as needed. |
@JohnSmizz any update on your build? If you're stuck I might be able to share some pre-built .dll and .lib. |
I'm having a similar problem when trying to follow the steps as linked.
Not sure if it matters, since it still does create a bunch of .obj files in my path:
But when I try to run the "generate_symbols.py" script in pyql, I get the following error:
If I change the subprocess call from:
to:
It can find the file, but I get the error:
This seems reasonable to me because why would the 'nm' command work on the .obj file? But then again, I am a complete newb to this whole process--I don't know what a ".def" file is or why I need it... Also, the build doesn't complete successfully in VS2008 when I do this step:
If I leave it as static, it can build in VS2008 properly, but then it still fails when trying to build the pyql setup.
I am on windows 64-bit using python 2.7.9 64-bit, boost 1.57 64-bit, quantlib 1.5, and visual studio 2008. Would love to be able to play with pyql. Any thoughts/help appreciated! |
@JohnSmizz let's do things in order. First, you need a quantlib dll, you have patched the source, and compiled all the obj files, you should also be able to get a dll as output. Could you give me the error you have when trying to build the dll? The first build of the dll will produce nothing because the def file has not been generated yet. Second, generating the def file should work fine but you will need nm.exe (in the Enthought Canopy world, you just need to install the mingw package). We should be able to do the same using dumpbin to avoid the dependency on mingw but ... Do you have nm.exe on you rmachine? Third, once you have the .def generated, you will be able to generate the proper dll with all the needed symbols (and the associated .lib which is going to be used by the python build process). If you've on Python 2.7, I can give you direct access to a QuantLib dll, lib and def file through dropbox. |
If you do have them available, yes, please provide the x64 .dll, and .lib. (Would I even need the .def if am not building in VS2008 since I would have the .dll and .lib?) I was missing the mingw64 package. After obtaining this I restarted the process...Below are my exact steps: _0. Install VS2008 w/ x64 compilers
_8. Right-Click QuantLib -> Properties -> Configuration Properties -> General -> Configuration Type -> Dynamic Library.dll -> Apply -> OK
However, it reports successful with:
_10. In ...\pyql\scripts\generate_symbols.py, change first lines of main() function to:
_11. Run ...\pyql\scripts\generate_symbols.py
_13. Copy QuantLib.dll from C:\dev\QuantLib-1.5\build\vc90\x64\Release to C:\dev, and make sure that C:\dev is in PATH environment variable
_15. In CMD dir ...\pyql\ run: python setup.py build. Get error:
_16. Thinking that we need the .lib which only seems to be generated when set to static library, back to VS2008, Right-Click QuantLib -> Properties -> Configuration Type -> Static Library.lib -> Apply -> OK
_18. Try step (15) again. Snippet of last lines including error:
Where did I go wrong? |
In step _15, you don't need a static .lib. When MSVC builds a dll, it also builds a .lib file which just contains the symbols exposed by the dll. That is the .lib file you must use. Can you send me mail to dpinte at enthought.com so that I can share the needed files with you? |
That was my mistake! I was able to build and install after copying "quantlib.lib" from 'C:\dev\QuantLib-1.5\build\vc90\x64\Release' to 'C:\dev\QuantLib-1.5\lib' and using that instead of the 'QuantLib-vc90-x64-mt.lib' in the setup.py. |
Great! Closing the ticket. |
Hey!
but none of the underlyings work, eg:
The steps I had to take in order to get here
and added under function get_extra_link_args() the args /machine:x64'
I can now "import quantlib" but anything beyond that command shows the error given above, where the necessary dll cannot be found. The dll in step 13 is not named like in the getting_started.py file because I am using VS2010 -- have I named it incorrectly somehow? Or am I putting it into the wrong folder? |
I think I had a similar issue when I was trying to get it working--I fixed it by adding "C:\dev" to my PATH environment variable and sticking the "QuantLib.dll" file from "C:\dev\QuantLib-1.5\build\vc90\x64\Release" into it. I suppose you could also just add "C:\QuantLib-1.5\build\vc100\x64\Release" to your PATH? Although maybe I am remembering the error/solution incorrectly... |
@JohnSmizz the dll name you should use is the dll name that VS produced. I think you have the correct one. The dll must be on the PATH so that the quantlib package can load it when needed. If it still does not work, I would suggest inspecting the generated |
Out of desperation I have added about 20 different locations to my path variable and also copied the DLL into lots of different places it shouldnt be. That didn't work. But Dependency Walker indicates that modules like QUOTES.PYD look for a module called QUANTLIB.DLL. However, as this thing was compiled with VS2010 I think there was never a DLL created that was called QUANTLIB.DLL. , instead only QUANTLIB-VC100-X64-MT.DLL. To experiment, I renamed the file that VS produced, QUANTLIB-VC100-X64-MT.DLL to simply "QUANTLIB.DLL" in one of the twenty locations I've copy-pasted it into. I really hope the time I save using pyQL pythonic wrappers rather than SWIG is more than offset by the time I took to install the module... :) So to conclude, the pyd file looks for quantlib.dll instead of the longer-named dll. This may be a bug when the installation code was written? Thanks, |
@JohnSmizz First, it's great to see you got it working now. Second, the dependency from quotes.pyd to QuantLib.dll was more than likely there because of a previous build. Is that possible? Or did you do a |
@JohnSmizz last comment: it would be great to have your feedback on PyQL vs the SWIG wrappers. Depending on what you plan to do, I guess PyQL will either be great or will require some work to expose things that are not there yet. |
Hello.. I followed the instructions here and helped me get the pyql package install. I realized the following and I am not sure if this is normal: |
Thanks to @dpinte, @JohnSmizz and especially @ohmeninea seems I have managed to compile and install PyQL on winpython 3.5 using QuantLib 1.7.1 x64 win7 with Visual Studio Community 2015. |
Hi @dpinte, I have been struggling with similar issues to JohnSmizz when building. I removed machine:I386 as suggested above and am running from the Visual C++ 32-bit Command Prompt, but I receive a new error. (I patched the settings.hpp file, at the start.) Thanks in advance for any help that you can provide.
|
When I try to compile with winpython 2.7.10.3 I get the following error on x64 visual studio 2015:
|
Hi-
I am trying to install pyQL wrapper but am having trouble just BUILDING the pyQL files.
I installed QuantLib, Boost and successfully ran the QuantLib test file- I compiled using MS Visual Studio 2013 - the release 64bit.
Python is the Anaconda build, incl Cython etc, on a Win7 SP1 64-bit machine.
The setup.py has been amended as follows
Unfortunately, when I navigate to the folder to where pyQL-master has been extracted to and run command "python setup.py build" I get the following errors...
The text was updated successfully, but these errors were encountered: