Issue
I already setup the configurations in Odoo 10 but still facing with this error. I am using docker and eclipse. Any idea for this?
Traceback (most recent call last):
File "/home/user/Desktop/odoo-workspace/odoo10/odoo-bin", line 5, in <module>
__import__('pkg_resources').declare_namespace('odoo.addons')
File "/usr/lib/python3/dist-packages/pkg_resources/__init__.py", line 2269, in declare_namespace
declare_namespace(parent)
File "/usr/lib/python3/dist-packages/pkg_resources/__init__.py", line 2285, in declare_namespace
_handle_ns(packageName, path_item)
File "/usr/lib/python3/dist-packages/pkg_resources/__init__.py", line 2218, in _handle_ns
loader.load_module(packageName)
File "<frozen importlib._bootstrap_external>", line 462, in _check_name_wrapper
File "<frozen importlib._bootstrap_external>", line 962, in load_module
File "<frozen importlib._bootstrap_external>", line 787, in load_module
File "<frozen importlib._bootstrap>", line 262, in _load_module_shim
File "<frozen importlib._bootstrap>", line 604, in _exec
File "<frozen importlib._bootstrap_external>", line 783, in exec_module
File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
File "/home/user/Desktop/odoo-workspace/odoo10/odoo/__init__.py", line 57, in <module>
import addons
ModuleNotFoundError: No module named 'addons'
Solution
Already solved. I changed the python interpreter to Python2.7 and installed pip.
To install pip for Python 2.7 install it from \https://bootstrap.pypa.io/pip/2.7/ :
- curl -O https://bootstrap.pypa.io/pip/2.7/get-pip.py
- python get-pip.py
- python -m pip install --upgrade "pip < 21.0"
after that I entered this command so that it will get all the requirements well:
pip install -r requirements.txt
Answered By - Kai Ning