无法在使用Python3的Ubuntu上安装selenium
我想在Ubuntu和Python3上使用selenium。我根据说明运行以下命令:无法在使用Python3的Ubuntu上安装selenium,python,linux,ubuntu,selenium,Python,Linux,Ubuntu,Selenium,我想在Ubuntu和Python3上使用selenium。我根据说明运行以下命令: ubuntu:~$ sudo pip-3.2 install -U selenium Downloading/unpacking selenium Downloading selenium-2.37.2.tar.gz (2.6MB): 2.6MB downloaded Running setup.py egg_info for package selenium Installing collected
ubuntu:~$ sudo pip-3.2 install -U selenium
Downloading/unpacking selenium
Downloading selenium-2.37.2.tar.gz (2.6MB): 2.6MB downloaded
Running setup.py egg_info for package selenium
Installing collected packages: selenium
Running setup.py install for selenium
Successfully installed selenium
Cleaning up...
但是,当我尝试在python3中导入selenium模块时,出现了一个错误:
@ubuntu:~$ python3
Python 3.2.5 (default, Sep 7 2013, 16:55:10)
[GCC 4.6.3] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import selenium
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ImportError: No module named selenium
@ubuntu:~$python3
Python 3.2.5(默认,2013年9月7日,16:55:10)
[GCC 4.6.3]关于linux2
有关详细信息,请键入“帮助”、“版权”、“信用证”或“许可证”。
>>>进口硒
回溯(最近一次呼叫最后一次):
文件“”,第1行,在
ImportError:没有名为selenium的模块
您可以通过以下步骤在Ubuntu和Python3上使用selenium:
sudo apt get install python3 pip
为python3安装pipsudo python3-m pip安装-U selenium
为python3安装selenium您可以通过以下步骤在Ubuntu和Python3上使用selenium:
sudo apt get install python3 pip
为python3安装pipsudo python3-m pip安装-U selenium
为python3安装selenium你重新启动了终端吗?它会用python 2.7运行吗?在我的例子中,它能用python工作(python 3也不工作)吗?你重新启动了终端吗?它会用python 2.7运行吗?在我的例子中,它能用python工作(python 3也不工作)