Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/python/303.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Python Splinter库导入错误:无法导入名称浏览器_Python_Splinter - Fatal编程技术网

Python Splinter库导入错误:无法导入名称浏览器

Python Splinter库导入错误:无法导入名称浏览器,python,splinter,Python,Splinter,我正在尝试使用python中的Splinter库。当我使用 from splinter import Browser 在它给我的代码中: 文件D:\Users\User\Desktop\splinter.py,第1行,在 导入错误:无法导入名称浏览器 我正在尝试从桌面运行该文件。为什么它在我的桌面上查找splinter.py?我的桌面上没有splinter.py。修复:在正确命名文件之前,我的桌面上有一个名为“splinter.pyc”的文件。删除此项修复了问题

我正在尝试使用python中的Splinter库。当我使用

from splinter import Browser
在它给我的代码中:

文件D:\Users\User\Desktop\splinter.py,第1行,在 导入错误:无法导入名称浏览器


我正在尝试从桌面运行该文件。为什么它在我的桌面上查找splinter.py?我的桌面上没有splinter.py。

修复:在正确命名文件之前,我的桌面上有一个名为“splinter.pyc”的文件。删除此项修复了问题