AminHP / gym-anytrading

The most simple, flexible, and comprehensive OpenAI Gym trading environment (Approved by OpenAI Gym)
MIT License
2.16k stars 474 forks source link

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

Closed deDg0d closed 8 months ago

deDg0d commented 8 months ago

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' )

kmafutah commented 8 months ago

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.8*len(df))), unit_side='right' )

— Reply to this email directly, view it on GitHub https://github.com/AminHP/gym-anytrading/issues/101, or unsubscribe https://github.com/notifications/unsubscribe-auth/AA7JXS5SS76BO3DDLDDAWGLYY26IXAVCNFSM6AAAAABE3JJX4OVHI2DSMVQWIX3LMV43ASLTON2WKOZSGE4TCOBQG4ZTMNA . You are receiving this because you are subscribed to this thread.Message ID: @.***>

deDg0d commented 8 months ago

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