Giter Site home page Giter Site logo

Comments (8)

acejacek avatar acejacek commented on May 16, 2024 1

Hi,
I reinstalled everything from the scratch (making a deep puge of everything python-related), and now ipycanvas works perfectly.
Thanks for all!

from ipycanvas.

martinRenou avatar martinRenou commented on May 16, 2024 1

Happy to hear that it works! Don't hesitate to open other issues if you have any questions.

from ipycanvas.

martinRenou avatar martinRenou commented on May 16, 2024 1

Try running:

jupyter nbextension install --py --symlink --sys-prefix ipycanvas
jupyter nbextension enable --py --sys-prefix ipycanvas

This should not actually be needed. But it might fix your issue.

from ipycanvas.

martinRenou avatar martinRenou commented on May 16, 2024

Thanks for opening an issue.

  • Are you using Jupyter Notebook or JupyterLab? If using JupyterLab, please don't forget to run jupyter labextension install @jupyter-widgets/jupyterlab-manager ipycanvas
  • Did you install ipycanvas with conda? If yes, please re-install it doing conda install -c conda-forge ipycanvas=0.4.3. Something went wrong with the latest conda package, I am working on fixing it.

Otherwise, please provide the output of the following commands:

which jupyter
jupyter nbextension list
jupyter labextension list

from ipycanvas.

MiguelCorti avatar MiguelCorti commented on May 16, 2024

Hi! Didn't want to open a new issue as the problem I'm having seems very similar to this one, but I can't seem to solve it :(

I'm using Jupyter Notebook (no JupyterLab) without Anaconda. I'm using python 3.8.2 and installed ipycanvas 0.5.0 using pip. But I'm getting no output from canvas. I'm trying to run the following code from the the ipycanvas docs:

from ipycanvas import Canvas

canvas = Canvas(width=200, height=200)

canvas.fill_rect(25, 25, 100, 100)
canvas.clear_rect(45, 45, 60, 60)
canvas.stroke_rect(50, 50, 50, 50)

canvas

The output is blank, but looking at my console (where jupyter server is running) I see the following output:

[W 10:57:08.758 NotebookApp] 404 GET /static/ipycanvas.js?v=20200903105459 (127.0.0.1) 1.01ms referer=http://localhost:8888/notebooks/trab_1.ipynb

And inspecting the browser console I see several errors as well:
image
I think it may be relevant to note that I'm using WSL with Ubuntu 20.04 as well.

Using ipycanvas on Jupyter Notebook through MyBinder gave me the exact same issue, but I was able to solve it running !jupyter labextension install @jupyter-widgets/jupyterlab-manager ipycanvas

As I don't have jupyter lab installed locally, I don't know what else to do.

Thanks! I can open a new issue if it seems appropiate.

from ipycanvas.

martinRenou avatar martinRenou commented on May 16, 2024

Hey!

Can you run the following command in a terminal and show me the output:

jupyter nbextension list

from ipycanvas.

MiguelCorti avatar MiguelCorti commented on May 16, 2024

Sure, sorry for taking long! I missed your comment...

Here is the output:
image

from ipycanvas.

MiguelCorti avatar MiguelCorti commented on May 16, 2024

Thanksssssss, that worked! A friend of mine was having the same issue (using only notebook and pycanvas), will pass the knowledge on. Also, I had some problems with permissions when running both these commands, so I actually ran:

jupyter nbextension install --py --symlink --sys-prefix ipycanvas --user
jupyter nbextension enable --py ipycanvas

Added --user on the first command and removed --sys-prefix from the second one.

Everything seems to be working normally now. Thanks a lot!

from ipycanvas.

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.