Gali_Mahesh
Gali_Mahesh

Reputation: 51

ModuleNotFoundError: No module named 'odoo'

I have installed odoo14 windows and configured it to pycharm, but when I try to customize anything from the .py file, the update is not happening, its showing the below error when i run the file Error:

ModuleNotFoundError: No module named 'odoo'

Thanks in Advance.

Upvotes: 0

Views: 5097

Answers (2)

Kayemba Luwaga
Kayemba Luwaga

Reputation: 47

You have to use the absolute addons_path path reference for your addons folder in the odoo.conf file eg:

; odoo.conf file
[options]
; Is This The Password That Allows Database Operations:
admin_passwd = admin
db_host = localhost
db_port = 5432
db_user = myodoo17
db_password = myodoo17pswd
addons_path = /home/pc-username/Desktop/odoo17/addons
xmlrpc_port = 8016
default_productivity_apps = True

Upvotes: 0

tbjorch
tbjorch

Reputation: 1758

When executing python it will look in the specified locations in sys.path in order to find your imports. If you get module not found, it's because the module you are trying to access is not located in any of the sys.path directories or its subdirectories.

So a next step of checking would be to check:

  1. Where is odoo14 installed?
  2. run your file using the below snippet and see if any of the listed directories is the source directory or the parent directory of odoo14.
import sys
print(sys.path)

If odoo14 is indeed not in any directory or subdirectory in the outputed list, you need to check the configuration of your project.

Maybe you created a project with a virtual env. and the odoo14 package is installed elsewhere?

Upvotes: 0

Related Questions