#Installing a missing library
! pip install nashpy
#Import libraries
import matplotlib.pyplot as plt
import numpy as np
import nashpy as nash
Collecting nashpy
Downloading nashpy-0.0.22.tar.gz (11 kB)
ERROR: Command errored out with exit status 1:
command: /root/venv/bin/python -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-va201w1k/nashpy_b745240338e34381acdfdac5daa9697a/setup.py'"'"'; __file__='"'"'/tmp/pip-install-va201w1k/nashpy_b745240338e34381acdfdac5daa9697a/setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(__file__) if os.path.exists(__file__) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' egg_info --egg-base /tmp/pip-pip-egg-info-ibj1if99
cwd: /tmp/pip-install-va201w1k/nashpy_b745240338e34381acdfdac5daa9697a/
Complete output (5 lines):
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/tmp/pip-install-va201w1k/nashpy_b745240338e34381acdfdac5daa9697a/setup.py", line 6, in <module>
with open("requirements.txt") as f:
FileNotFoundError: [Errno 2] No such file or directory: 'requirements.txt'
----------------------------------------
WARNING: Discarding https://files.pythonhosted.org/packages/93/1c/9005c6a0a3a3b183b5b216cc02cef14bb080fd3ee8733a1006fbcd81fffc/nashpy-0.0.22.tar.gz#sha256=9378fd492f01163ac01a7384dd94f7ffa3ce40e31fe2a08844a2e34576b3d8db (from https://pypi.org/simple/nashpy/). Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.
Downloading nashpy-0.0.21.tar.gz (11 kB)
Requirement already satisfied: numpy>=1.12.1 in /shared-libs/python3.7/py/lib/python3.7/site-packages (from nashpy) (1.19.5)
Requirement already satisfied: scipy>=0.19.0 in /shared-libs/python3.7/py/lib/python3.7/site-packages (from nashpy) (1.7.1)
Building wheels for collected packages: nashpy
Building wheel for nashpy (setup.py) ... done
Created wheel for nashpy: filename=nashpy-0.0.21-py3-none-any.whl size=15281 sha256=4cf0ff6070012aee8b962fdfa0419fcaa1d5637321e255e8b8e0fdfad815400b
Stored in directory: /root/.cache/pip/wheels/02/08/62/cf4fa931e0a317d180936b266169a57f4bb4eb801465bbe8a1
Successfully built nashpy
Installing collected packages: nashpy
Successfully installed nashpy-0.0.21
WARNING: You are using pip version 21.2.4; however, version 21.3.1 is available.
You should consider upgrading via the '/root/venv/bin/python -m pip install --upgrade pip' command.
A = [[2, 6], [0, 4]]
B = [[2, 0], [6, 4]]
pris_dilemma = nash.Game(A, B)
pris_dilemma
A = [[3, 6], [0, 3]]
B = [[3, 0], [6, 3]]
pris_dilemma = nash.Game(A, B)
pris_dilemma