Мне нужно сделать симуляцию искусственного интеллекта, AlphaZero, которую я нашел в этом репо: https://github.com/Zeta36/chess-alpha-zero Итак, во-первых, я попробовал в Google Colab Laboratory, но я не знаю, как правильно это сделать. это моделирование (я только запустил Untitled.ipynb), и я получил много ошибок
ERROR: Could not open requirements file: [Errno 2] No such file or directory: 'requirements.
Это очевидная ошибка, потому что Colab не знает, кто является require.txt, а также другие файлы, ноЯ не знаю, как это решить. Есть идеи?
Итак, я попробовал другим способом: 1. Я скачал проект 2. Я следовал инструкциям на readme.md и запустил
pip install -r requirements.txt
вкорневая директория проекта, где расположен файл require.txt.
Я получил эту ошибку:
Brunos-MBP-4:chess-alpha-zero-master Casella$ pip install -r requirements.txt
DEPRECATION: Python 2.7 will reach the end of its life on January 1st, 2020. Please upgrade your Python as Python 2.7 won't be maintained after that date. A future version of pip will drop support for Python 2.7. More details about Python 2 support in pip, can be found at https://pip.pypa.io/en/latest/development/release-process/#python-2-support
Collecting tensorflow-gpu (from -r requirements.txt (line 1))
Using cached https://files.pythonhosted.org/packages/d3/84/87cd052ffdb04c50985cdf23ac18fa6d479b916bc7048a05096eb2c522a0/tensorflow_gpu-1.1.0-cp27-cp27m-macosx_10_11_x86_64.whl
Collecting keras (from -r requirements.txt (line 2))
Using cached https://files.pythonhosted.org/packages/1b/18/2e1ef121e5560ac24c7ac9e363aa5fa7006c40563c989e7211aba95b793a/Keras-2.3.0-py2.py3-none-any.whl
Collecting profilehooks (from -r requirements.txt (line 3))
Using cached https://files.pythonhosted.org/packages/d4/ea/68e8f02b16e0a99b2238ff4e49f66c2aed134f6f6401ac2b04abea1e395d/profilehooks-1.11.0-py2.py3-none-any.whl
Requirement already satisfied: numpy in /usr/local/lib/python2.7/site-packages (from -r requirements.txt (line 4)) (1.16.5)
Collecting pyperclip (from -r requirements.txt (line 5))
Using cached https://files.pythonhosted.org/packages/2d/0f/4eda562dffd085945d57c2d9a5da745cfb5228c02bc90f2c74bbac746243/pyperclip-1.7.0.tar.gz
Collecting python-chess (from -r requirements.txt (line 6))
Using cached https://files.pythonhosted.org/packages/3d/ed/ae1dbb45de32df04c9b2cdfa1802bd7509978da1ad245b3180276f5937a6/python-chess-0.24.2.tar.gz
ERROR: Command errored out with exit status 1:
command: /usr/local/opt/python@2/bin/python2.7 -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/var/folders/pm/nj7yy3px76n6b62knyrn8r_40000gn/T/pip-install-zHPwd4/python-chess/setup.py'"'"'; __file__='"'"'/private/var/folders/pm/nj7yy3px76n6b62knyrn8r_40000gn/T/pip-install-zHPwd4/python-chess/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' egg_info --egg-base pip-egg-info
cwd: /private/var/folders/pm/nj7yy3px76n6b62knyrn8r_40000gn/T/pip-install-zHPwd4/python-chess/
Complete output (9 lines):
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/private/var/folders/pm/nj7yy3px76n6b62knyrn8r_40000gn/T/pip-install-zHPwd4/python-chess/setup.py", line 35, in <module>
""")
ImportError: You are installing python-chess on Python 2.
Python 2 support has been dropped. Consider upgrading to Python 3, or using
the 0.23.x branch, which will be maintained until the end of 2018.
----------------------------------------
ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.
Эта ошибка, я думаю, связана с двумя версиями Python, которые у меня естьустановлен на моем Mac, 2.7 и 3.7.4 В любом случае, я продолжил выполнять команды readme.md и запустил это:
python src/chess_zero/run.py self
, и я получил эту другую ошибку:
Brunos-MBP-4:chess-alpha-zero-master Casella$ python src/chess_zero/run.py self
Traceback (most recent call last):
File "src/chess_zero/run.py", line 17, in <module>
mp.set_start_method('spawn')
AttributeError: 'module' object has no attribute 'set_start_method'
Наконец, я попытался изменить первую команду с помощью
pip3 install -r requirements.txt
, и я получил эту ошибку
ERROR: Could not find a version that satisfies the requirement tensorflow-gpu (from -r requirements.txt (line 1)) (from versions: none)
ERROR: No matching distribution found for tensorflow-gpu (from -r requirements.txt (line 1))
Кто-нибудь может мне помочь? Также приветствуется помощь по запуску проекта github на Colab. Заранее спасибо.