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

cannot import processing or turtle (possibly issue #3 redux) #5

Open
sawula opened this issue Mar 11, 2016 · 10 comments
Open

cannot import processing or turtle (possibly issue #3 redux) #5

sawula opened this issue Mar 11, 2016 · 10 comments

Comments

@sawula
Copy link

sawula commented Mar 11, 2016

  • skulpt_python kernel seemed to install successfully through pip install --upgrade skulpt_python as revised at close of issue Installation problem - version requirement #3
  • tried to work through basic examples in Jupyter notebook using Skulpt Python kernel. import turtle triggers the error ExternalError: TypeError: target is null on line 1 and import processing triggers the error message ImportError: Failed to load remote module 'processing' on line 1
  • then went back and tried to install by cloning skulpt_python and running python setup.py install, but that didn't make any difference

Again, I'm on:
Windows 8.1 Enterprise
Notebook server 4.1.0
Python 2.7.11
Anaconda 2.5.0 (64-bit)
I believe I already have Metakernel, and Calysto installed via pip.

Thanks again!

@dsblank
Copy link
Member

dsblank commented Mar 11, 2016

I'll have to dig into why the notebook on jupyter.cs.brynmawr.edu works... must be some differences there. Thanks for reporting!

@sawula
Copy link
Author

sawula commented Mar 18, 2016

Hi, Doug.

I'm up at Jupyter days in Boston. Seems like a way around the differences
in dependencies/versions is for us to use Docker (www.docker.com). btw
Kitematic.com is GUI for Docker.

There's also www.mybinder.org, but I believe Docker is more appropriate
because I want students to make lots of versions of your working notebook.
I'm not totally clear on this.

Could that be a plan for now? I'm eager to use your Skulpt kernel. It
sounds like creating a Docker container isn't that hard.

Thanks,

ms

On Thu, Mar 10, 2016 at 9:19 PM, Doug Blank [email protected]
wrote:

I'll have to dig into why the notebook on jupyter.cs.brynmawr.edu
works... must be some differences there. Thanks for reporting!


Reply to this email directly or view it on GitHub
#5 (comment)
.

@dsblank
Copy link
Member

dsblank commented Mar 18, 2016

@p5k12 Cool... wish I were there!

Yes, docker (and mybinder) are very easy to set up. I'm tying to find the version I made that notebook with...

@sawula
Copy link
Author

sawula commented Mar 18, 2016

I wish you were here, too. I kept scanning the room today thinking you would be!

On Mar 17, 2016, at 8:23 PM, Doug Blank [email protected] wrote:

@p5k12 Cool... wish I were there!

Yes, docker (and mybinder) are very easy to set up. I'm tying to find the version I made that notebook with...


You are receiving this because you were mentioned.
Reply to this email directly or view it on GitHub

@dsblank
Copy link
Member

dsblank commented Mar 18, 2016

So, this seems to work for me:

from processing import *

def setup():
    size(400,400)
    noStroke()
    smooth()
    noLoop()

def draw():
    drawCircle(200,170,6)

def drawCircle(x, radius, level):
    tt = 128.0 * level / 4.0
    fill(tt)
    ellipse(x, 200, radius*2, radius*2)
    if level > 1:
        level = level - 1
        drawCircle(x - radius / 2, radius/2, level)
        drawCircle(x + radius / 2, radius/2, level)
run()

But I am getting an error importing turtle...

@dsblank
Copy link
Member

dsblank commented Mar 18, 2016

What is your result of this:

python3 -c "import skulpt_python; print(skulpt_python.__version__)"

@dsblank
Copy link
Member

dsblank commented Mar 18, 2016

Oh, I see you are using Python2... maybe there is an issue there...

@dsblank
Copy link
Member

dsblank commented Mar 18, 2016

Ah, yes... this is a Python2 issue. Looks like there may be code in the skulpt_python/kernel.py that is Python3 specific. Let me take a look...

@dsblank
Copy link
Member

dsblank commented Mar 18, 2016

No, that wasn't it... I think it is not finding this file: http://localhost:8888/notebooks/processing/**init**.js

@dsblank
Copy link
Member

dsblank commented Mar 18, 2016

I think I need to rebuild skulpt with the processing __init__.js in it...

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

2 participants