Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我正在尝试在 python 中使用 Splinter 库。当我使用
from splinter import Browser
在它给我的代码中:
ImportError 中的文件“D:\Users\User\Desktop\splinter.py”,第 1 行:无法导入名称浏览器
我正在尝试从我的桌面运行该文件。为什么它在我的桌面上寻找 splinter.py?我的桌面上没有 splinter.py。
修复:在我的文件被正确命名之前,我的桌面上有一个名为“splinter.pyc”的文件。删除这个解决了这个问题。