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?

2 Answers 2

2

I have published a Python 3 port of Deuces here.

You can also get it via pip:

$ pip install treys
Sign up to request clarification or add additional context in comments.

Comments

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.

2 Comments

I followed exactly what you said with no success: library successfully install itself but at running time function/classes are not detected.
@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__)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.