最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

python - os.startfile() stops working when pandas is imported - Stack Overflow

programmeradmin0浏览0评论

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

发布评论

评论列表(0)

  1. 暂无评论