AminHP / gym-anytrading

The most simple, flexible, and comprehensive OpenAI Gym trading environment (Approved by OpenAI Gym)

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

NameNotFound: Environment forex doesn't exist. ,NameNotFound: Environment stocks doesn't exist.

deDg0d opened this issue · comments

Hi. I am facing this issue for both stocks and forex environment. any ideas why? I get this error "NameNotFound: Environment forex/(or stocks) doesn't exist."

import gym_anytrading import gym window = 10 env = gym.make( 'forex-v0', df=df, window_size=window, frame_bound=(window, int(0.8*len(df))), unit_side='right' )

Not sure if it’s the same error I encountered before but I would suggest try to run the complete example first, if you face same challenge ahh, the last work around I did was looking at gym_anytrading/init.py this is where they are loaded and when I didn’t want to do reinstall of the gym/gymnasium it worked. Hope that helps. But I know reinstalling works. But bear in mind that There is gym and gymnasium. I know one works with the new SB3 and rrlib. Rgds KM Kudakwashe Mafutah [image: https://]about.me/kmafutah https://about.me/kmafutah?promo=email_sig&utm_source=product&utm_medium=email_sig&utm_campaign=edit_panel&utm_content=plaintext

On Mon, 18 Mar 2024 at 11:25, deDg0d @.> wrote: Hi. I am facing this issue for both stocks and forex environment. any ideas why? import gym_anytrading import gym window = 10 env = gym.make( 'forex-v0', df=df, window_size=window, frame_bound=(window, int(0.8len(df))), unit_side='right' ) — Reply to this email directly, view it on GitHub <#101>, or unsubscribe https://github.com/notifications/unsubscribe-auth/AA7JXS5SS76BO3DDLDDAWGLYY26IXAVCNFSM6AAAAABE3JJX4OVHI2DSMVQWIX3LMV43ASLTON2WKOZSGE4TCOBQG4ZTMNA . You are receiving this because you are subscribed to this thread.Message ID: @.*>

Hello. Thank you for the suggestion.
The problem was importing gym.
following import would resolve the issue.
import gymnasium as gym