Closed kloczek closed 1 year ago
Did you clone the repo and run python setup.py
? In order to install the plotly
package you must cd packages/python/plotly
first, as it suggest in the error message :)
Even with change directory to packages/python/plotly pep517 build fails.
+ cd plotly.py-5.7.0
+ cd packages/python/plotly
+ /usr/bin/python3 -sBm build -w --no-isolation
* Getting dependencies for wheel...
/usr/lib/python3.8/site-packages/setuptools/dist.py:299: DistDeprecationWarning: use_2to3 is ignored.
warnings.warn(f"{attr} is ignored.", DistDeprecationWarning)
running egg_info
running jsdeps
8.5.0
8.5.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 old lockfile regl: No matching version found for regl@2.1.2.
npm WARN old lockfile at module.exports (/usr/lib/node_modules/npm/node_modules/npm-pick-manifest/index.js:209:23)
npm WARN old lockfile at /usr/lib/node_modules/npm/node_modules/pacote/lib/registry.js:118:26
npm WARN old lockfile at async Array.<anonymous> (/usr/lib/node_modules/npm/node_modules/@npmcli/arborist/lib/arborist/build-ideal-tree.js:759:9)
npm WARN old lockfile Could not fetch metadata for regl@2.1.2 regl: No matching version found for regl@2.1.2.
npm WARN old lockfile at module.exports (/usr/lib/node_modules/npm/node_modules/npm-pick-manifest/index.js:209:23)
npm WARN old lockfile at /usr/lib/node_modules/npm/node_modules/pacote/lib/registry.js:118:26
npm WARN old lockfile at async Array.<anonymous> (/usr/lib/node_modules/npm/node_modules/@npmcli/arborist/lib/arborist/build-ideal-tree.js:759:9) {
npm WARN old lockfile code: 'ETARGET',
npm WARN old lockfile type: 'version',
npm WARN old lockfile wanted: '2.1.2',
npm WARN old lockfile versions: [
npm WARN old lockfile '0.0.0', '0.1.0', '0.2.0', '0.3.0',
npm WARN old lockfile '0.4.0', '0.5.0', '0.6.0', '0.7.1',
npm WARN old lockfile '0.8.0', '0.9.0', '0.10.0', '0.11.0',
npm WARN old lockfile '1.0.0', '1.1.0', '1.1.1', '1.2.0',
npm WARN old lockfile '1.2.1', '1.3.0', '1.3.1', '1.3.3',
npm WARN old lockfile '1.3.4', '1.3.5', '1.3.6', '1.3.7',
npm WARN old lockfile '1.3.8', '1.3.9', '1.3.10', '1.3.11',
npm WARN old lockfile '1.3.12', '1.3.13', '1.4.0', '1.4.1',
npm WARN old lockfile '1.4.2', '1.5.0', '1.5.1', '1.5.2',
npm WARN old lockfile '1.6.0', '1.6.1', '1.7.0', '2.0.0',
npm WARN old lockfile '2.0.1', '2.1.0'
npm WARN old lockfile ],
npm WARN old lockfile distTags: { latest: '2.1.0' },
npm WARN old lockfile defaultTag: 'latest'
npm WARN old lockfile }
npm WARN deprecated mumath@3.3.4: Redundant dependency in your project.
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.
added 743 packages, and audited 744 packages in 37s
76 packages are looking for funding
run `npm fund` for details
found 0 vulnerabilities
npm notice
npm notice New minor version of npm available! 8.5.0 -> 8.6.0
npm notice Changelog: https://github.com/npm/cli/releases/tag/v8.6.0
npm notice Run npm install -g npm@8.6.0 to update!
npm notice
> jupyterlab-plotly@5.7.0 build:prod
> npm run build:lib && npm run build:nbextension && npm run build:labextension
> jupyterlab-plotly@5.7.0 build:lib
> tsc
> jupyterlab-plotly@5.7.0 build:nbextension
> webpack --mode=production
/home/tkloczko/rpmbuild/BUILD/plotly.py-5.7.0/packages/javascript/jupyterlab-plotly/node_modules/loader-runner/lib/LoaderRunner.js:146
if(isError) throw e;
^
Error: error:0308010C:digital envelope routines::unsupported
at new Hash (node:internal/crypto/hash:67:19)
at Object.createHash (node:crypto:130:10)
at BulkUpdateDecorator.hashFactory (/home/tkloczko/rpmbuild/BUILD/plotly.py-5.7.0/packages/javascript/jupyterlab-plotly/node_modules/webpack/lib/util/createHash.js:144:18)
at BulkUpdateDecorator.update (/home/tkloczko/rpmbuild/BUILD/plotly.py-5.7.0/packages/javascript/jupyterlab-plotly/node_modules/webpack/lib/util/createHash.js:46:50)
at RawSource.updateHash (/home/tkloczko/rpmbuild/BUILD/plotly.py-5.7.0/packages/javascript/jupyterlab-plotly/node_modules/webpack/node_modules/webpack-sources/lib/RawSource.js:64:8)
at NormalModule._initBuildHash (/home/tkloczko/rpmbuild/BUILD/plotly.py-5.7.0/packages/javascript/jupyterlab-plotly/node_modules/webpack/lib/NormalModule.js:838:17)
at handleParseResult (/home/tkloczko/rpmbuild/BUILD/plotly.py-5.7.0/packages/javascript/jupyterlab-plotly/node_modules/webpack/lib/NormalModule.js:903:10)
at /home/tkloczko/rpmbuild/BUILD/plotly.py-5.7.0/packages/javascript/jupyterlab-plotly/node_modules/webpack/lib/NormalModule.js:994:4
at processResult (/home/tkloczko/rpmbuild/BUILD/plotly.py-5.7.0/packages/javascript/jupyterlab-plotly/node_modules/webpack/lib/NormalModule.js:717:11)
at /home/tkloczko/rpmbuild/BUILD/plotly.py-5.7.0/packages/javascript/jupyterlab-plotly/node_modules/webpack/lib/NormalModule.js:777:5 {
opensslErrorStack: [ 'error:03000086:digital envelope routines::initialization error' ],
library: 'digital envelope routines',
reason: 'unsupported',
code: 'ERR_OSSL_EVP_UNSUPPORTED'
}
rebuilding js and css failed
missing files: ['/home/tkloczko/rpmbuild/BUILD/plotly.py-5.7.0/packages/python/plotly/jupyterlab_plotly/nbextension/index.js', '/home/tkloczko/rpmbuild/BUILD/plotly.py-5.7.0/packages/python/plotly/jupyterlab_plotly/labextension/package.json']
Traceback (most recent call last):
File "/usr/lib/python3.8/site-packages/pep517/in_process/_in_process.py", line 363, in <module>
main()
File "/usr/lib/python3.8/site-packages/pep517/in_process/_in_process.py", line 345, in main
json_out['return_val'] = hook(**hook_input['kwargs'])
File "/usr/lib/python3.8/site-packages/pep517/in_process/_in_process.py", line 130, in get_requires_for_build_wheel
return hook(config_settings)
File "/usr/lib/python3.8/site-packages/setuptools/build_meta.py", line 177, in get_requires_for_build_wheel
return self._get_build_requires(
File "/usr/lib/python3.8/site-packages/setuptools/build_meta.py", line 159, in _get_build_requires
self.run_setup()
File "/usr/lib/python3.8/site-packages/setuptools/build_meta.py", line 174, in run_setup
exec(compile(code, __file__, 'exec'), locals())
File "setup.py", line 495, in <module>
setup(
File "/usr/lib/python3.8/site-packages/setuptools/__init__.py", line 155, in setup
return distutils.core.setup(**attrs)
File "/usr/lib/python3.8/site-packages/setuptools/_distutils/core.py", line 148, in setup
return run_commands(dist)
File "/usr/lib/python3.8/site-packages/setuptools/_distutils/core.py", line 163, in run_commands
dist.run_commands()
File "/usr/lib/python3.8/site-packages/setuptools/_distutils/dist.py", line 967, in run_commands
self.run_command(cmd)
File "/usr/lib/python3.8/site-packages/setuptools/_distutils/dist.py", line 986, in run_command
cmd_obj.run()
File "setup.py", line 104, in run
raise e
File "setup.py", line 97, in run
self.distribution.run_command("jsdeps")
File "/usr/lib/python3.8/site-packages/setuptools/_distutils/dist.py", line 986, in run_command
cmd_obj.run()
File "setup.py", line 190, in run
check_call(
File "/usr/lib64/python3.8/subprocess.py", line 364, in check_call
raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['npm', 'run', 'build:prod']' returned non-zero exit status 1.
Just in case I'm usimg openssl 3.0.2.
Just checked 5.8.0 and looks like build fails exactly the same way.
Looks like I'm running into the same error here as well: https://github.com/plotly/plotly.py/issues/3736
Can you check which version of Node you are using? I'm using v12 and not seeing any issues. StackOverflow suggests that downgrading to 14 might help? https://stackoverflow.com/questions/69692842/error-message-error0308010cdigital-envelope-routinesunsupported
[tkloczko@devel-g2v SPECS]$ node --version
v16.14.1
If you're able to try a lower version, like 12 or 14, I think that might be part of the solution here.
If you're able to try a lower version, like 12 or 14, I think that might be part of the solution here.
Really sorry but I have no time for regression tests 😞
Fair enough! This isn't really a regression from my point of view: we build with Node 12 for releases. I should just add this to the documentation.
I managed to get past this error by downgrading node to v14.19.3. However, I'm still running into the following issue when I try to run updateplotlyjsdev
. I am trying to make a change to plotly.js and get that change into my local copy of plotly.py.
(venv) (base) ➜ plotly git:(master) ✗ python setup.py updateplotlyjsdev --devrepo "sudeepag/plotly.js" --devbranch "adjust-dim-label-y-pos"
running updateplotlyjsdev
running updatebundleschemadev
Traceback (most recent call last):
File "setup.py", line 495, in <module>
setup(
File "/Users/sudeep/Documents/plotly-dev/plotly.py/venv/lib/python3.8/site-packages/setuptools/__init__.py", line 145, in setup
return distutils.core.setup(**attrs)
File "/Users/sudeep/opt/anaconda3/lib/python3.8/distutils/core.py", line 148, in setup
dist.run_commands()
File "/Users/sudeep/opt/anaconda3/lib/python3.8/distutils/dist.py", line 966, in run_commands
self.run_command(cmd)
File "/Users/sudeep/opt/anaconda3/lib/python3.8/distutils/dist.py", line 985, in run_command
cmd_obj.run()
File "setup.py", line 443, in run
self.run_command("updatebundleschemadev")
File "/Users/sudeep/opt/anaconda3/lib/python3.8/distutils/cmd.py", line 313, in run_command
self.distribution.run_command(command)
File "/Users/sudeep/opt/anaconda3/lib/python3.8/distutils/dist.py", line 985, in run_command
cmd_obj.run()
File "setup.py", line 399, in run
build_info = get_latest_publish_build_info(self.devrepo, self.devbranch)
File "setup.py", line 295, in get_latest_publish_build_info
builds = [
File "setup.py", line 298, in <listcomp>
if j.get("workflows", {}).get("job_name", None) == "publish-dist"
AttributeError: 'str' object has no attribute 'get'
Any ideas? Also, is there some other way for me to test my changes locally in Python other than running updateplotlyjsdev
every time?
Thanks!
I have the same problem on Windows.
gentle ping .. any update? 🤔
With updated to latest version setuptools
pp517 based build no longer fails.
Closing.
Looks like 5.7.0 is not pep517 ready