fedden/poker_ai

Getting started

amirfarazmand opened this issue · 4 comments

Sorry if this is a noob question but can help with the beginners:

I import the poker_ai correctly but non of the commands work after. this is what I tried and the messages from termina.
I am runnig Windows 10 and command termina of python 3.9:

>>> import poker_ai
>>> poker_ai
<module 'poker_ai' from 'C:\\Users\\amir.farazmand\\python\\lib\\site-packages\\poker_ai\\__init__.py'>
>>> poker_ai --help
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
TypeError: bad operand type for unary -: '_Helper'
>>> poker_ai train start
  File "<stdin>", line 1
    poker_ai train start
             ^
SyntaxError: invalid syntax
>>>

I tried this but all I get is "[ ]"

from inspect import getmembers, isfunction

from poker_ai import cli
print(getmembers(cli, isfunction))

Is this correct way?

This is the error I get when importing setup:

import poker2.setup

with open("README.md", "r") as stream:

FileNotFoundError: [Errno 2] No such file or directory: 'README.md'

I was able to solve the above error by entering the path below:
Lib/site-packages/poker2/README.md

Now I get this error:

import poker2.setup
usage: [global_opts] cmd1 [cmd1_opts] [cmd2 [cmd2_opts] ...]
or: --help [cmd1 cmd2 ...]
or: --help-commands
or: cmd --help

error: no commands supplied

I was able to run the file like this from power shell:
PS C:\python> .\python C:\python\Lib\site-packages\poker2\setup.py build

I get this error now:
RuntimeError:
An attempt has been made to start a new process before the
current process has finished its bootstrapping phase.

    This probably means that you are not using fork to start your
    child processes and you have forgotten to use the proper idiom
    in the main module:

        if __name__ == '__main__':
            freeze_support()
            ...

    The "freeze_support()" line can be omitted if the program
    is not going to be frozen to produce an executable.