SubprocVecEnv not working
I'm trying to use SubprocVecEnv to initialize multiple instances of one environment to use in ACKTR and A2C, however, there seem to be problems with SubprocVecEnv. Following this code, the following happens:
def make_env():
env = gym.make('Test-v0')
return env
env = gym.make('Test-v0') #Works, env initialization message is printed
env = make_env() #Works, env initialization message is printed
env = SubprocVecEnv([make_env]) #Doesn't work, code gets stuckMeaning, env creation through the function works fine, the same goes for manual creation, however, when SubprocVecEnv is called the code gets stuck, nothing seems to happen and it doesn't stop running, nor does the environment get created.
I tried calling manually env = SubprocVecEnv([make_env]) and it yields a strange error:
env = SubprocVecEnv([make_env]) Traceback (most recent call last):
File "", line 1, in env = SubprocVecEnv([make_env])
File "c:\\users\\x\baselines\baselines\common\vec_env\subproc_vec_env.py", line 58, in init observation_space, action_space = self.remotes[0].recv()
File "D:\Programs\Anaconda3\lib\multiprocessing\connection.py", line 250, in recv buf = self._recv_bytes()
File "D:\Programs\Anaconda3\lib\multiprocessing\connection.py", line 321, in _recv_bytes raise EOFError
EOFError
Source: openai/baselines