Bokeh export png/svg

Hi,

I run Anaconda with python3.6 on Windows 7

from bokeh.io import export_svgs

[…]

export_svgs(p, filename=“plot.svg”)

the error is

RuntimeError: PhantomJS is not present in PATH. Try “conda install phantomjs” or “npm install -g phantomjs-prebuilt”

i tried

conda install phantomjs

but its asking me to downgrade a whole lot of file versions.

Does that pretty much mean that there is no support if you are using a newer version of Python? Is there a workaround?

Thank you.

Hi,

It's hard to offer concrete advice without details. However cona installing phantomjs is only a suggestion, and only one possible option. Some other possibilities are outlined here:

  http://phantomjs.org/download.html

It just needs to be installed, and the executable on your run PATH (or you can set the environment variable BOKEH_PHANTOMJS_PATH to the full path to the phantomjs executable).

Thanks,

Bryan

···

On Dec 27, 2017, at 08:42, [email protected] wrote:

Hi,

I run Anaconda with python3.6 on Windows 7

from bokeh.io import export_svgs
[...]
export_svgs(p, filename="plot.svg")

the error is
RuntimeError: PhantomJS is not present in PATH. Try "conda install phantomjs" or "npm install -g phantomjs-prebuilt"

i tried
> conda install phantomjs

but its asking me to downgrade a whole lot of file versions.

Does that pretty much mean that there is no support if you are using a newer version of Python? Is there a workaround?

Thank you.

--
You received this message because you are subscribed to the Google Groups "Bokeh Discussion - Public" 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/a/continuum.io/d/msgid/bokeh/ebe4de81-a568-40ad-a75e-f3ed13308bd8%40continuum.io.
For more options, visit https://groups.google.com/a/continuum.io/d/optout.

hi,

Thank you Bryan.
I am able to download and get it to work on Ubuntu linux

for anyone needing a reference to the steps and adding a symlink, here is one i found

sudo wget https://bitbucket.org/ariya/phantomjs/downloads/phantomjs-2.1.1-linux-x86_64.tar.bz2

Once the download is complete, extract the downloaded archive file to desired system location:

sudo tar xvjf phantomjs-2.1.1-linux-x86_64.tar.bz2 -C /usr/local/share/

Next, create a symlink of PhantomJS binary file to systems bin dirctory:

sudo ln -s /usr/local/share/phantomjs-2.1.1-linux-x86_64/bin/phantomjs /usr/local/bin/

Then call the API from python and it works for me.

Thanks,

Sarad.

···

On Thursday, 28 December 2017 05:58:37 UTC+13, Bryan Van de ven wrote:

Hi,

It’s hard to offer concrete advice without details. However cona installing phantomjs is only a suggestion, and only one possible option. Some other possibilities are outlined here:

    [http://phantomjs.org/download.html](http://phantomjs.org/download.html)

It just needs to be installed, and the executable on your run PATH (or you can set the environment variable BOKEH_PHANTOMJS_PATH to the full path to the phantomjs executable).

Thanks,

Bryan

On Dec 27, 2017, at 08:42, [email protected] wrote:

Hi,

I run Anaconda with python3.6 on Windows 7

from bokeh.io import export_svgs

[…]

export_svgs(p, filename=“plot.svg”)

the error is

RuntimeError: PhantomJS is not present in PATH. Try “conda install phantomjs” or “npm install -g phantomjs-prebuilt”

i tried

conda install phantomjs

but its asking me to downgrade a whole lot of file versions.

Does that pretty much mean that there is no support if you are using a newer version of Python? Is there a workaround?

Thank you.


You received this message because you are subscribed to the Google Groups “Bokeh Discussion - Public” 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/a/continuum.io/d/msgid/bokeh/ebe4de81-a568-40ad-a75e-f3ed13308bd8%40continuum.io.

For more options, visit https://groups.google.com/a/continuum.io/d/optout.

Just to add, if you are using a cronjob, it would work only if the environment is set

Type

crontab -e

and add

PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin

to set the environment. so long as it is symlinked to /usr/local/bin or one of those paths

Thanks.

···

On Friday, 29 December 2017 13:09:50 UTC+13, Sarad Av wrote:

hi,

Thank you Bryan.
I am able to download and get it to work on Ubuntu linux

for anyone needing a reference to the steps and adding a symlink, here is one i found

https://www.vultr.com/docs/how-to-install-phantomjs-on-ubuntu-16-04

sudo wget [https://bitbucket.org/ariya/phantomjs/downloads/phantomjs-2.1.1-linux-x86_64.tar.bz2](https://bitbucket.org/ariya/phantomjs/downloads/phantomjs-2.1.1-linux-x86_64.tar.bz2)

Once the download is complete, extract the downloaded archive file to desired system location:

sudo tar xvjf phantomjs-2.1.1-linux-x86_64.tar.bz2 -C /usr/local/share/

Next, create a symlink of PhantomJS binary file to systems bin dirctory:

sudo ln -s /usr/local/share/phantomjs-2.1.1-linux-x86_64/bin/phantomjs /usr/local/bin/

Then call the API from python and it works for me.

Thanks,

Sarad.

On Thursday, 28 December 2017 05:58:37 UTC+13, Bryan Van de ven wrote:

Hi,

It’s hard to offer concrete advice without details. However cona installing phantomjs is only a suggestion, and only one possible option. Some other possibilities are outlined here:

    [http://phantomjs.org/download.html](http://phantomjs.org/download.html)

It just needs to be installed, and the executable on your run PATH (or you can set the environment variable BOKEH_PHANTOMJS_PATH to the full path to the phantomjs executable).

Thanks,

Bryan

On Dec 27, 2017, at 08:42, [email protected] wrote:

Hi,

I run Anaconda with python3.6 on Windows 7

from bokeh.io import export_svgs

[…]

export_svgs(p, filename=“plot.svg”)

the error is

RuntimeError: PhantomJS is not present in PATH. Try “conda install phantomjs” or “npm install -g phantomjs-prebuilt”

i tried

conda install phantomjs

but its asking me to downgrade a whole lot of file versions.

Does that pretty much mean that there is no support if you are using a newer version of Python? Is there a workaround?

Thank you.


You received this message because you are subscribed to the Google Groups “Bokeh Discussion - Public” 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/a/continuum.io/d/msgid/bokeh/ebe4de81-a568-40ad-a75e-f3ed13308bd8%40continuum.io.

For more options, visit https://groups.google.com/a/continuum.io/d/optout.

Hello Esarad,

I would like to use cronjob script to export plot. Regular executing script work fine, but cron job planned one doesn’t export png. Please advise which commands to use for defining cron job, thank you.