Pycharm the latest version of the new project did not import the local package issue: module ' Selenium.webdriver ' has no attribute ' Firefox '

Source: Internet
Author: User
Tags virtual environment

The latest version of the Pycharm made a great change, when the new project, the default does not import the local installation package, which led to a lot of small partners stepped on the pit ...
Obviously has Pip installed selenium, but reported Attributeerror:module ' Selenium.webdriver ' has no attribute ' Firefox '

Encounter problems

1. Run the following code, error after execution

2. This code is obvious, webdriver under all have Aunt Red, this code inside has aunt Red, don't run, affirmation error

Solutions

1. To troubleshoot this problem, first make sure that selenium is already installed, and check the following in cmd

> python>>> from selenium import webdriver

2. The above CMD confirmed that there is no problem, that is, pycharm new project when there is a problem, the new project when the attention: first open the area shown

3. Check the two box again

    • Inherit Global site-packages: Importing Local Packages
    • Make available to all projects: makes all projects available

Note: This pit is mainly a new version of Pycharm The default project is venv (virtual environment) novice will easily fall into the pit

Pycharm the latest version of the new project did not import the local package issue: module ' Selenium.webdriver ' has no attribute ' Firefox '

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.