How to install correctly on windows 11?

Author: nexon33Created Jan 18, 2023Updated Jan 19, 2023

Please make sure that this is a Bug or a Feature Request and provide all applicable information asked by the template. If your issue is an implementation question, please ask your question on StackOverflow or on the TensorTrade Discord #help-desk channel instead of opening a GitHub issue.

System information

  • I just used the default pip install tensortrade and git install tensortrade
  • Windows 11 and conda
  • TensorTrade version: (1.0.3) and I also tried the latest github version (1.0.4)
  • TensorFlow version: 2.11.0
  • Python version: 3.8.15

The examples (use_lstm_rllib.ipynb and use_attentionnet_rllib.ipynb) error out on

analysis = tune.run(
    "PPO",

with the error

 from ray.rllib.env.utils import record_env_wrapper
  File "c:\Users\\\user\anaconda3\envs\tenstrade\lib\site-packages\ray\rllib\env\\\utils.py", line 57, in <module>
    class VideoMonitor(wrappers.Monitor):
AttributeError: module 'gym.wrappers' has no attribute 'Monitor'
2023-01-18 13:13:07,081	INFO trial_runner.py:360 -- Restarting experiment.

which I tried to fix by downgrading gym to version 0.22.0 but then I just end up getting another error:

2023-01-18 13:16:46,417	ERROR ray_trial_executor.py:621 -- Trial PPO_TradingEnv_fa1e7fdf: Unexpected error starting runner.
Traceback (most recent call last):
  File "c:\Users\\\user\anaconda3\envs\tenstrade\lib\site-packages\ray\tune\ray_trial_executor.py", line 612, in start_trial
    return self._start_trial(trial, checkpoint, train=train)
  File "c:\Users\\\user\anaconda3\envs\tenstrade\lib\site-packages\ray\tune\ray_trial_executor.py", line 490, in _start_trial
    runner = self._setup_remote_runner(trial)
  File "c:\Users\\\user\anaconda3\envs\tenstrade\lib\site-packages\ray\tune\ray_trial_executor.py", line 288, in _setup_remote_runner
    trial.init_logdir()
  File "c:\Users\\\user\anaconda3\envs\tenstrade\lib\site-packages\ray\tune\trial.py", line 495, in init_logdir
    self.logdir = create_logdir(self._generate_dirname(),
  File "c:\Users\\\user\anaconda3\envs\tenstrade\lib\site-packages\ray\tune\trial.py", line 163, in create_logdir
    os.makedirs(logdir, exist_ok=True)
  File "c:\Users\\\user\anaconda3\envs\tenstrade\lib\os.py", line 213, in makedirs
    makedirs(head, exist_ok=exist_ok)
  File "c:\Users\\\user\anaconda3\envs\tenstrade\lib\os.py", line 213, in makedirs
    makedirs(head, exist_ok=exist_ok)
  File "c:\Users\\\user\anaconda3\envs\tenstrade\lib\os.py", line 213, in makedirs
    makedirs(head, exist_ok=exist_ok)
  [Previous line repeated 2 more times]
  File "c:\Users\\\user\anaconda3\envs\tenstrade\lib\os.py", line 223, in makedirs
    mkdir(name, mode)
OSError: [WinError 123] De syntaxis van de bestandsnaam, mapnaam of volumenaam is onjuist: 'C:\\Users\\\\user\\ray_results\\PPO\\PPO_TradingEnv_fa1e7fdf_2_clip_rewards=True,entropy_coeff=0.0061681,csv_filename=c:'

The example files should run without error

Code to reproduce the issue

bash
conda create -n tensortrade python=3.8
conda activate tensortrade
pip install tensortrade

I also tried

bash
git clone https://github.com/tensortrade-org/tensortrade.git
cd tensortrade
pip install -r requirements.txt
pip install -r examples/requirements.txt
pip install -e "."

I just want to get tensortrade working on windows with anaconda

Source: tensortrade-org/tensortrade