Closed akre54 closed 8 years ago
actually I had to leave out the .js at the end of the d3 path because requirejs added it automatically and it was thus trying to call https://d3js.org/d3.v4.js.js which returns 404.
Code that worked for me in jupyter:
requirejs.config({
paths: {
d3: 'https://d3js.org/d3.v4'
}
});
require(['d3'], function(d3) {
window.d3 = d3;
});
Hi there,
I'm hoping someone can save me from a newbie error! I've tried the approach above but i still can't seem to load d3 v4. Only v3 :-(
I'm using Jupyter notebook v5.0.0 and py-d3-0.2.7.
Here's a screen shot - please let me know if you can spot anything wrong.
Many thanks in advance Ben
Run in your notebook:
In [1]: %d3 version
If you obtain an error then reinstall py_d3
with pip install py_d3 --update
.
Hi, thank you for the quick response! :+1:
I tried the %d3 version
command but got an error even after updating with pip (version is 0.2.7)
I believe that mondeja added the version functionality in his recent PR, and I havenβt pushed that to PyPi yet! Whoops.
You can either install from master (pip install https://github.com/ResidentMario/py_d3.git) or you can wait a couple of days until I get the new py_d3 version out on PyPi. β
On Wed, Mar 28, 2018 at 4:53 AM, bendavidwhite notifications@github.com wrote:
Hi, thank you for the quick response! π
I tried the %d3 version command but got an error even after updating with pip (version is 0.2.7)
[image: image] https://user-images.githubusercontent.com/32987465/38018714-9985bd3a-326d-11e8-97a0-6f357fb940c6.png
β You are receiving this because you modified the open/close state. Reply to this email directly, view it on GitHub https://github.com/ResidentMario/py_d3/issues/2#issuecomment-376811736, or mute the thread https://github.com/notifications/unsubscribe-auth/ADTkZUSq0yQxC-dFKdIVivqydss_OmfZks5ti09-gaJpZM4KB_Pz .
--
Aleksey Bilogurhttp://residentmar.io https://github.com/ResidentMario/
Fixes are now live in the newly-released 0.3.0
! π
@mondeja if you want to submit a PR with the additional blog builder API surface, now is the time. π
@bendavidwhite let me know if you have any issues after doing a pip install -u py_d3
to get the latest version.
Thanks @ResidentMario, I ended up downloading and installing the repo directly. It worked. Thank u!
d3 version 4.0 no longer exposes the d3 global (https://github.com/d3/d3/issues/2615) when in a requirejs environment (like Jupyter).
Instead of a
<script>
tag, you'll need to set up the path first:And then later: