admin管理员组

文章数量:1389754

I found that simply importing pandas prevents files from being opened by the OS. By opening I mean that I want a Windows window to open and display an image for me. Instead nothing happens and the script finishes with no errors.

import os 
import pandas # works fine without this line
os.startfile("img.png") # windows-only way to open

I found this when using graphviz to render a graph to an image and open it after. graphviz uses os.startfile under the hood. What could pandas be doing here?

python: 3.12.9

pandas: 2.2.3

本文标签: pythonosstartfile() stops working when pandas is importedStack Overflow