JulianSmith95
JulianSmith95

Reputation: 41

Import error aftert adding site.py file to project

After I've added site.py to top directory of my project, my application started to fail with an exception: "ImportError: No module named 'bs4'".

Before adding this file, application worked file. BeautifulSoup4 package is installed in used interpreter.

What's happening here?

Upvotes: 1

Views: 126

Answers (1)

Łukasz Rogalski
Łukasz Rogalski

Reputation: 23243

site.py shadows built-in site module.

Due to wrong site.py module being imported, paths used to search for user-installed packages are never set, therefore interpreter is unable to find bs4 module.

Upvotes: 2

Related Questions