Skip to content

Add onnx#463

Draft
justinchuby wants to merge 2 commits intopyodide:mainfrom
justinchuby:onnx
Draft

Add onnx#463
justinchuby wants to merge 2 commits intopyodide:mainfrom
justinchuby:onnx

Conversation

@justinchuby
Copy link
Copy Markdown
Contributor

No description provided.

Signed-off-by: Justin Chu <justinchuby@users.noreply.github.com>
Signed-off-by: Justin Chu <justinchuby@users.noreply.github.com>
@justinchuby
Copy link
Copy Markdown
Contributor Author

@agriyakhetarpal I get

/home/runner/miniconda3/envs/pyodide-env/share/cmake-3.31/Modules/FindPackageHan
dleStandardArgs.cmake:233 (message):                                            
  Could NOT find Python3 (missing: Python3_INCLUDE_DIRS Development.Module      
  Development.SABIModule)                                                       
Call Stack (most recent call first):                                            
  /home/runner/miniconda3/envs/pyodide-env/share/cmake-3.31/Modules/FindPackageH
andleStandardArgs.cmake:603 (_FPHSA_FAILURE_MESSAGE)                            
  /home/runner/miniconda3/envs/pyodide-env/share/cmake-3.31/Modules/FindPython/S
upport.cmake:4000 (find_package_handle_standard_args)                           
  /home/runner/miniconda3/envs/pyodide-env/share/cmake-3.31/Modules/FindPython3.
cmake:602 (include)                                                             
  CMakeLists.txt:141 (find_package)           

Could you suggest the correct way to find python in pyodide?

@agriyakhetarpal
Copy link
Copy Markdown
Member

Hi @justinchuby, I had a quick glance over the packaging structure for onnx, and I don't think it uses CMake's FindPython mode, but rather the previous method of getting the Python executable: https://github.com/onnx/onnx/blob/9c31fa6d39400d444c6b1a4de2a247ad32174f63/setup.py#L185. The FindPython mode is used by many CMake-based packages and it works for their builds. I would suggest trying with replacing Python3_EXECUTABLE to Python_EXECUTABLE once, but I doubt that would work. Next I would suggest trying to just use sys.executable instead of trying to find Python by working through sysconfig and getting the components based on the locations from the include directory. I see that Windows already uses sys.executable.

@agriyakhetarpal
Copy link
Copy Markdown
Member

Looks like there are some discussions about this function already that you are a participant of: onnx/onnx#7226

@justinchuby justinchuby marked this pull request as draft January 14, 2026 19:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants