anntzer / redeal

A reimplementation of Thomas Andrews' Deal in Python.
Other
64 stars 41 forks source link

Windows 64 bit DLL issues with Python 3.5 64 bit. #5

Closed orangelights closed 6 years ago

orangelights commented 7 years ago

Hi,

I'm basically asking if there is any up to date guidance on this or is it impossible to have 64 bit versions of both the DLL and Python 3.5 working together on Windows? Does 32 bit Python3.5 work well with the 64 bit DLL or is that just another can of worms?

With both 64 bit versions I'm getting what you probably expect: "unable to load DDS, 'solve' is unavailable". Sorry I'm not really a whiz at this stuff. I do a little python at work on Linux but my home environment is Windows and I hardly code at home. So I actually may need help with basic Windows stuff. I did the pip install redeal.zip on the command prompt and I can use basic redeal in python3.5's interactive interpreter, but what I really want is a python interface to a double dummy solver. I'm just not good at dealing with DLL's on Windows so an updated or more detailed instructions would be greatly appreciated. Thanks.

anntzer commented 7 years ago

Can you clarify what you have tried? There is both a 32 and a 64 bit DLL; the correct one should automatically get chosen depending on whether your Python is 32 or 64 bit.

orangelights commented 7 years ago

So with 64 bit Python3.5 I have tried to use the 64 bit DLL. I take it that this can't work and I should try 32 bit python, but I wanted to know if that was going to work or just lead to other headaches.

anntzer commented 7 years ago

Actually 64 bit DLL on 64 bit python should work, so that's strange. But if 32 bit DLL on 32 bit Python works for you (there's no reason why it shouldn't) that'll save me some work :-); can you give it a try?

orangelights commented 7 years ago

Maybe it is best to start with the traceback as it seems I may have the DLL working:

redeal\redeal-master\examples>redeal bbo_you_have_no_clue

Traceback (most recent call last): File "redeal-script.py", line 9, in load_entry_point('redeal==0.2.0', 'console_scripts', 'redeal')() File "redeal__main__.py", line 161, in console_entry main.run() File "redeal__main.py", line 155, in run self.generate(simulation) File "redeal\main__.py", line 127, in generate simulation.do(deal) File "bbo_you_have_no_clue.py", line 21, in do pass1N = deal.dd_score("1NN", vul=True) File "redeal\redeal.py", line 366, in dd_score self.dd_tricks(contract_declarer)) File "redeal\redeal.py", line 359, in dd_tricks self._dd_cache[strain, declarer] = dds.solve(self, strain, declarer) File redeal\dds.py", line 177, in solve raise Exception("Unable to load DDS. solve is unavailable.") Exception: Unable to load DDS. solve is unavailable.

I have to sign off for the night. Thanks!

anntzer commented 7 years ago

Turns out I got my packaging script wrong (sorry, I only test Windows whenever someone reports a bug :-)) Should be fixed now. Make sure to remove the previously installed version (pip uninstall redeal) first; otherwise pip install will think it needs to do nothing. Let me know if this works for you now.

anntzer commented 6 years ago

Assuming that the issue is fixed. Let me know if this is still an issue.