Skip to content
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

Not compatible with tensorflow 1.3? #17

Closed
nsknsl opened this issue Aug 22, 2017 · 13 comments
Closed

Not compatible with tensorflow 1.3? #17

nsknsl opened this issue Aug 22, 2017 · 13 comments

Comments

@nsknsl
Copy link

nsknsl commented Aug 22, 2017

After I installed tensorflow 1.3 ,tensorboard can be used in terminal
But after I installed tensorboard-pytorch, it can not work:

Traceback (most recent call last):
  File "/usr/local/bin/tensorboard", line 7, in <module>
    from tensorboard.main import main
ImportError: No module named 'tensorboard.main'
@lanpa
Copy link
Owner

lanpa commented Aug 22, 2017

Which command triggered the error message?
I am using tensorboard-pytorch v0.7 from pip, TF v1.3 and it looks fine.
Please also provide the output of pip freeze, thanks.

@pnavarre
Copy link

pnavarre commented Aug 23, 2017

I think the problem is that they moved Tensorboard to a dependency of TF 1.3 (https://pypi.python.org/pypi/tensorboard). "tensorflow-pytorch" and the original "tensorboard" both use the same name when using import. With both modules installed I get the following error:

from tensorboard import SummaryWriter
Traceback (most recent call last):

File "", line 1, in
from tensorboard import SummaryWriter

ImportError: cannot import name 'SummaryWriter'

@lanpa
Copy link
Owner

lanpa commented Aug 23, 2017

@pnavarre The link you provided is not an official package. The official package comes with TF1.3 is https://pypi.python.org/pypi/tensorflow-tensorboard .

@pnavarre
Copy link

Sorry, my bad. I did install the official (tensorflow-tensorboad) and got the error above.

@lanpa
Copy link
Owner

lanpa commented Aug 23, 2017

@pnavarre please post the output of pip freeze. BTW do you use anaconda environment or not?

@lanpa
Copy link
Owner

lanpa commented Aug 23, 2017

@nsknsl , @pnavarre I just uploaded https://pypi.python.org/pypi/tensorboardX

from tensorboardX import SummaryWriter

This one should be fine :)

@pnavarre
Copy link

Thanks!

@Ascrypto
Copy link

hello, I've tried all possible solutions, but none is working.

when I run a code with:
from tensorboardX import SummaryWriter

I get:
ModuleNotFoundError: No module named 'tensorboardX'

Output of pip freeze:
absl-py==1.0.0
asciichartpy==1.5.25
astunparse==1.6.3
atari-py==0.2.9
backcall==0.2.0
boolean==1.1.0
boolean.py @ git+https://github.com/bastikr/boolean.py/@74063a8588875c058e6dbbb85b69ed052e1f2099
cachetools==4.2.4
certifi==2021.10.8
charset-normalizer==2.0.8
cloudpickle==1.6.0
common==0.1.2
cycler==0.11.0
dataclasses==0.6
decorator==4.3.0
flatbuffers==2.0
future==0.18.2
gast==0.4.0
google-auth==1.35.0
google-auth-oauthlib==0.4.6
google-pasta==0.2.0
grpcio==1.42.0
gym==0.17.3
h5py==3.6.0
idna==3.3
importlib-metadata==4.8.2
ipython==7.29.0
jedi==0.18.1
keras==2.7.0
Keras-Preprocessing==1.1.2
kiwisolver==1.3.2
libclang==12.0.0
Markdown==3.3.6
matplotlib==3.2.2
matplotlib-inline==0.1.3
networkx==2.4
numpy==1.19.4
oauthlib==3.1.1
opencv-python==4.5.4.60
opt-einsum==3.3.0
ordered-set==4.0.2
pandas==1.3.4
parso==0.8.2
pexpect==4.8.0
pickleshare==0.7.5
plotly==4.11.0
progressbar2==3.51.4
prompt-toolkit==3.0.22
protobuf==3.19.1
ptan==0.7
ptyprocess==0.7.0
pyasn1==0.4.8
pyasn1-modules==0.2.8
pyglet==1.5.0
Pygments==2.10.0
pyparsing==3.0.6
python-dateutil==2.8.2
python-utils==2.5.6
pytz==2021.3
PyYAML==5.4.1
requests==2.26.0
requests-oauthlib==1.3.0
retrying==1.3.3
rsa==4.8
scipy==1.7.2
six==1.16.0
tabulate==0.8.9
tb-nightly==2.8.0a20211125
tensorboard==2.7.0
tensorboard-data-server==0.6.1
tensorboard-plugin-wit==1.8.0
tensorboardX==2.4.1
tensorflow-estimator==2.7.0
tensorflow-io-gcs-filesystem==0.22.0
termcolor==1.1.0
torch==1.7.0
traitlets==5.1.1
typing-extensions==3.10.0.2
urllib3==1.26.7
wcwidth==0.2.5
Werkzeug==2.0.2
wrapt==1.13.3
zipp==3.6.0


Thank you.

@lanpa
Copy link
Owner

lanpa commented Nov 28, 2021

@Ascrypto Can you paste a more detailed error message?

@Ascrypto
Copy link

@lanpa Thank you for responding back.

The error is:
Traceback (most recent call last):
File "./run.py", line 29, in
from tensorboardX import SummaryWriter
ModuleNotFoundError: No module named 'tensorboardX'

Within a jupyter notebook, it works fine, but outside the notebook (when imported in .py files), it doesn't.

I have the packages installed:
tensorboard==2.0.1
tensorboard-plugin-wit==1.8.0
tensorboardX==2.4.1
tensorflow-estimator==2.2.0

@lanpa
Copy link
Owner

lanpa commented Nov 29, 2021

@Ascrypto Would it work if you run from tensorboardX import SummaryWriter in an interactive python environment? Which virtual environment manager are you using? Can you post the whole package list of the virtual environment you are using?

@Ascrypto
Copy link

Ascrypto commented Nov 29, 2021

I appreciate your help. The problem is fixed at the moment.

I have tried these commands to install tensorboardX inside a venv:

  • sudo pip -H install tensorboardX
  • pip install tensorboardX
  • sudo pip install tensorboardX
  • added the package manually from: settings --> python interpreter --> + (in PyCharm)

But tensorboardX did not when running from tensorboardX import SummaryWriter in an interactive python environment.

When I installed it using:

  • python -m pip install tensorboardX
  • sudo python -m pip install tensorboardX

It worked in both python and sudo python interactive environments.

@lanpa
Copy link
Owner

lanpa commented Dec 4, 2021

@Ascrypto I suggest not to use sudo to pip install or execute your python script.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants