Package Details: python-plotly 5.9.0-1

Git Clone URL: https://aur.archlinux.org/python-plotly.git (read-only, click to copy)
Package Base: python-plotly
Description: An open-source, interactive graphing library
Upstream URL: https://github.com/plotly/plotly.py
Keywords: chart plot python
Licenses: MIT
Submitter: fclad
Maintainer: greyltc (bertptrs)
Last Packager: bertptrs
Votes: 37
Popularity: 1.87
First Submitted: 2015-12-07 14:53 (UTC)
Last Updated: 2022-06-24 17:05 (UTC)

Latest Comments

chrislea commented on 2022-05-13 16:39 (UTC) (edited on 2022-05-13 16:40 (UTC) by chrislea)

Looks like jupyter 3.4.1 came in today via normal updates and now this builds properly. Sorry for the hassle.

chrislea commented on 2022-05-12 16:33 (UTC)

Confirming I see the same error as @acxz.

acxz commented on 2022-05-12 13:03 (UTC)

I receive the below error:

Building extension in .
An error occurred.
ValueError: Extensions require a devDependency on @jupyterlab/builder@^3.4.1, you have a dependency on 3.0.7
See the log file for details:  /tmp/jupyterlab-debug-8tqp_0m1.log
rebuilding js and css failed
missing files: ['/build/python-plotly/src/plotly.py-5.8.0/packages/python/plotly/jupyterlab_plotly/labextension/package.json']

chrislea commented on 2022-05-11 18:41 (UTC)

Confirming it now builds correctly after this update (5.8.0-2). Thank you!

bertptrs commented on 2022-05-10 20:48 (UTC)

Upstream has sneakily replaced the tar after I updated the package. The hash has now been updated.

chrislea commented on 2022-05-10 02:33 (UTC)

Here's a diff that will correct the PKGBUILD file:

diff --git a/PKGBUILD b/PKGBUILD
index 73bda3b..e37f883 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -25,7 +25,7 @@ npm)
 license=('MIT')
 arch=('any')
 source=("${pkgname}-${pkgver}.tar.gz::https://github.com/plotly/plotly.py/archive/v${pkgver}.tar.gz")
-sha256sums=('cd69a4dda3ae934643b4b2c614d997b0a34f18432964f454107f2dd5eae5bf46')
+sha256sums=('00e8261f61a910ed561866210d7c6567045df80f7b2e3cf59617c20bad861d6e')

 build() {
   cd plotly.py-${pkgver}/packages/python/plotly

chrislea commented on 2022-05-10 02:24 (UTC)

The 5.8.0 package fails to build due to a hash mismatch. The sha56sum of the tarball in the PKGBUILD is:

cd69a4dda3ae934643b4b2c614d997b0a34f18432964f454107f2dd5eae5bf46

but the hash of the actual tarball is:

00e8261f61a910ed561866210d7c6567045df80f7b2e3cf59617c20bad861d6e

It builds with no problem on my laptop once the PKBUILD is updated with the correct hashsum.

carlosal1015 commented on 2022-04-06 16:50 (UTC) (edited on 2022-04-16 19:17 (UTC) by carlosal1015)

Thanks, I will try today later in other machine. Thank you, it is working with more resources.

bertptrs commented on 2022-04-06 16:42 (UTC)

This package does not need jupyterlab-plotly as makedepends. There are no missing dependencies.

@carlosal1015 your machine ran out of RAM while building the JS parts of plotly. Your logs also show this. Webpack is super memory-hungry and needs about 4GB of RAM to build this project. Nothing to be done about that.

@lmartinez-mirror: interesting find, thank you. I need to investigate that further but I wanted to get the updated package out the door first.

lmartinez-mirror commented on 2022-03-29 02:47 (UTC)

This package installs files under /usr/etc where I think you meant to put them under just /etc.

AchmadFathoni commented on 2022-03-28 09:00 (UTC)

I think this AUR needs jupyterlab-plotly as makedepends. Otherwise, we get error as carlosal1015

gps1539 commented on 2021-12-14 21:18 (UTC)

Many thanks for the reply. I tried a full clean reinstall and it now imports correctly.

moshiur_rahman commented on 2021-12-14 16:00 (UTC)

@gps1539 you should rebuild plotly. If you previously built plotly with python 3.9 then it's libraries will be in /usr/lib/python3.9 and python 3.10 will not use those libs.

gps1539 commented on 2021-12-14 15:12 (UTC) (edited on 2021-12-14 15:16 (UTC) by gps1539)

After updating to python 3.10.1 I could not import plotly

aur/python-plotly 5.4.0-1 (+29 0.01) (Installed)

import plotly.graph_objects as go Traceback (most recent call last): File "<stdin>", line 1, in <module> ModuleNotFoundError: No module named 'plotly'

It seems there are issues with python 3.10.1 as reported by others. I downgraded back to 3.10.0 (which fixed issues with other python code), but I still can not import plotly.

I uninstalled aur/python-plotly and then pip installed and I can now import plotly. However I use plotly is stock_quote (currently broken) which I maintain the code and the aur package, any clues on this issue?

Neros commented on 2021-08-21 09:06 (UTC) (edited on 2021-08-21 21:24 (UTC) by Neros)

@bertptrs same issue with pikaur and makepkg, it's not related to yay.

EDIT: I tried to install it on my second computer and it works, I suspect an issue with npm on my primary computer, I have to find what... So, nothing wrong with the PKGBUILD for python-plotly.

EDIT 2: fixed by deleting /usr/lib/node_modules then pacman -Rcs nodejs npm jupyterlab. After that it was possible to install python-plotly normally.

bertptrs commented on 2021-08-21 07:34 (UTC)

@Neros I don't use yay but I can build it just fine using makepkg and pikaur. You can try using either of those, or building in a clean chroot.

Neros commented on 2021-08-21 03:48 (UTC)

Since the last update, I can't build it:

==> Making package: python-plotly 5.2.1-2 (Sat Aug 21 05:45:37 2021)
==> Retrieving sources...
  -> Found python-plotly-5.2.1.tar.gz
==> Validating source files with sha256sums...
    python-plotly-5.2.1.tar.gz ... Passed
==> Making package: python-plotly 5.2.1-2 (Sat Aug 21 05:45:37 2021)
==> Checking runtime dependencies...
==> Checking buildtime dependencies...
==> Retrieving sources...
  -> Found python-plotly-5.2.1.tar.gz
==> Validating source files with sha256sums...
    python-plotly-5.2.1.tar.gz ... Passed
==> Removing existing $srcdir/ directory...
==> Extracting sources...
  -> Extracting python-plotly-5.2.1.tar.gz with bsdtar
==> Sources are ready.
==> Making package: python-plotly 5.2.1-2 (Sat Aug 21 05:45:39 2021)
==> Checking runtime dependencies...
==> Checking buildtime dependencies...
==> WARNING: Using existing $srcdir/ tree
==> Removing existing $pkgdir/ directory...
==> Starting build()...
running build
running build_py
running jsdeps
7.21.0
7.21.0
Installing build dependencies with npm.  This may take a while...
npm WARN old lockfile 
npm WARN old lockfile The package-lock.json file was created with an old version of npm,
npm WARN old lockfile so supplemental metadata must be fetched from the registry.
npm WARN old lockfile 
npm WARN old lockfile This is a one-time fix-up, please be patient...
npm WARN old lockfile 
npm WARN deprecated crypto@1.0.1: This package is no longer supported. It's now a built-in Node module. If you've depended on crypto, you should switch to the one that's built-in.
npm ERR! semver.simplifyRange is not a function

npm ERR! A complete log of this run can be found in:
npm ERR!     /home/neros/.npm/_logs/2021-08-21T03_46_11_034Z-debug.log
rebuilding js and css failed
missing files: ['/home/neros/.cache/yay/python-plotly/src/plotly.py-5.2.1/packages/python/plotly/jupyterlab_plotly/nbextension/index.js', '/home/neros/.cache/yay/python-plotly/src/plotly.py-5.2.1/packages/python/plotly/jupyterlab_plotly/labextension/package.json']
Traceback (most recent call last):
  File "/home/neros/.cache/yay/python-plotly/src/plotly.py-5.2.1/packages/python/plotly/setup.py", line 493, in <module>
    setup(
  File "/usr/lib/python3.9/site-packages/setuptools/__init__.py", line 153, in setup
    return distutils.core.setup(**attrs)
  File "/usr/lib/python3.9/distutils/core.py", line 148, in setup
    dist.run_commands()
  File "/usr/lib/python3.9/distutils/dist.py", line 966, in run_commands
    self.run_command(cmd)
  File "/usr/lib/python3.9/distutils/dist.py", line 985, in run_command
    cmd_obj.run()
  File "/usr/lib/python3.9/distutils/command/build.py", line 135, in run
    self.run_command(cmd_name)
  File "/usr/lib/python3.9/distutils/cmd.py", line 313, in run_command
    self.distribution.run_command(command)
  File "/usr/lib/python3.9/distutils/dist.py", line 985, in run_command
    cmd_obj.run()
  File "/home/neros/.cache/yay/python-plotly/src/plotly.py-5.2.1/packages/python/plotly/setup.py", line 102, in run
    raise e
  File "/home/neros/.cache/yay/python-plotly/src/plotly.py-5.2.1/packages/python/plotly/setup.py", line 95, in run
    self.distribution.run_command("jsdeps")
  File "/usr/lib/python3.9/distutils/dist.py", line 985, in run_command
    cmd_obj.run()
  File "/home/neros/.cache/yay/python-plotly/src/plotly.py-5.2.1/packages/python/plotly/setup.py", line 182, in run
    check_call(
  File "/usr/lib/python3.9/subprocess.py", line 373, in check_call
    raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['npm', 'install']' returned non-zero exit status 1.
==> ERROR: A failure occurred in build().
    Aborting...

bertptrs commented on 2021-08-17 21:19 (UTC)

@JP-Ellis thanks for the heads-up; I've updated the dependencies to reflect some more recent changes upstream.

JP-Ellis commented on 2021-08-17 07:39 (UTC) (edited on 2021-08-17 07:39 (UTC) by JP-Ellis)

It appears that the dependency python-retrying has been replaced with python-tenacity in the most recent version(s).

The change happened in this PR: https://github.com/plotly/plotly.py/pull/2911

bertptrs commented on 2021-07-02 20:48 (UTC)

Missing dependency on typescript. The build tries to call tsc at some point but it's not listed as a dependency. I think this should be a makedepends too.

moshiur_rahman commented on 2021-07-01 19:04 (UTC)

Copying the dependencies from python-plotly-git works fine for me. Also jupyterlab should be a make dependency as is the case for python-plotly-git.

bartus commented on 2021-07-01 08:24 (UTC) (edited on 2021-07-01 08:24 (UTC) by bartus)

@greyltc: still missing npm makedepends

gps1539 commented on 2021-06-28 22:55 (UTC) (edited on 2021-06-28 22:55 (UTC) by gps1539)

The new version of plotly seems to want to import the tenacity module. Can you add python-tenacity as a dependency, thanks.

jorgicio commented on 2021-06-28 01:29 (UTC)

Hi. Once I tried to build it but it requires missing dependencies. Please, add npm and jupyterlab.

Thanks.

moshiur_rahman commented on 2021-06-27 22:42 (UTC)

It seems additional dependencies are needed for 5.0.0.

==> Starting build()...
running build
running build_py
running jsdeps
`npm` unavailable.  If you're running this command using sudo, make sure `npm` is available to sudo
rebuilding js and css failed
missing files: ['/home/moshiur/.cache/paru/clone/python-plotly/src/plotly.py-5.0.0/packages/python/plotly/jupyterlab_plotly/nbextension/index.js', '/home/moshiur/.cache/paru/clone/python-plotly/src/plotly.py-5.0.0/packages/python/plotly/jupyterlab_plotly/labextension/package.json']
Traceback (most recent call last):
  File "/home/moshiur/.cache/paru/clone/python-plotly/src/plotly.py-5.0.0/packages/python/plotly/setup.py", line 493, in <module>
    setup(
  File "/usr/lib/python3.9/site-packages/setuptools/__init__.py", line 153, in setup
    return distutils.core.setup(**attrs)
  File "/usr/lib/python3.9/distutils/core.py", line 148, in setup
    dist.run_commands()
  File "/usr/lib/python3.9/distutils/dist.py", line 966, in run_commands
    self.run_command(cmd)
  File "/usr/lib/python3.9/distutils/dist.py", line 985, in run_command
    cmd_obj.run()
  File "/usr/lib/python3.9/distutils/command/build.py", line 135, in run
    self.run_command(cmd_name)
  File "/usr/lib/python3.9/distutils/cmd.py", line 313, in run_command
    self.distribution.run_command(command)
  File "/usr/lib/python3.9/distutils/dist.py", line 985, in run_command
    cmd_obj.run()
  File "/home/moshiur/.cache/paru/clone/python-plotly/src/plotly.py-5.0.0/packages/python/plotly/setup.py", line 102, in run
    raise e
  File "/home/moshiur/.cache/paru/clone/python-plotly/src/plotly.py-5.0.0/packages/python/plotly/setup.py", line 95, in run
    self.distribution.run_command("jsdeps")
  File "/usr/lib/python3.9/distutils/dist.py", line 985, in run_command
    cmd_obj.run()
  File "/home/moshiur/.cache/paru/clone/python-plotly/src/plotly.py-5.0.0/packages/python/plotly/setup.py", line 201, in run
    raise ValueError(msg)
ValueError: Missing file: /home/moshiur/.cache/paru/clone/python-plotly/src/plotly.py-5.0.0/packages/python/plotly/jupyterlab_plotly/nbextension/index.js
npm is required to build a development version of jupyterlab-plotly
==> ERROR: A failure occurred in build().
    Aborting...
error: failed to build 'python-plotly-5.0.0-1':
error: packages failed to buid: python-plotly-5.0.0-1

greyltc commented on 2020-08-02 09:27 (UTC)

I've seen the light on renaming the source tarball! Apparently some people like to archive all their source fetches in one folder. That means something like v4.9.0.tar.gz could conflict with some other package's tarball.

greyltc commented on 2020-05-29 15:14 (UTC) (edited on 2020-05-29 15:15 (UTC) by greyltc)

Hi @NicoHood, just noticed your comment here.
- I haven't noticed the need to explicitly rename the archives my PKGBUILDs download too often (only rarely when I'm downloading from some place that doesn't put the version number in the filename). GitHub seems to follow sane naming conventions, so maybe that's why. If github starts giving me tarballs without version numbers in their filenames, I'll start using the rename feature here.
- Yeah. I like to fetch the sources from github whenever I can. No real reason other than it being a domain I trust and an interface I'm familiar with. It even looks like maybe the development of this thing takes place there.
- I think the deps are correct. Happy to try to fix them if they're wrong.
- I didn't actively remove the contributor lines form the PKGBUILD. I chucked the entire thing and made a new one from scratch.
- Thanks for the reminder on the checksum. I'm happy to use sha512 if you'd like. Fixed.
Cheers!

NicoHood commented on 2020-03-24 17:53 (UTC)

@greyltc thanks for adopting this package. I had a quick look at the changes and found a few improvements that I want to suggest:

  • Please add a name of the downloaded archives, so you do not run into conflicts when downloading multiple sources: "${pkgname}-${pkgver}.tar.gz::<url>"
  • You changed the url to github, was there any reason for that? I do not really remember why we did not use github in first place.
  • The dependency python-pytz was removed and python-matplotlib was added. I am not up to date about the required dependencies, just to verify, did you check that those changes are correct?
  • You have removed the Contributor lines. Those are usually kept if questions arise, as well as credit/thanks to the contributor.
  • Please revert back to the more secure sha512sums, do not use md5.

Good job, well done!

greyltc commented on 2019-11-04 16:08 (UTC)

Why not just drop python2 support?

ymermoud commented on 2019-10-06 16:56 (UTC)

Same issue with conflicting files. Please make a separate packagae for python2-plotly. Thank you !

petko10 commented on 2019-09-19 23:11 (UTC)

There's still a problem with conflicting files, since the package tries to install both python-plotly and python2-plotly. I don't know if that's intended (since there's a separate package python2-plotly in AUR) but removing the code for python2-plotly from the PKGCONFIG fixes the installation for me.

NicoHood commented on 2019-08-07 19:40 (UTC)

Sorry for the delay! Please check if the package works properly.

Universebenzene commented on 2019-08-07 05:21 (UTC) (edited on 2019-08-07 07:03 (UTC) by Universebenzene)

Version 4.1.0 relased on Aug 7th. Do you have any problems in upgrading this package? I need some new features of the new version, please. Thank you.

adsun commented on 2019-07-17 22:19 (UTC) (edited on 2019-07-17 22:19 (UTC) by adsun)

Version 4.0.0 has just been released; would like to see this updated soon:

https://github.com/plotly/plotly.py/archive/v4.0.0.tar.gz

chilichiller commented on 2019-07-07 16:21 (UTC)

Same issue here with the conflicting files. I also endorse @tycho's idea. As quick and dirty workaround just removed the python2 package from the PKGBUILD and reinstalled.

cozisco commented on 2019-05-17 03:40 (UTC)

Same conflicting files since the last update. I think @tycho 's idea makes the most sense.

ymermoud commented on 2019-04-27 18:39 (UTC) (edited on 2019-04-27 18:44 (UTC) by ymermoud)

Same conflicting files here

error: failed to commit transaction (conflicting files)
/usr/etc/jupyter/nbconfig/notebook.d/plotlywidget.json exists in both 'python-plotly' and 'python2-plotly'
/usr/share/jupyter/nbextensions/plotlywidget/extension.js exists in both 'python-plotly' and 'python2-plotly'
/usr/share/jupyter/nbextensions/plotlywidget/index.js exists in both 'python-plotly' and 'python2-plotly'
Errors occurred, no packages were upgraded.

oneup commented on 2019-04-18 15:46 (UTC) (edited on 2019-04-18 16:01 (UTC) by oneup)

python-plotly: Needs a dependency for python-decorator

python2-plotly: Needs dependencies for python2-decorator, python2-retrying

It looks like retrying is in plotly's requirements.txt, but you might need to also request upstream to add decorator to their dependencies too.

Traceback (most recent call last):
  File "plot_latency.py", line 5, in <module>
    from plotly.offline import plot
  File "/usr/lib/python3.7/site-packages/plotly/__init__.py", line 31, in <module>
    from plotly import (plotly, dashboard_objs, graph_objs, grid_objs, tools,
  File "/usr/lib/python3.7/site-packages/plotly/plotly/__init__.py", line 10, in <module>
    from . plotly import (
  File "/usr/lib/python3.7/site-packages/plotly/plotly/plotly.py", line 33, in <module>
    from plotly import exceptions, files, session, tools, utils
  File "/usr/lib/python3.7/site-packages/plotly/tools.py", line 18, in <module>
    from plotly import exceptions, optional_imports, session, utils
  File "/usr/lib/python3.7/site-packages/plotly/utils.py", line 22, in <module>
    from decorator import decorator
ModuleNotFoundError: No module named 'decorator'
Traceback (most recent call last):
  File "plot_latency.py", line 5, in <module>
    from plotly.offline import plot
  File "/usr/lib/python2.7/site-packages/plotly/__init__.py", line 31, in <module>
    from plotly import (plotly, dashboard_objs, graph_objs, grid_objs, tools,
  File "/usr/lib/python2.7/site-packages/plotly/plotly/__init__.py", line 10, in <module>
    from . plotly import (
  File "/usr/lib/python2.7/site-packages/plotly/plotly/plotly.py", line 34, in <module>
    from plotly.api import v1, v2
  File "/usr/lib/python2.7/site-packages/plotly/api/v1/__init__.py", line 3, in <module>
    from plotly.api.v1.clientresp import clientresp
  File "/usr/lib/python2.7/site-packages/plotly/api/v1/clientresp.py", line 9, in <module>
    from plotly.api.v1.utils import request
  File "/usr/lib/python2.7/site-packages/plotly/api/v1/utils.py", line 5, in <module>
    from retrying import retry
ImportError: No module named retrying

amdj commented on 2019-04-01 15:04 (UTC) (edited on 2019-04-01 15:04 (UTC) by amdj)

Since last update, I also get conflicting files errors, more or less simular to @markzz:

/usr/etc/jupyter/nbconfig/notebook.d/plotlywidget.json exists in both 'python2-plotly' and 'python-plotly'
/usr/share/jupyter/nbextensions/plotlywidget/extension.js exists in both 'python2-plotly' and 'python-plotly'
/usr/share/jupyter/nbextensions/plotlywidget/index.js exists in both 'python2-plotly' and 'python-plotly'

thewhoo commented on 2019-03-15 15:13 (UTC)

Thanks for the package, however, there are missing python-matplotlib dependencies. I've posted a patch here: https://pastebin.com/W7avn0hj

Tharbad commented on 2019-02-16 08:15 (UTC)

There are conflicting files errors. Same as @markzz got 4 months ago. :(

tycho commented on 2018-10-11 17:40 (UTC)

How about moving the conflicting files to a plotly-common package, and have both python2-plotly and python-plotly depend on that?

NicoHood commented on 2018-10-03 12:42 (UTC)

I am not sure why those files are in /usr/etc, but I am also not sure if moving them to /etc is correct. Any help appreciated.

About the other conflicts: I could make the packages conflict against each other, or delete them in the python2 package and make it depend on the python3 one. I am not sure if this is a good solution. Any ideas?

markzz commented on 2018-10-02 06:49 (UTC) (edited on 2018-10-02 06:50 (UTC) by markzz)

When built today and if you attempt to install both packages, you have some conflicts in /usr/share. Also, there's files in /usr/etc that should be in /etc.

/usr/etc/jupyter/nbconfig/notebook.d/plotlywidget.json exists in both 'python-plotly' and 'python2-plotly'
/usr/share/jupyter/nbextensions/plotlywidget/extension.js exists in both 'python-plotly' and 'python2-plotly'
/usr/share/jupyter/nbextensions/plotlywidget/index.js exists in both 'python-plotly' and 'python2-plotly'
/usr/share/jupyter/nbextensions/plotlywidget/index.js.map exists in both 'python-plotly' and 'python2-plotly'

roarchero commented on 2017-11-10 10:51 (UTC)

for updating to version 2.2.1: I think its sufficient to change the pkgver to 2.2.1 and sha512sum to f72650eb62a9f095332fb10a3c849a8d789f674fa31e05fcb8961f22a4cd7b758cf2688494ff200878ccf3a9f7c298ca29abc8dc16dcec8ca514d536e499f16e in the PKGBUILD. at least it seems like it is working then..

fclad commented on 2017-06-30 14:10 (UTC)

Done! Thanks for your contributions NicoHood!

NicoHood commented on 2017-06-17 09:28 (UTC)

Please add the optional dependency "python-numpy: plotly tables" https://plot.ly/python/table/ You can also add me as co-maintainer :)

NicoHood commented on 2017-06-05 16:27 (UTC)

@fclad: I made several improvements to this package, you can review them here: https://gist.github.com/NicoHood/a8254fa2f922d780e74b5b9f5293c92d *split package for python2/3 * Better url * stronger sha512sum (your was SKIP!!!) * added missing six dependency * added proper license file * version update I've manually copied the LICENSE file into the git repo, you'd need to do the same. You can also add me as co-maintainer if you wish. Depending on how useful i find plotly, I will possibly move it into the official repositories if the GPG sign the software.

fclad commented on 2016-04-21 19:09 (UTC)

I have updated the PKGBUILD to use pypi, as you suggested. Thanks for the feedback, and feel free to report any problems.

wicast commented on 2016-04-20 02:12 (UTC) (edited on 2016-04-20 02:12 (UTC) by wicast)

You'd better use pypi directly,the revision numbers should only be used in -git package. And dude forget update the .SRCINFO file.

fclad commented on 2016-04-19 14:46 (UTC)

I will use revision numbers instead of tags to get the version. The plotly team does not use tags since version 1.6.

wicast commented on 2016-04-19 10:08 (UTC)

python-setuptools is also needed for building.