Bỏ qua để đến Nội dung
Menu
Câu hỏi này đã bị gắn cờ
1 Trả lời
5245 Lượt xem

I use the Window and Pycharm to develop Odoo modules.

I have used the code command (python3 odoo-bin scaffold my_module dev) to create a module in dev directory but it show the error as below:

import PyPDF2
ModuleNotFoundError: No module named 'PyPDF2'

I use venv environment to develop and I'm sure I have installed PyPDF2 sucessfully (pip3 install PyPDF2) as well as checking all Python Packages installed in setting, venv environment.

Please advise me how to solve this issue. Thank you !

Ảnh đại diện
Huỷ bỏ
Tác giả

@Niyas Raphy:

Hi Niyas,

Please advise me how to execute the command using python from virtual environment.

In fact, venv environment is activated automatically before I run the command, and when I check current interpreter, it's also python of venv.

Thank you so much.

sample: /opt/16/odoo-venv/bin/python3 odoo-bin scaffold my_module dev

Câu trả lời hay nhất

Hi,

When you run the command:  python3 odoo-bin scaffold my_module dev odoo is taking the default python of your system, you have to execute the same command using the python from virtual environment.

Thanks

Ảnh đại diện
Huỷ bỏ
Tác giả

Hi Niyas,

Please advise me how to execute the command using python from virtual environment.

In fact, venv environment is activated automatically before I run the command, and when I check current interpreter, it's also python of venv.

Thank you so much.

Bài viết liên quan Trả lời Lượt xem Hoạt động
1
thg 2 19
2938
1
thg 4 18
11021
0
thg 12 15
3006
3
thg 7 25
1989
3
thg 5 25
3470