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 '