conda-forge / sage-feedstock

A conda-smithy repository for sage.
BSD 3-Clause "New" or "Revised" License
7 stars 11 forks source link

Sage 9.5: 3D plots broken - share/threejs-sage/r122/three.min.js missing #72

Closed mkoeppe closed 2 years ago

mkoeppe commented 2 years ago

Issue:

In the terminal

sage: polytopes.cube().plot()
Launched html viewer for Graphics3d Object

Resulting web page is blank. Viewing page source reveals a hardcode path /Users/mkoeppe/miniconda3/envs/sage-2022-02/share/threejs-sage/r122/three.min.js. This file does not exist


Environment (conda list):

``` $ conda list $ conda list # packages in environment at /Users/mkoeppe/miniconda3/envs/sage-2022-02: # # Name Version Build Channel _r-mutex 1.0.1 anacondar_1 conda-forge alabaster 0.7.12 py_0 conda-forge appnope 0.1.2 py310h2ec42d9_2 conda-forge arb 2.21.1 hc148fab_0 conda-forge argon2-cffi 21.3.0 pyhd8ed1ab_0 conda-forge argon2-cffi-bindings 21.2.0 py310he24745e_1 conda-forge arpack 3.7.0 hefb7bc6_2 conda-forge attrs 21.4.0 pyhd8ed1ab_0 conda-forge babel 2.9.1 pyh44b312d_0 conda-forge backcall 0.2.0 pyh9f0ad1d_0 conda-forge backports 1.0 py_2 conda-forge backports.functools_lru_cache 1.6.4 pyhd8ed1ab_0 conda-forge bdw-gc 8.0.4 h9a9d8cb_0 conda-forge beniget 0.4.1 pyhd8ed1ab_0 conda-forge blas-devel 3.9.0 13_osx64_openblas conda-forge bleach 3.3.1 pyhd8ed1ab_0 conda-forge brial 1.2.10 pyh8af1aa0_0 conda-forge brotli 1.0.9 h0d85af4_6 conda-forge brotli-bin 1.0.9 h0d85af4_6 conda-forge brotlipy 0.7.0 py310he24745e_1003 conda-forge bwidget 1.9.14 h694c41f_1 conda-forge bzip2 1.0.8 h0d85af4_4 conda-forge c-ares 1.18.1 h0d85af4_0 conda-forge ca-certificates 2021.10.8 h033912b_0 conda-forge cairo 1.16.0 he01c77b_1009 conda-forge cctools_osx-64 973.0.1 hb41342b_6 conda-forge cddlib 1!0.94m h0f52abe_0 conda-forge certifi 2021.10.8 py310h2ec42d9_1 conda-forge cffi 1.15.0 py310hcc37b68_0 conda-forge charset-normalizer 2.0.11 pyhd8ed1ab_0 conda-forge clang 11.1.0 h694c41f_1 conda-forge clang-11 11.1.0 default_he082bbe_1 conda-forge clang_osx-64 11.1.0 hc8532ff_6 conda-forge clangxx 11.1.0 default_he082bbe_1 conda-forge clangxx_osx-64 11.1.0 h2c55bc3_6 conda-forge cliquer 1.22 hbcb3906_0 conda-forge colorama 0.4.4 pyh9f0ad1d_0 conda-forge compiler-rt 11.1.0 h654b07c_0 conda-forge compiler-rt_osx-64 11.1.0 h8c5fa43_0 conda-forge cryptography 36.0.1 py310ha82f1d4_0 conda-forge curl 7.81.0 hf45b732_0 conda-forge cvxopt 1.2.7 py310hfb4135e_1 conda-forge cycler 0.11.0 pyhd8ed1ab_0 conda-forge cypari2 2.1.2 py310hc749d29_3 conda-forge cysignals 1.11.2 py310h13c92f6_0 conda-forge cython 0.29.27 py310hba3363e_0 conda-forge debugpy 1.5.1 py310hba3363e_0 conda-forge decorator 4.4.2 py_0 conda-forge defusedxml 0.7.1 pyhd8ed1ab_0 conda-forge docutils 0.17.1 py310h2ec42d9_1 conda-forge dsdp 5.8 h6e329d1_1203 conda-forge ecl 21.2.1 hcd14dc1_1 conda-forge eclib 20210625 hdcab1d1_4 conda-forge ecm 7.0.4 h343d7f2_1002 conda-forge entrypoints 0.4 pyhd8ed1ab_0 conda-forge expat 2.4.4 he49afe7_0 conda-forge fflas-ffpack 2.4.3 h026fd7e_2 conda-forge fftw 3.3.10 nompi_hf082fe4_102 conda-forge flintqs 1.0 ha6586c5_1001 conda-forge flit-core 3.6.0 pyhd8ed1ab_0 conda-forge font-ttf-dejavu-sans-mono 2.37 hab24e00_0 conda-forge font-ttf-inconsolata 3.000 h77eed37_0 conda-forge font-ttf-source-code-pro 2.038 h77eed37_0 conda-forge font-ttf-ubuntu 0.83 hab24e00_0 conda-forge fontconfig 2.13.96 h10f422b_0 conda-forge fonts-conda-ecosystem 1 0 conda-forge fonts-conda-forge 1 0 conda-forge fonttools 4.29.1 py310he24745e_0 conda-forge fplll 5.4.1 h1dc45ce_0 conda-forge fpylll 0.5.6 py310hd7b656c_1 conda-forge freetype 2.10.4 h4cff582_1 conda-forge fribidi 1.0.10 hbcb3906_0 conda-forge future 0.18.2 py310h2ec42d9_4 conda-forge gap-core 4.11.1 h4855eeb_2 conda-forge gap-defaults 4.11.1 h694c41f_2 conda-forge gast 0.5.3 pyhd8ed1ab_0 conda-forge gettext 0.19.8.1 hd1a6beb_1008 conda-forge gf2x 1.3.0 h0959a2e_1 conda-forge gfan 0.6.2 hd793b56_1003 conda-forge gfortran_impl_osx-64 9.3.0 h9cc0e5e_23 conda-forge gfortran_osx-64 9.3.0 h18f7dce_15 conda-forge giac 1.6.0.47 h6fe0c01_3 conda-forge giflib 5.2.1 hbcb3906_2 conda-forge givaro 4.1.1 h9bcddcd_2 conda-forge glpk 4.65 h0f52abe_1004 conda-forge gmp 6.2.1 h2e338ed_0 conda-forge gmpy2 2.1.2 py310hf5ec7bd_0 conda-forge graphite2 1.3.13 h2e338ed_1001 conda-forge gsl 2.7 h93259b0_0 conda-forge harfbuzz 3.3.1 h447b35c_0 conda-forge icu 69.1 he49afe7_0 conda-forge idna 3.3 pyhd8ed1ab_0 conda-forge igraph 0.9.6 ha5be149_0 conda-forge imagesize 1.3.0 pyhd8ed1ab_0 conda-forge iml 1.0.5 h64b42ca_1003 conda-forge importlib-metadata 4.11.0 py310h2ec42d9_0 conda-forge ipykernel 6.9.0 py310ha188af9_0 conda-forge ipython 7.31.1 py310h2ec42d9_0 conda-forge ipython_genutils 0.2.0 py_1 conda-forge ipywidgets 7.6.5 pyhd8ed1ab_0 conda-forge isl 0.22.1 hb1e8313_2 conda-forge jbig 2.1 h0d85af4_2003 conda-forge jedi 0.18.1 py310h2ec42d9_0 conda-forge jinja2 3.0.3 pyhd8ed1ab_0 conda-forge jmol 14.32.9 h694c41f_0 conda-forge jpeg 9e h0d85af4_0 conda-forge jsonschema 3.2.0 pyhd8ed1ab_3 conda-forge jupyter_client 7.1.2 pyhd8ed1ab_0 conda-forge jupyter_core 4.9.1 py310h2ec42d9_1 conda-forge jupyterlab_pygments 0.1.2 pyh9f0ad1d_0 conda-forge jupyterlab_widgets 1.0.2 pyhd8ed1ab_0 conda-forge kiwisolver 1.3.2 py310h2fea185_1 conda-forge krb5 1.19.2 hcfbf3a7_3 conda-forge lcalc 2.0.5 he3dd645_0 conda-forge lcms2 2.12 h577c468_0 conda-forge ld64_osx-64 609 h6adca69_6 conda-forge lerc 3.0 he49afe7_0 conda-forge libblas 3.9.0 13_osx64_openblas conda-forge libbraiding 1.1 h2e338ed_0 conda-forge libbrial 1.2.10 h90380fc_0 conda-forge libbrotlicommon 1.0.9 h0d85af4_6 conda-forge libbrotlidec 1.0.9 h0d85af4_6 conda-forge libbrotlienc 1.0.9 h0d85af4_6 conda-forge libcblas 3.9.0 13_osx64_openblas conda-forge libclang-cpp11.1 11.1.0 default_he082bbe_1 conda-forge libcurl 7.81.0 hf45b732_0 conda-forge libcxx 12.0.1 habf9029_1 conda-forge libdeflate 1.8 h0d85af4_0 conda-forge libedit 3.1.20191231 h0678c8f_2 conda-forge libev 4.33 haf1e3a3_1 conda-forge libffi 3.4.2 h0d85af4_5 conda-forge libflint 2.8.4 hd3cc997_ntl_100 conda-forge libgd 2.3.3 hb8742e1_1 conda-forge libgfortran 5.0.0 9_3_0_h6c81a4c_23 conda-forge libgfortran-devel_osx-64 9.3.0 h6c81a4c_23 conda-forge libgfortran5 9.3.0 h6c81a4c_23 conda-forge libglib 2.70.2 hf1fb8c0_2 conda-forge libhomfly 1.02r6 hc929b4f_0 conda-forge libiconv 1.16 haf1e3a3_0 conda-forge liblapack 3.9.0 13_osx64_openblas conda-forge liblapacke 3.9.0 13_osx64_openblas conda-forge libllvm11 11.1.0 hd011deb_2 conda-forge libnghttp2 1.46.0 h6f36284_0 conda-forge libopenblas 0.3.18 openmp_h3351f45_0 conda-forge libpng 1.6.37 h7cec526_2 conda-forge libsodium 1.0.18 hbcb3906_1 conda-forge libssh2 1.10.0 h52ee1ee_2 conda-forge libtiff 4.3.0 hd146c10_2 conda-forge libwebp 1.2.2 h28dabe5_0 conda-forge libwebp-base 1.2.2 h0d85af4_1 conda-forge libxml2 2.9.12 h7e28ab6_1 conda-forge libzlib 1.2.11 h9173be1_1013 conda-forge linbox 1.6.3 h9ed2ecd_6 conda-forge llvm-openmp 13.0.1 hda6cdc1_0 conda-forge llvm-tools 11.1.0 hd011deb_2 conda-forge lrcalc 1.2 h2e338ed_1000 conda-forge lz4-c 1.9.3 he49afe7_1 conda-forge m4ri 20140914 h3f75d11_1005 conda-forge m4rie 20150908 h3f75d11_1001 conda-forge make 4.3 h22f3db7_1 conda-forge markupsafe 2.0.1 py310he24745e_1 conda-forge matplotlib-base 3.5.1 py310hfc59cd6_0 conda-forge matplotlib-inline 0.1.3 pyhd8ed1ab_0 conda-forge maxima 5.45.0 hd029580_3 conda-forge memory-allocator 0.1.2 py310he24745e_0 conda-forge metis 5.1.0 h2e338ed_1006 conda-forge mistune 0.8.4 py310he24745e_1005 conda-forge mpc 1.2.1 hbb51d92_0 conda-forge mpfi 1.5.4 h52b28e3_1001 conda-forge mpfr 4.1.0 h0f52abe_1 conda-forge mpmath 1.2.1 pyhd8ed1ab_0 conda-forge munkres 1.1.4 pyh9f0ad1d_0 conda-forge nauty 2.7.2 h0d85af4_0 conda-forge nbclient 0.5.10 pyhd8ed1ab_1 conda-forge nbconvert 6.4.2 py310h2ec42d9_0 conda-forge nbformat 5.1.3 pyhd8ed1ab_0 conda-forge ncurses 6.3 he49afe7_0 conda-forge nest-asyncio 1.5.4 pyhd8ed1ab_0 conda-forge networkx 2.6.3 pyhd8ed1ab_1 conda-forge notebook 6.4.8 pyha770c72_0 conda-forge ntl 11.4.3 h0ab3c2f_1 conda-forge numpy 1.22.2 py310hfbbbacf_0 conda-forge olefile 0.46 pyh9f0ad1d_1 conda-forge openblas 0.3.18 openmp_h12da7db_0 conda-forge openjdk 11.0.9.1 hcf210ce_1 conda-forge openjpeg 2.4.0 h6e7aa92_1 conda-forge openssl 1.1.1l h0d85af4_0 conda-forge packaging 21.3 pyhd8ed1ab_0 conda-forge palp 2.20 hbcb3906_0 conda-forge pandas 1.4.1 py310hdd25497_0 conda-forge pandoc 2.17.1.1 h694c41f_0 conda-forge pandocfilters 1.5.0 pyhd8ed1ab_0 conda-forge pango 1.48.10 h056538c_2 conda-forge pari 2.13.3 h491590d_1_pthread conda-forge pari-galdata 0.0.20180411 0 conda-forge pari-seadata-small 0.0.20090618 0 conda-forge parso 0.8.3 pyhd8ed1ab_0 conda-forge pcre 8.45 he49afe7_0 conda-forge pcre2 10.37 ha16e1b2_0 conda-forge perl 5.32.1 1_h0d85af4_perl5 conda-forge pexpect 4.8.0 pyh9f0ad1d_2 conda-forge pickleshare 0.7.5 py_1003 conda-forge pillow 8.4.0 py310h7a4d1b7_0 conda-forge pip 22.0.3 pyhd8ed1ab_0 conda-forge pixman 0.40.0 hbcb3906_0 conda-forge pkg-config 0.29.2 h31203cd_1008 conda-forge pkgconfig 1.5.5 py310h2ec42d9_1 conda-forge planarity 3.0.0.5 hbcb3906_1002 conda-forge ply 3.11 py_1 conda-forge ppl 1.2 h88b529c_1004 conda-forge pplpy 0.8.6 py310h549f3a4_1 conda-forge primecount 7.2 he49afe7_1 conda-forge primecountpy 0.1.0 py310h2fea185_1 conda-forge primesieve 7.8 he49afe7_1 conda-forge prometheus_client 0.13.1 pyhd8ed1ab_0 conda-forge prompt-toolkit 3.0.27 pyha770c72_0 conda-forge prompt_toolkit 3.0.27 hd8ed1ab_0 conda-forge psutil 5.9.0 py310he24745e_0 conda-forge ptyprocess 0.7.0 pyhd3deb0d_0 conda-forge pycparser 2.21 pyhd8ed1ab_0 conda-forge pygments 2.11.2 pyhd8ed1ab_0 conda-forge pynac 0.7.29 py310hd7b6f9c_2 conda-forge pyopenssl 22.0.0 pyhd8ed1ab_0 conda-forge pyparsing 3.0.7 pyhd8ed1ab_0 conda-forge pyrsistent 0.18.1 py310he24745e_0 conda-forge pysocks 1.7.1 py310h2ec42d9_4 conda-forge python 3.10.2 h1dd9edd_3_cpython conda-forge python-dateutil 2.8.2 pyhd8ed1ab_0 conda-forge python-tzdata 2021.5 pyhd8ed1ab_0 conda-forge python_abi 3.10 2_cp310 conda-forge pythran 0.10.0 py310h509978a_3 conda-forge pytz 2021.3 pyhd8ed1ab_0 conda-forge pytz-deprecation-shim 0.1.0.post0 py310h2ec42d9_1 conda-forge pyzmq 22.3.0 py310hcce64c8_1 conda-forge qd 2.3.22 h2beb688_1004 conda-forge r-base 4.1.2 h2b051ba_0 conda-forge ratpoints 2.1.3 h3cb5acd_1002 conda-forge readline 8.1 h05e3726_0 conda-forge requests 2.27.1 pyhd8ed1ab_0 conda-forge rpy2 3.4.5 py310r41h81f86ea_3 conda-forge rubiks 20070912 h370ebc4_1001 conda-forge rw 0.9 h0d85af4_0 conda-forge sage 9.5 hd8ed1ab_0 conda-forge sage-docbuild 9.5 pypi_0 pypi sage-setup 9.5 pypi_0 pypi sagelib 9.5 py310ha1b8b38_0 conda-forge sagemath-db-combinatorial-designs 20140630 0 conda-forge sagemath-db-conway-polynomials 0.5.0 h033912b_1 conda-forge sagemath-db-elliptic-curves 0.8.1 hecc5488_0 conda-forge sagemath-db-graphs 20210214 hd8ed1ab_0 conda-forge sagemath-db-polytopes 20170220 0 conda-forge sagemath-standard 9.5 pypi_0 pypi sagetex 3.6 pyhd8ed1ab_0 conda-forge scipy 1.8.0 py310h47774c9_1 conda-forge send2trash 1.8.0 pyhd8ed1ab_0 conda-forge setuptools 60.8.2 py310h2ec42d9_0 conda-forge sigtool 0.1.3 h57ddcff_0 conda-forge simplegeneric 0.8.1 py_1 conda-forge singular 4.2.0.p3 h6475a08_2 conda-forge six 1.16.0 pyh6c4a22f_0 conda-forge snowballstemmer 2.2.0 pyhd8ed1ab_0 conda-forge sphinx 4.4.0 pyh6c4a22f_1 conda-forge sphinxcontrib-applehelp 1.0.2 py_0 conda-forge sphinxcontrib-devhelp 1.0.2 py_0 conda-forge sphinxcontrib-htmlhelp 2.0.0 pyhd8ed1ab_0 conda-forge sphinxcontrib-jsmath 1.0.1 py_0 conda-forge sphinxcontrib-qthelp 1.0.3 py_0 conda-forge sphinxcontrib-serializinghtml 1.1.5 pyhd8ed1ab_1 conda-forge sqlite 3.37.0 h23a322b_0 conda-forge suitesparse 5.10.1 h7aff33d_1 conda-forge symmetrica 2.0 h2e338ed_1007 conda-forge sympow 2.023.6 h9b7075a_2 conda-forge sympy 1.9 py310h2ec42d9_1 conda-forge tachyon 0.99b6 h2e86ede_1001 conda-forge tapi 1100.0.11 h9ce4665_0 conda-forge tbb 2021.5.0 h940c156_0 conda-forge terminado 0.13.1 py310h2ec42d9_0 conda-forge testpath 0.5.0 pyhd8ed1ab_0 conda-forge three.js 122 hd8ed1ab_1 conda-forge tk 8.6.11 h5dbffcc_1 conda-forge tktable 2.10 h49f0cf7_3 conda-forge tornado 6.1 py310he24745e_2 conda-forge traitlets 5.1.1 pyhd8ed1ab_0 conda-forge tzdata 2021e he74cb21_0 conda-forge tzlocal 4.1 py310h2ec42d9_1 conda-forge unicodedata2 14.0.0 py310he24745e_0 conda-forge urllib3 1.26.8 pyhd8ed1ab_1 conda-forge wcwidth 0.2.5 pyh9f0ad1d_2 conda-forge webencodings 0.5.1 py_1 conda-forge wheel 0.37.1 pyhd8ed1ab_0 conda-forge widgetsnbextension 3.5.2 py310h2ec42d9_1 conda-forge xsimd 7.6.0 h940c156_0 conda-forge xz 5.2.5 haf1e3a3_1 conda-forge zeromq 4.3.4 he49afe7_1 conda-forge zipp 3.7.0 pyhd8ed1ab_1 conda-forge zlib 1.2.11 h9173be1_1013 conda-forge zn_poly 0.9.2 h0f52abe_0 conda-forge zstd 1.5.2 h582d3a0_0 conda-forge ```


Details about conda and system ( conda info ):

``` $ conda info active environment : sage-2022-02 active env location : /Users/mkoeppe/miniconda3/envs/sage-2022-02 shell level : 2 user config file : /Users/mkoeppe/.condarc populated config files : /Users/mkoeppe/.condarc conda version : 4.11.0 conda-build version : not installed python version : 3.7.6.final.0 virtual packages : __osx=10.16=0 __unix=0=0 __archspec=1=x86_64 base environment : /Users/mkoeppe/miniconda3 (writable) conda av data dir : /Users/mkoeppe/miniconda3/etc/conda conda av metadata url : None channel URLs : https://conda.anaconda.org/conda-forge/osx-64 https://conda.anaconda.org/conda-forge/noarch https://repo.anaconda.com/pkgs/main/osx-64 https://repo.anaconda.com/pkgs/main/noarch https://repo.anaconda.com/pkgs/r/osx-64 https://repo.anaconda.com/pkgs/r/noarch package cache : /Users/mkoeppe/miniconda3/pkgs /Users/mkoeppe/.conda/pkgs envs directories : /Users/mkoeppe/miniconda3/envs /Users/mkoeppe/.conda/envs platform : osx-64 user-agent : conda/4.11.0 requests/2.26.0 CPython/3.7.6 Darwin/20.6.0 OSX/10.16 UID:GID : 502:20 netrc file : None offline mode : False ```
isuruf commented 2 years ago

Do you know how to make sage look at share/threejs/build/three.min.js instead of share/threejs-sage/r122/three.min.js? Maybe a symlink?

mkoeppe commented 2 years ago

Symlink is probably the easiest. Otherwise would need patching

mkoeppe commented 2 years ago

Since https://trac.sagemath.org/ticket/30972, the Sage distribution is using these versioned installs of the Sage-specific patched version of threejs.

isuruf commented 2 years ago

Patched version of threejs? I don't see any patches.

mkoeppe commented 2 years ago

See for example https://trac.sagemath.org/ticket/30915; it is a custom build that includes some stuff from example files (OrbitControls.js etc.)

isuruf commented 2 years ago

That's already done in conda-forge.

mkoeppe commented 2 years ago

Where's the feedstock for that?

isuruf commented 2 years ago

https://github.com/conda-forge/three.js-feedstock/blob/master/recipe/meta.yaml#L16

mkoeppe commented 2 years ago

OK, I see, thanks

isuruf commented 2 years ago

Fixed in https://github.com/conda-forge/sagelib-feedstock/pull/131