New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
AttributeError: module 'tensorflow' has no attribute 'io' #39
Comments
What's your tensorflow and tensorboard version? |
I just pip install git+https://github.com/thu-ml/tianshou.git@master directly. Need I install tf and tensorboard additionally for I didn't found these requirements in readme. |
Tianshou has already added the tensorboard in the requirement, in https://github.com/thu-ml/tianshou/blob/master/setup.py#L53 |
No. I create a new env with conda, and pip install this repo.
|
Hmm...That's a problem. This morning I helped another person for installing tianshou on Anaconda. The following command works fine: # create a new virtualenv and install pip, change the env name if you like
conda create -n myenv pip
# activate the environment
conda activate myenv
# install tianshou
pip install tianshou In short, please make sure the pip is installed in your created venv. |
There is still the same problem... |
Have you tried upgrading your conda, e.g., |
Make no difference. It's the latest version already I think.
|
I test it but the second command pip is not in your "pytorch" venv. It will install some package outside your env. |
conda will install pip, like you mentioned before. |
So what's the output of "which pip" or "pip -V"? |
you mean pip version? it's 20.0.2 |
Hmm...that's quite strange. BTW, I think In [11]: import tensorflow as tf
In [12]: tf.io
Out[12]: <module 'tensorflow._api.v1.io' from '/home/trinkle/.local/lib/python3.6/site-packages/tensorflow_core/_api/v1/io/__init__.py'> |
You can also manually comment the lines of SummaryWriter in the test script :) |
yeah, I pip install tensorflow manually and this problem has been solved. Thanks! |
I am facing the same issue. Can you pls help me resolve it? |
how to install tensorflow manually? |
|
I have marked all applicable categories:
I have visited the source website, and in particular read the known issues
I have searched through the issue categories for duplicates
I have mentioned version numbers, operating system and environment, where applicable:
python test/discrete/test_pg.py --seed 0 --render 0.03
Traceback (most recent call last):
File "test/discrete/test_pg.py", line 173, in
test_pg()
File "test/discrete/test_pg.py", line 144, in test_pg
writer = SummaryWriter(log_path)
File "/anaconda3/envs/pytorch/lib/python3.6/site-packages/torch/utils/tensorboard/writer.py", line 225, in init
self._get_file_writer()
File "/anaconda3/envs/pytorch/lib/python3.6/site-packages/torch/utils/tensorboard/writer.py", line 256, in _get_file_writer
self.flush_secs, self.filename_suffix)
File "/anaconda3/envs/pytorch/lib/python3.6/site-packages/torch/utils/tensorboard/writer.py", line 66, in init
log_dir, max_queue, flush_secs, filename_suffix)
File "/anaconda3/envs/pytorch/lib/python3.6/site-packages/tensorboard/summary/writer/event_file_writer.py", line 76, in init
if not tf.io.gfile.exists(logdir):
File "/anaconda3/envs/pytorch/lib/python3.6/site-packages/tensorboard/lazy.py", line 68, in getattr
return getattr(load_once(self), attr_name)
AttributeError: module 'tensorflow' has no attribute 'io'
The text was updated successfully, but these errors were encountered: