Skip to content

AttributeError: module 'tensorboard.lazy' has no attribute 'lazy_load' #387

@nbro

Description

@nbro

I'm trying to execute this simple code

import gym

from genrl.agents import QLearning
from genrl.trainers import ClassicalTrainer

env = gym.make("FrozenLake-v0")

agent = QLearning(env)
trainer = ClassicalTrainer(agent, env, mode="dyna", model="tabular", n_episodes=10000)
episode_rewards = trainer.train()
trainer.plot(episode_rewards)

However, I am getting the error

AttributeError: module 'tensorboard.lazy' has no attribute 'lazy_load'

I had installed this package with

pip install genrl

And I remember there were some incompatibility issues. I am getting now the same error messages after having reinstalled tensorflow-tensorboard and tensorboard, as suggested in this answer.

genrl 0.0.2 requires certifi==2019.11.28, but you'll have certifi 2020.6.20 which is incompatible.
genrl 0.0.2 requires cloudpickle==1.3.0, but you'll have cloudpickle 1.6.0 which is incompatible.
genrl 0.0.2 requires gym==0.17.1, but you'll have gym 0.17.3 which is incompatible.
genrl 0.0.2 requires matplotlib==3.2.1, but you'll have matplotlib 3.3.2 which is incompatible.
genrl 0.0.2 requires numpy==1.18.2, but you'll have numpy 1.15.4 which is incompatible.
genrl 0.0.2 requires opencv-python==4.2.0.34, but you'll have opencv-python 4.4.0.46 which is incompatible.
genrl 0.0.2 requires pandas==1.0.4, but you'll have pandas 1.1.4 which is incompatible.
genrl 0.0.2 requires Pillow==7.1.0, but you'll have pillow 8.0.1 which is incompatible.
genrl 0.0.2 requires scipy==1.4.1, but you'll have scipy 1.5.3 which is incompatible.
genrl 0.0.2 requires six==1.14.0, but you'll have six 1.15.0 which is incompatible.

Doing

pip install tensorflow-tensorboard==1.5.1

and then

pip install tensorboard==1.15.0

Actually, that solved this issue AttributeError: module 'tensorboard.lazy' has no attribute 'lazy_load', but I think you should be aware of it, and that people can encounter it, as I did, while using your package.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions