Hi Jason,

Thank you for your response.

I should have mentioned previously that I followed the instruction above to 
run the following...

jupyter nbextension enable pythreejs --py --sys-prefix


OK...


(C:\ProgramData\Anaconda3) 
C:\Users\andrew.mole\Source\Repos\JupyterTest01>conda create --prefix 
threejstest notebook python ipywidgets pythreejs
Fetching package metadata ...............

PackageNotFoundError: Package missing in current win-64 channels:
  - pythreejs

Close matches found; did you mean one of these?

    pythreejs: r-threejs


... so I have now added the conda-forge channel to my config and the 
installation goes OK... continuing with your instructions and converting to 
Windows...


conda create --prefix threejstest notebook python ipywidgets pythreejs
source activate ./threejstest
jupyter nbextension enable --py --sys-prefix widgetsnbextension
jupyter nbextension enable --py --sys-prefix pythreejs
activate ./threejstest
kernelname=echo %CONDA_DEFAULT_ENV%   (should be threejstest)
ipython kernel install --name threejstest --display-name conda-threejstest 
--sys-prefix
jupyter notebook


Yes, it seems to work now! Thank you. For some reason conda doesn't list 
the new environment (threejstest), but it seems to activate OK. Do you 
think that the key missing steps were the two "jupyter nbextension 
enable..."? Do you think adding the conda-forge channel was also important? 

Thanks,
Andrew


On Saturday, 1 July 2017 22:42:21 UTC+8, Jason Grout wrote:
>
> I'm trying to replicate this. The below works for me. Can you provide 
> instructions for reproducing your error?
>
> conda create --prefix threejstest notebook python ipywidgets pythreejs
>
> source activate ./threejstest
>
> jupyter nbextension enable --py --sys-prefix widgetsnbextension
>
> jupyter nbextension enable --py --sys-prefix pythreejs
>
> source activate ./threejstest
>
> kernelname=`echo $CONDA_DEFAULT_ENV | sed s:/:_:g`
>
> ipython kernel install --name $kernelname --display-name conda-$kernelname 
> --sys-prefix
>
> jupyter notebook
>
>
> And then I opened the pythreejs example file with the environment kernel 
> and the first example executed just fine.
>
>
> Looking at the errors you show, it seems that you have widgets installed. 
> It also seems that you have pythreejs installed. I would check to see if 
> the pythreejs extension is enabled:
>
> jupyter nbextension enable --py --sys-prefix pythreejs
>
> And I would also check to see if there are any errors in the javascript 
> console.
>
> Thanks,
>
> Jason
>
> On Fri, Jun 30, 2017 at 2:42 AM <[email protected] <javascript:>> 
> wrote:
>
>> I am having the same problem.
>>
>> Simple sphere and text 
>> <http://localhost:8888/notebooks/ScratchNotebooks/pythreejs_examples.ipynb#Simple-sphere-and-text>
>> In [2]:
>>
>> ball = Mesh(geometry=SphereGeometry(radius=1), 
>>
>>                                     material=LambertMaterial(color='red'),
>>
>>                                     position=[2, 1, 0])
>>
>> ​
>>
>> scene = Scene(children=[ball, AmbientLight(color='#777777')])
>>
>> ​
>>
>> c = PerspectiveCamera(position=[0, 5, 5], up=[0, 0, 1],
>>
>>                       children=[DirectionalLight(color='white', 
>>
>>                                                  position=[3, 5, 1], 
>>
>>                                                  intensity=0.5)])
>>
>> renderer = Renderer(camera=c, 
>>
>>                     scene=scene, 
>>
>>                     controls=[OrbitControls(controlling=c)])
>>
>> display(renderer)
>>
>> ×
>> Could not create model:
>> Model name RendererModel
>> Model module jupyter-threejs
>> Model module version *
>> Script error for "jupyter-threejs" 
>> http://requirejs.org/docs/errors.html#scripterror
>>
>> On Friday, 12 May 2017 16:09:44 UTC+8, Henri Girard wrote:
>>>
>>>
>>>
>>> Le jeudi 4 mai 2017 10:47:30 UTC+2, Henri Girard a écrit :
>>>>
>>>> Hi,
>>>> Jupyter nbextension works fine :
>>>> jupyter nbextension enable --py --sys-prefix widgetsnbextension
>>>> Apparently that's the only one :
>>>> After installing pythreejs with pip successfully this command failed :
>>>> jupyter nbextension enable --py --sys-prefix pythreejs
>>>>
>>>>     return __import__(parts[0])
>>>> ImportError: No module named pythreejs
>>>>
>>>> I tried to do it with others : k3d
>>>>
>>>> Only flatsurf succeeded
>>>>
>>>> Any help ?
>>>>
>>>> Regards
>>>> Henri
>>>>
>>>> Yes ... Sorry for double mail
>>>>
>>>  
>>>
>>> Installing /home/pi/sage/pythreejs/pythreejs/static -> jupyter-threejs
>>> Symlinking: /home/pi/sage/local/share/jupyter/nbextensions/jupyter-threejs 
>>> -> /home/pi/sage/pythreejs/pythreejs/static
>>> - Validating: OK
>>>
>>>     To initialize this nbextension in the browser every time the notebook 
>>> (or other app) loads:
>>>     
>>>           jupyter nbextension enable pythreejs --py --sys-prefix
>>>     
>>> Enabling notebook extension jupyter-threejs/extension...
>>>       - Validating: OK
>>> ball = Mesh(geometry=SphereGeometry(radius=1), 
>>>                                     material=LambertMaterial(color='red'),
>>>                                     position=[2, 1, 0])
>>>
>>> scene = Scene(children=[ball, AmbientLight(color='#777777')])
>>>
>>> c = PerspectiveCamera(position=[0, 5, 5], up=[0, 0, 1],
>>>                       children=[DirectionalLight(color='white', 
>>>                                                  position=[3, 5, 1], 
>>>                                                  intensity=0.5)])
>>> renderer = Renderer(camera=c, 
>>>                     scene=scene, 
>>>                     controls=[OrbitControls(controlling=c)])
>>> display(renderer)
>>> Could not create model:
>>>                         
>>>                     
>>>                 
>>>                 
>>>
>>>
>>> Model name RendererModel 
>>> Model module jupyter-threejs 
>>> Model module version 0.3.0-alpha.0 
>>> Script error for "jupyter-threejs" 
>>> http://requirejs.org/docs/errors.html#scripterror 
>>>
>>>
>>>
>>>
>>>
>>>  
>>>  
>>>
>> -- 
>> You received this message because you are subscribed to the Google Groups 
>> "Project Jupyter" group.
>> To unsubscribe from this group and stop receiving emails from it, send an 
>> email to [email protected] <javascript:>.
>> To post to this group, send email to [email protected] 
>> <javascript:>.
>> To view this discussion on the web visit 
>> https://groups.google.com/d/msgid/jupyter/ecc0f2a3-702e-4b3c-91b9-3e4f617c71de%40googlegroups.com
>>  
>> <https://groups.google.com/d/msgid/jupyter/ecc0f2a3-702e-4b3c-91b9-3e4f617c71de%40googlegroups.com?utm_medium=email&utm_source=footer>
>> .
>> For more options, visit https://groups.google.com/d/optout.
>>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Project Jupyter" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jupyter/391c20bc-698d-4839-9d04-86d2814561d8%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to