Plotly.py: Not able to use offlne when installing python-plotly on debian

Created on 28 Apr 2016  路  15Comments  路  Source: plotly/plotly.py

Hi..

installing python-plotly (through normal aptitude method) on debian machine (stable, testing and unstable) I'm not able to use the offline methods.

The error is due to the missing file

/usr/lib/python2.7/dist-packages/plotly/offline/plotly.min.js

am I missing something? Should I download another package?

All 15 comments

Hey, that's failry odd. Do you have pip installed? Can you try to install Plotly using pip install plotly?

Hi @yankev
Well.. If I use pip I have the files in /usr/lib/python2.7/dist-packages/plotly/offline/ but I don't have them if I use aptitude install python-plotly.

So it seems there are some differences in the two installation methods (pip versus normal debian package). Is that true?

Thanks!

@ghtmtt Ye there probably is. I just know that we update the package on pip, not really sure about aptitude. Do you know the plotly version for the version installed with aptitude?

@yankev The aptitude version is:

aptitude versions python-plotly
Package python-plotly:                        
p   1.2.9-1                                       stable                    500 

while the pip version is:

pip show plotly
---
Name: plotly
Version: 1.9.10
Location: /usr/local/lib/python2.7/dist-packages
Requires: requests, six, pytz

Hi,
I am the maintainer of plython-plotly in Debian.
Currently the Debian package is not including the offline mode. Since offline
includes a minified Javascript file, this violates the DSFG 搂2 1.
If I include the minified file I must move the package from main to non-free
this affects another packages depending on python-plotly.
Since the source code of plotly.js is available I am working on get the Javascirpt
library into the archive so python-plotly can work offline without moving it to another
section.
By now if you want to use the offline mode I recommend to use the pip version.

@ghtmtt I see you are running Debian Stable which includes the version 1.2.9, If I am not wrong
this version does not include offline mode, Newer versions of the package are in Testing and Unstable, sadly without offline mode.
When the offline mode is available in Debian, I will backport the newer version to Debian stable

Cheers

@noahfx
Thanks! Hoping to see the package soon also in the stable version!

Thanks for the work!

@noahfx Any word on getting plotly.js into debian? Forced online is a nonstarter for me :(. Can't wait for offline mode to be included!

I don't quite understand how Section 2.1 is violated by including the JS bundle. The plotly.min.js bundle is MIT licensed: https://github.com/plotly/plotly.js.

Is there a different way we can package up the bundle?

The problem isn't the license. Minified javascript is considered to be a result of a "build" from the desired form for modifications (and that is true). And that means, not only needs the original form be included at least in the source package, the minified version also needs to be build as part of the package build process. That all isn't a problem by itself and can be done, but it requires time to implement I assume.

I am sitting in the same boat: installed plotly explicitly for offline mode and have to see that the Debian version doesn't work. Quite a bummer.

@chriddyp as @knarrff said, the original source form is needed to be distributed to be minified at the Debian package creation, it would be great if the not minified browserified version of plotly.js will be available in some place, not necessary in the plotly.py package so I can include it in the Debian package this is assuming all the plotly.js deps are available in Debian already.

the original source form is needed to be distributed to be minified at the Debian package creation, it would be great if the not minified browserified version of plotly.js

Got it. We have unminified versions of the library on our CDN. For example, here's the latest: https://cdn.plot.ly/plotly-latest.js

The plotly.js version that is included in this repo is not necessarily always the latest - we periodically manually test and bump plotly.js. The latest version was 1.28.3 in https://github.com/plotly/plotly.py/pull/787. You can get the unminified version on the CDN at https://cdn.plot.ly/plotly-1.28.3.js

Does that work?

If you need to build from scratch, you can do so in the plotly.js repo itself. Here are the developing guidelines: https://github.com/plotly/plotly.js/blob/master/CONTRIBUTING.md#development

Hi
I've uploaded the new version of plotly (2.0.12) to Debian Unstable suite [1], this will migrate to the Testing suite in about 5 days.
I will be working to get this version to the current Stable (Debian 9) Backports this week so it can be available for the Stable suite.

Regards.

Hi @noahfx,
thank you very much.

Have you found some problems with inclusion in Backports?

Ciao!

P.S.:
In any case I think this issue should be considered resolved and closed.

Hi @Stemby,
Sorry for the delay
Plotly is now in stretch backports https://tracker.debian.org/news/897752

Regards

Was this page helpful?
0 / 5 - 0 ratings