Skip to content

Conversation

jessegrabowski
Copy link
Member

@jessegrabowski jessegrabowski commented May 11, 2025

Closes #1398 . Issue was reported and debugged by user DrEntropy here.

Maybe there's a better solution for this issue, but it's probably good to patch it quickly for now. We should also consider running the CI on windows -- testing linux and mac is a bit redundant?


📚 Documentation preview 📚: https://pytensor--1399.org.readthedocs.build/en/1399/

@@ -51,6 +51,7 @@ dependencies = [
"scipy>=1,<2",
"numpy>=1.17.0",
"filelock>=3.15",
"libgcc<15 ; platform_system == 'Windows'",
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The c backend is optional for PyTensor, this is something you want to do at the conda level not here

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ya, libgcc isn't even on PyPI. Would anyone be available for a quick call to explain to me what's going on?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yep I quickly discovered this PR is extremely stupid :)

I can close it once we have another one addressing the actual issue.

@ricardoV94
Copy link
Member

testing linux and mac is a bit redundant?

We only do a smoke test on mac but why is it redundant. They are very different oses these days, so much mac breaks every other day and I don't remember the last time we had issues on linux

@maresb
Copy link
Contributor

maresb commented May 11, 2025

I did a bit more digging and I have a vague hypothesis.

I don't think it's a matter of pinning libgcc, but rather that pytensor is finding the wrong compiler. Perhaps we are picking up the system compiler, or there is a mismatch within the conda environment itself between the gxx version and libgcc version? (ping @lucianopaz)

(Note that we had to change to g++ on Windows, but it has been apparently working well for several months.) conda-forge/pytensor-suite-feedstock#133 (comment)

I reproduced a Windows environment via pixi, and I'm wondering why libgcc is on 15.1.0 while libgcc-devel_win-64 is on 13.3.0:

Environment list
  + C _openmp_mutex                                   4.5 2_gnu                              
  + C anyio                                           4.9.0 pyh29332c3_0                     
  + C argon2-cffi                                     23.1.0 pyhd8ed1ab_1                    
  + C argon2-cffi-bindings                            21.2.0 py312h4389bb4_5                 
  + C arrow                                           1.3.0 pyhd8ed1ab_1                     
  + C arviz                                           0.21.0 pyhd8ed1ab_0                    
  + C asttokens                                       3.0.0 pyhd8ed1ab_1                     
  + C async-lru                                       2.0.5 pyh29332c3_0                     
  + C attrs                                           25.3.0 pyh71513ae_0                    
  + C babel                                           2.17.0 pyhd8ed1ab_0                    
  + C beautifulsoup4                                  4.13.4 pyha770c72_0                    
  + C binutils_impl_win-64                            2.43 h095e170_4                        
  + C binutils_win-64                                 2.43 hd1c8def_4                        
  + C blas                                            2.131 openblas                         
  + C blas-devel                                      3.9.0 31_hc0f8095_openblas             
  + C bleach                                          6.2.0 pyh29332c3_4                     
  + C bleach-with-css                                 6.2.0 h82add2a_4                       
  + C brotli                                          1.1.0 h2466b09_2                       
  + C brotli-bin                                      1.1.0 h2466b09_2                       
  + C brotli-python                                   1.1.0 py312h275cf98_2                  
  + C bzip2                                           1.0.8 h2466b09_7                       
  + C ca-certificates                                 2025.4.26 h4c7d964_0                   
  + C cached-property                                 1.5.2 hd8ed1ab_1                       
  + C cached_property                                 1.5.2 pyha770c72_1                     
  + C cachetools                                      5.5.2 pyhd8ed1ab_0                     
  + C cairo                                           1.18.4 h5782bbf_0                      
  + C certifi                                         2025.4.26 pyhd8ed1ab_0                 
  + C cffi                                            1.17.1 py312h4389bb4_0                 
  + C charset-normalizer                              3.4.2 pyhd8ed1ab_0                     
  + C cloudpickle                                     3.1.1 pyhd8ed1ab_0                     
  + C colorama                                        0.4.6 pyhd8ed1ab_1                     
  + C comm                                            0.2.2 pyhd8ed1ab_1                     
  + C cons                                            0.4.6 pyhd8ed1ab_1                     
  + C contourpy                                       1.3.2 py312hd5eb7cc_0                  
  + C cpython                                         3.12.10 py312hd8ed1ab_0                
  + C cycler                                          0.12.1 pyhd8ed1ab_1                    
  + C debugpy                                         1.8.14 py312h275cf98_0                 
  + C decorator                                       5.2.1 pyhd8ed1ab_0                     
  + C defusedxml                                      0.7.1 pyhd8ed1ab_0                     
  + C etuples                                         0.3.9 pyhd8ed1ab_1                     
  + C exceptiongroup                                  1.3.0 pyhd8ed1ab_0                     
  + C executing                                       2.2.0 pyhd8ed1ab_0                     
  + C filelock                                        3.18.0 pyhd8ed1ab_0                    
  + C font-ttf-dejavu-sans-mono                       2.37 hab24e00_0                        
  + C font-ttf-inconsolata                            3.000 h77eed37_0                       
  + C font-ttf-source-code-pro                        2.038 h77eed37_0                       
  + C font-ttf-ubuntu                                 0.83 h77eed37_3                        
  + C fontconfig                                      2.15.0 h765892d_1                      
  + C fonts-conda-ecosystem                           1 0                                    
  + C fonts-conda-forge                               1 0                                    
  + C fonttools                                       4.58.0 py312h31fea79_0                 
  + C fqdn                                            1.5.1 pyhd8ed1ab_1                     
  + C freetype                                        2.13.3 h57928b3_1                      
  + C fribidi                                         1.0.10 h8d14728_0                      
  + C gcc                                             13.3.0 hf9c6911_2                      
  + C gcc_impl_win-64                                 13.3.0 h14668b0_2                      
  + C gcc_win-64                                      13.3.0 h3842d22_10                     
  + C gendef                                          v12.0.0.r1.ggdc42231f0 he1bec0e_1      
  + C getopt-win32                                    0.1 hcfcfb64_1                         
  + C graphite2                                       1.3.13 h63175ca_1003                   
  + C graphviz                                        12.2.1 hf40819d_1                      
  + C gts                                             0.7.6 h6b5321d_4                       
  + C gxx                                             13.3.0 hf9c6911_2                      
  + C gxx_impl_win-64                                 13.3.0 h317ec3d_2                      
  + C gxx_win-64                                      13.3.0 h3842d22_10                     
  + C h11                                             0.16.0 pyhd8ed1ab_0                    
  + C h2                                              4.2.0 pyhd8ed1ab_0                     
  + C h5netcdf                                        1.6.1 pyhd8ed1ab_0                     
  + C h5py                                            3.13.0 nompi_py312h4e244af_101         
  + C harfbuzz                                        11.1.0 h8796e6f_0                      
  + C hdf5                                            1.14.6 nompi_hd5d9e70_101              
  + C hpack                                           4.1.0 pyhd8ed1ab_0                     
  + C httpcore                                        1.0.9 pyh29332c3_0                     
  + C httpx                                           0.28.1 pyhd8ed1ab_0                    
  + C hyperframe                                      6.1.0 pyhd8ed1ab_0                     
  + C icu                                             75.1 he0c23c2_0                        
  + C idna                                            3.10 pyhd8ed1ab_1                      
  + C importlib-metadata                              8.6.1 pyha770c72_0                     
  + C importlib_resources                             6.5.2 pyhd8ed1ab_0                     
  + C intel-openmp                                    2024.2.1 h57928b3_1083                 
  + C ipykernel                                       6.29.5 pyh4bbf305_0                    
  + C ipython                                         9.2.0 pyhca29cf9_0                     
  + C ipython_pygments_lexers                         1.1.1 pyhd8ed1ab_0                     
  + C ipywidgets                                      8.1.7 pyhd8ed1ab_0                     
  + C isoduration                                     20.11.0 pyhd8ed1ab_1                   
  + C jedi                                            0.19.2 pyhd8ed1ab_1                    
  + C jinja2                                          3.1.6 pyhd8ed1ab_0                     
  + C json5                                           0.12.0 pyhd8ed1ab_0                    
  + C jsonpointer                                     3.0.0 py312h2e8e312_1                  
  + C jsonschema                                      4.23.0 pyhd8ed1ab_1                    
  + C jsonschema-specifications                       2025.4.1 pyh29332c3_0                  
  + C jsonschema-with-format-nongpl                   4.23.0 hd8ed1ab_1                      
  + C jupyter                                         1.1.1 pyhd8ed1ab_1                     
  + C jupyter-lsp                                     2.2.5 pyhd8ed1ab_1                     
  + C jupyter_client                                  8.6.3 pyhd8ed1ab_1                     
  + C jupyter_console                                 6.6.3 pyhd8ed1ab_1                     
  + C jupyter_core                                    5.7.2 pyh5737063_1                     
  + C jupyter_events                                  0.12.0 pyh29332c3_0                    
  + C jupyter_server                                  2.15.0 pyhd8ed1ab_0                    
  + C jupyter_server_terminals                        0.5.3 pyhd8ed1ab_1                     
  + C jupyterlab                                      4.4.2 pyhd8ed1ab_0                     
  + C jupyterlab_pygments                             0.3.0 pyhd8ed1ab_2                     
  + C jupyterlab_server                               2.27.3 pyhd8ed1ab_1                    
  + C jupyterlab_widgets                              3.0.15 pyhd8ed1ab_0                    
  + C kiwisolver                                      1.4.8 py312hc790b64_0                  
  + C krb5                                            1.21.3 hdf4eb48_0                      
  + C lcms2                                           2.17 hbcf6048_0                        
  + C ld_impl_win-64                                  2.43 hae1bf67_4                        
  + C lerc                                            4.0.0 h6470a55_1                       
  + C libaec                                          1.1.3 h63175ca_0                       
  + C libblas                                         3.9.0 31_h11dc60a_openblas             
  + C libbrotlicommon                                 1.1.0 h2466b09_2                       
  + C libbrotlidec                                    1.1.0 h2466b09_2                       
  + C libbrotlienc                                    1.1.0 h2466b09_2                       
  + C libcblas                                        3.9.0 31_h9bd4c3b_openblas             
  + C libcurl                                         8.13.0 h88aaa65_0                      
  + C libdeflate                                      1.23 h76ddb4d_0                        
  + C libexpat                                        2.7.0 he0c23c2_0                       
  + C libffi                                          3.4.6 h537db12_1                       
  + C libfreetype                                     2.13.3 h57928b3_1                      
  + C libfreetype6                                    2.13.3 h0b5ce68_1                      
  + C libgcc                                          15.1.0 h1383e82_2                      
  + C libgcc-devel_win-64                             13.3.0 h5200ebd_102                    
  + C libgd                                           2.3.3 h7208af6_11                      
  + C libglib                                         2.84.1 hbc94333_1                      
  + C libgomp                                         15.1.0 h1383e82_2                      
  + C libhwloc                                        2.11.2 default_ha69328c_1001           
  + C libiconv                                        1.18 h135ad9c_1                        
  + C libintl                                         0.22.5 h5728263_3                      
  + C libjpeg-turbo                                   3.1.0 h2466b09_0                       
  + C liblapack                                       3.9.0 31_h2526c6b_openblas             
  + C liblapacke                                      3.9.0 31_h1d0e49f_openblas             
  + C liblzma                                         5.8.1 h2466b09_1                       
  + C libopenblas                                     0.3.29 pthreads_head3c61_0             
  + C libpng                                          1.6.47 h7a4582a_0                      
  + C libsodium                                       1.0.20 hc70643c_0                      
  + C libsqlite                                       3.49.2 h67fdade_0                      
  + C libssh2                                         1.11.1 h9aa295b_0                      
  + C libstdcxx                                       15.1.0 h904f734_2                      
  + C libstdcxx-devel_win-64                          13.3.0 h5200ebd_102                    
  + C libtiff                                         4.7.0 h797046b_4                       
  + C libwebp-base                                    1.5.0 h3b0e114_0                       
  + C libwinpthread                                   12.0.0.r4.gg4f2fc60ca h57928b3_9       
  + C libxcb                                          1.17.0 h0e4246c_0                      
  + C libxml2                                         2.13.8 h442d1da_0                      
  + C libzlib                                         1.3.1 h2466b09_2                       
  + C logical-unification                             0.4.6 pyhd8ed1ab_0                     
  + C m2w64-sysroot_win-64                            12.0.0.r4.gg4f2fc60ca h7428d3b_9       
  + C markdown-it-py                                  3.0.0 pyhd8ed1ab_1                     
  + C markupsafe                                      3.0.2 py312h31fea79_1                  
  + C matplotlib-base                                 3.10.3 py312h90004f6_0                 
  + C matplotlib-inline                               0.1.7 pyhd8ed1ab_1                     
  + C mdurl                                           0.1.2 pyhd8ed1ab_1                     
  + C mingw-w64-ucrt-x86_64-crt-git                   12.0.0.r4.gg4f2fc60ca h7428d3b_9       
  + C mingw-w64-ucrt-x86_64-headers-git               12.0.0.r4.gg4f2fc60ca h7428d3b_9       
  + C mingw-w64-ucrt-x86_64-windows-default-manifest  6.4 he206cdd_7                         
  + C mingw-w64-ucrt-x86_64-winpthreads-git           12.0.0.r4.gg4f2fc60ca h7428d3b_9       
  + C minikanren                                      1.0.3 pyhd8ed1ab_1                     
  + C mistune                                         3.1.3 pyh29332c3_0                     
  + C mkl                                             2024.2.2 h66d3029_15                   
  + C mkl-service                                     2.4.2 py312hb47c4b0_1                  
  + C multipledispatch                                0.6.0 pyhd8ed1ab_1                     
  + C munkres                                         1.1.4 pyh9f0ad1d_0                     
  + C nbclient                                        0.10.2 pyhd8ed1ab_0                    
  + C nbconvert-core                                  7.16.6 pyh29332c3_0                    
  + C nbformat                                        5.10.4 pyhd8ed1ab_1                    
  + C nest-asyncio                                    1.6.0 pyhd8ed1ab_1                     
  + C notebook                                        7.4.2 pyhd8ed1ab_0                     
  + C notebook-shim                                   0.2.4 pyhd8ed1ab_1                     
  + C numpy                                           2.2.5 py312h3150e54_0                  
  + C openblas                                        0.3.29 pthreads_h4a7f399_0             
  + C openjpeg                                        2.5.3 h4d64b90_0                       
  + C openssl                                         3.5.0 ha4e3fda_1                       
  + C overrides                                       7.7.0 pyhd8ed1ab_1                     
  + C packaging                                       25.0 pyh29332c3_1                      
  + C pandas                                          2.2.3 py312h72972c8_3                  
  + C pandocfilters                                   1.5.0 pyhd8ed1ab_0                     
  + C pango                                           1.56.3 h0c53d3b_1                      
  + C parso                                           0.8.4 pyhd8ed1ab_1                     
  + C pcre2                                           10.45 h99c9b8b_0                       
  + C pickleshare                                     0.7.5 pyhd8ed1ab_1004                  
  + C pillow                                          11.2.1 py312h078707f_0                 
  + C pixman                                          0.46.0 had0cd8c_0                      
  + C pkgutil-resolve-name                            1.3.10 pyhd8ed1ab_2                    
  + C platformdirs                                    4.3.8 pyhe01879c_0                     
  + C prometheus_client                               0.21.1 pyhd8ed1ab_0                    
  + C prompt-toolkit                                  3.0.51 pyha770c72_0                    
  + C prompt_toolkit                                  3.0.51 hd8ed1ab_0                      
  + C psutil                                          7.0.0 py312h4389bb4_0                  
  + C pthread-stubs                                   0.4 h0e40799_1002                      
  + C pure_eval                                       0.2.3 pyhd8ed1ab_1                     
  + C pycparser                                       2.22 pyh29332c3_1                      
  + C pygments                                        2.19.1 pyhd8ed1ab_0                    
  + C pymc                                            5.21.0 hd8ed1ab_0                      
  + C pymc-base                                       5.21.0 pyhd8ed1ab_0                    
  + C pyparsing                                       3.2.3 pyhd8ed1ab_1                     
  + C pysocks                                         1.7.1 pyh09c184e_7                     
  + C pytensor                                        2.28.3 py312h22bf10f_1                 
  + C pytensor-base                                   2.28.3 py312h72972c8_1                 
  + C python                                          3.12.10 h3f84c4b_0_cpython             
  + C python-dateutil                                 2.9.0.post0 pyhff2d567_1               
  + C python-fastjsonschema                           2.21.1 pyhd8ed1ab_0                    
  + C python-graphviz                                 0.20.3 pyh91182bf_2                    
  + C python-json-logger                              2.0.7 pyhd8ed1ab_0                     
  + C python-tzdata                                   2025.2 pyhd8ed1ab_0                    
  + C python_abi                                      3.12 7_cp312                           
  + C pytz                                            2025.2 pyhd8ed1ab_0                    
  + C pywin32                                         307 py312h275cf98_3                    
  + C pywinpty                                        2.0.15 py312h275cf98_0                 
  + C pyyaml                                          6.0.2 py312h31fea79_2                  
  + C pyzmq                                           26.4.0 py312hd7027bb_0                 
  + C qhull                                           2020.2 hc790b64_5                      
  + C referencing                                     0.36.2 pyh29332c3_0                    
  + C requests                                        2.32.3 pyhd8ed1ab_1                    
  + C rfc3339-validator                               0.1.4 pyhd8ed1ab_1                     
  + C rfc3986-validator                               0.1.1 pyh9f0ad1d_0                     
  + C rich                                            14.0.0 pyh29332c3_0                    
  + C rpds-py                                         0.24.0 py312hfe1d9c4_0                 
  + C scipy                                           1.15.2 py312h451d5c4_0                 
  + C send2trash                                      1.8.3 pyh5737063_1                     
  + C setuptools                                      80.1.0 pyhff2d567_0                    
  + C six                                             1.17.0 pyhd8ed1ab_0                    
  + C sniffio                                         1.3.1 pyhd8ed1ab_1                     
  + C soupsieve                                       2.7 pyhd8ed1ab_0                       
  + C stack_data                                      0.6.3 pyhd8ed1ab_1                     
  + C tbb                                             2021.13.0 h62715c5_1                   
  + C terminado                                       0.18.1 pyh5737063_0                    
  + C threadpoolctl                                   3.6.0 pyhecae5ae_0                     
  + C tinycss2                                        1.4.0 pyhd8ed1ab_0                     
  + C tk                                              8.6.13 h5226925_1                      
  + C tomli                                           2.2.1 pyhd8ed1ab_1                     
  + C toolz                                           1.0.0 pyhd8ed1ab_1                     
  + C tornado                                         6.4.2 py312h4389bb4_0                  
  + C traitlets                                       5.14.3 pyhd8ed1ab_1                    
  + C types-python-dateutil                           2.9.0.20241206 pyhd8ed1ab_0            
  + C typing-extensions                               4.13.2 h0e9735f_0                      
  + C typing_extensions                               4.13.2 pyh29332c3_0                    
  + C typing_utils                                    0.1.0 pyhd8ed1ab_1                     
  + C tzdata                                          2025b h78e105d_0                       
  + C ucrt                                            10.0.22621.0 h57928b3_1                
  + C unicodedata2                                    16.0.0 py312h4389bb4_0                 
  + C uri-template                                    1.3.0 pyhd8ed1ab_1                     
  + C urllib3                                         2.4.0 pyhd8ed1ab_0                     
  + C vc                                              14.3 h2b53caa_26                       
  + C vc14_runtime                                    14.42.34438 hfd919c2_26                
  + C vs2015_runtime                                  14.42.34438 h7142326_26                
  + C wcwidth                                         0.2.13 pyhd8ed1ab_1                    
  + C webcolors                                       24.11.1 pyhd8ed1ab_0                   
  + C webencodings                                    0.5.1 pyhd8ed1ab_3                     
  + C websocket-client                                1.8.0 pyhd8ed1ab_1                     
  + C widgetsnbextension                              4.0.14 pyhd8ed1ab_0                    
  + C win_inet_pton                                   1.1.0 pyh7428d3b_8                     
  + C winpty                                          0.4.3 4                                
  + C xarray                                          2025.4.0 pyhd8ed1ab_0                  
  + C xarray-einstats                                 0.8.0 pyhd8ed1ab_1                     
  + C xorg-libice                                     1.1.2 h0e40799_0                       
  + C xorg-libsm                                      1.2.6 h0e40799_0                       
  + C xorg-libx11                                     1.8.12 hf48077a_0                      
  + C xorg-libxau                                     1.0.12 h0e40799_0                      
  + C xorg-libxdmcp                                   1.1.5 h0e40799_0                       
  + C xorg-libxext                                    1.3.6 h0e40799_0                       
  + C xorg-libxpm                                     3.5.17 h0e40799_1                      
  + C xorg-libxt                                      1.3.1 h0e40799_0                       
  + C yaml                                            0.2.5 h8ffe710_2                       
  + C zeromq                                          4.3.5 ha9f60a1_7                       
  + C zipp                                            3.21.0 pyhd8ed1ab_1                    
  + C zstandard                                       0.23.0 py312h4389bb4_2                 
  + C zstd                                            1.5.7 hbeecb71_2             

@maresb
Copy link
Contributor

maresb commented May 11, 2025

and I'm wondering why libgcc is on 15.1.0 while libgcc-devel_win-64 is on 13.3.0

I checked on linux-64 and it was the same, but it still works on Linux. 🤷

@jessegrabowski
Copy link
Member Author

Closing this PR since it's entirely wrong, we can move the discussion on how to proceed to #1398

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working C-backend compilation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

ImportError: DLL load failed while importing when libgcc 15.1.0 is installed
3 participants