Coder Social home page Coder Social logo

Comments (13)

lanpa avatar lanpa commented on April 28, 2024 3

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

from tensorboardX import SummaryWriter

This one should be fine :)

from tensorboardx.

lanpa avatar lanpa commented on April 28, 2024

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.

from tensorboardx.

pnavarre avatar pnavarre commented on April 28, 2024

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'

from tensorboardx.

lanpa avatar lanpa commented on April 28, 2024

@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 .

from tensorboardx.

pnavarre avatar pnavarre commented on April 28, 2024

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

from tensorboardx.

lanpa avatar lanpa commented on April 28, 2024

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

from tensorboardx.

pnavarre avatar pnavarre commented on April 28, 2024

Thanks!

from tensorboardx.

Ascrypto avatar Ascrypto commented on April 28, 2024

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.

from tensorboardx.

lanpa avatar lanpa commented on April 28, 2024

@Ascrypto Can you paste a more detailed error message?

from tensorboardx.

Ascrypto avatar Ascrypto commented on April 28, 2024

@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

from tensorboardx.

lanpa avatar lanpa commented on April 28, 2024

@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?

from tensorboardx.

Ascrypto avatar Ascrypto commented on April 28, 2024

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.

from tensorboardx.

lanpa avatar lanpa commented on April 28, 2024

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

from tensorboardx.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.