openai gym conda

conda install -c conda-forge gym

Here is what the above code is Doing:
1. Importing the OpenAI Gym library
2. Creating a new environment called ‘CartPole-v0’
3. Resetting the environment to an initial state
4. Rendering the environment
5. Taking a random action
6. Rendering the environment again
7. Closing the environment