GithubHelp home page GithubHelp logo

Drawing fails on Google Colab about pyganja HOT 6 CLOSED

timcash avatar timcash commented on August 17, 2024
Drawing fails on Google Colab

from pyganja.

Comments (6)

hugohadfield avatar hugohadfield commented on August 17, 2024 1

@timcash I have just triggered a release so the version in pypi should now be equal with master https://pypi.org/project/pyganja/0.0.13/

from pyganja.

hugohadfield avatar hugohadfield commented on August 17, 2024

Ah yes, this was fixed in this commit but looks like we haven't done a release in a while. We will do one very shortly, in the meantime install from master will be a work around for this bug, try changing that line to:

!pip install git+https://github.com/pygae/pyganja.git

On google collab however I am still not getting any output although there is no error, I've started looking into that but I suspect it may be to do with outputting javascript into collab which, like jupyter lab, it probably won't like

from pyganja.

hugohadfield avatar hugohadfield commented on August 17, 2024

Changing the test to:

!pip install git+https://github.com/pygae/pyganja.git
!pip install clifford

from clifford.tools.g3c import random_line, layout
from pyganja import *

gs = GanjaScene()
js = generate_notebook_js(gs, sig=layout.sig)
print(js)

import IPython
display(js)

print('Cell complete')

reproduces the javascript error failure to draw. The cell executes and prints cell complete with no error messages but also no output. In the development console however we get the following error:
image

from pyganja.

hugohadfield avatar hugohadfield commented on August 17, 2024

Adding the line:

display(IPython.core.display.HTML('''<script src="/static/components/requirejs/require.js"></script>'''))

gets rid of the requirejs error but still no output visible in colab

from pyganja.

timcash avatar timcash commented on August 17, 2024

Wonderful

from pyganja.

jmizaret avatar jmizaret commented on August 17, 2024

I am facing the same problem: installed node.js and pyganja v0.015 on mac. Clifford working well.
UserWarning: Failed to import cef_gui, cef functions will be unavailable from .script_api import *

running the code below:

from clifford.tools.g3c import *
from pyganja import *

object_array = [
random_conformal_point(),
random_point_pair(),
random_circle(),
random_line(),
random_sphere(),
random_plane()
]

The simplest way to use pyganja

draw(object_array,
static=False ,
scale=0.1)

from pyganja.

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.