I’m struggling with installing the OpenAI Gym library and need help.
I’ve been trying to set up the complete OpenAI Gym package for reinforcement learning development using pip, but I keep running into the same installation error. The problem seems to be related to proxy authentication when trying to download the box2d-py dependency.
Here’s the command I’m running and the error output:
sarah@sarah-laptop:~/reinforcement$ sudo pip install -e .[all]
The directory '/home/sarah/.cache/pip/http' or its parent directory is not owned by the current user and the cache has been disabled. Please check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag.
The directory '/home/sarah/.cache/pip' or its parent directory is not owned by the current user and caching wheels has been disabled. check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag.
Obtaining file:///home/sarah/reinforcement
Requirement already satisfied: numpy>=1.10.4 in /home/sarah/.local/lib/python2.7/site-packages (from gym==0.7.3)
Requirement already satisfied: requests>=2.0 in /home/sarah/.local/lib/python2.7/site-packages (from gym==0.7.3)
Requirement already satisfied: six in /home/sarah/.local/lib/python2.7/site-packages (from gym==0.7.3)
Requirement already satisfied: pyglet>=1.2.0 in /home/sarah/.local/lib/python2.7/site-packages (from gym==0.7.3)
Requirement already satisfied: PyOpenGL in /usr/lib/python2.7/dist-packages (from gym==0.7.3)
Collecting box2d-py (from gym==0.7.3)
Retrying (Retry(total=4, connect=None, read=None, redirect=None)) after connection broken by 'ProxyError('Cannot connect to proxy.', error('Tunnel connection failed: 407 Proxy Authentication Required',))': /simple/box2d-py/
Retrying (Retry(total=3, connect=None, read=None, redirect=None)) after connection broken by 'ProxyError('Cannot connect to proxy.', error('Tunnel connection failed: 407 Proxy Authentication Required',))': /simple/box2d-py/
Could not find a version that satisfies the requirement box2d-py (from gym==0.7.3) (from versions: )
No matching distribution found for box2d-py (from gym==0.7.3)
I’ve tried various solutions I found online but nothing works. Any suggestions on how to fix this proxy authentication issue?