2

I'm writing an equity calculator for poker hands using this library Deuces for hand evaluation https://github.com/worldveil/deuces

The library is written for Python 2.7 and it can be installed with the command

pip install deuces

The library works well in Python 2.7 but I need to switch to Python 3.4.

I wanted to use 2to3 to convert library files and then install the library but the command pip doesn't allow this operation

How can I convert the library from Python 2.7 to Python 3.4?

F. Noe
  • 21
  • 3

2 Answers2

2

I have published a Python 3 port of Deuces here.

You can also get it via pip:

$ pip install treys
Imran
  • 12,950
  • 8
  • 64
  • 79
1

If this doesn't work then nothing would. You probably should rewrite it to python 3 yourself. Yet there could be other libraries used and then you have to rewrite them too.

UpmostScarab
  • 960
  • 10
  • 29
  • I followed exactly what you said with no success: library successfully install itself but at running time function/classes are not detected. – F. Noe Jul 16 '16 at 00:59
  • @F.Noe I wouldn't construe that as no success - you're close than you were. You should double check that you're importing the library from where you think you are - `import deuces; print(deuces.__file__)` – Wayne Werner Jul 17 '16 at 19:39